Get the latest tech news

On latency, measurement, and optimization in algorithmic trading systems


Architect offers an advanced trading platform with access to futures, options, and digital assets with institutional-grade order types, analytics, execution algorithms and more on desktop and mobile. Access connectivity to both regulated derivatives exchanges and digital asset venues through Architect's unified order entry and portfolio management system as well as institutional post-trade solutions.

datetime.now() itself is a slow, expensive function that can impact the runtime speed and memory profile of the code above, which adds up if your program is already operating on a microsecond-timescale. Let’s take a step back and trace a market data update through the complete critical path of the automated trading system (ATS): If we solely wanted to measure the latency of the system, we could tag each outbound message with the market data event sequence number, then, for each order, you can grab the NIC hardware timestamp tagged for the inbound market data event, and subtract it from the NIC hardware timestamp for the outbound order.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of fast code

fast code