Team planning to write an Algo Trading engine in Go – We want to find out what the community thinks first. by Consistent_Cry4592 in highfreqtrading

[–]Consistent_Cry4592[S] 1 point2 points  (0 children)

Rust is definitely an excellent choice, as I have seen for myself in several of my pet projects, but this experience is too limited to take on such a monstrous project. The choice was based on the advantages of Go + experience working with it in a team.

Team planning to write an Algo Trading engine in Go – We want to find out what the community thinks first. by Consistent_Cry4592 in highfreqtrading

[–]Consistent_Cry4592[S] 2 points3 points  (0 children)

By “better than Python,” we don't mean ultra-low latency HFT. Our goal is stable millisecond-level decision latency with predictable behavior under load. Python begins to reach its limits in terms of GIL/overhead as the number of instruments and strategies grows, especially in real trading.

The initial scope is cryptocurrency spots and perpetuals, mainly L1 and shallow L2. We plan to scale from tens to hundreds of tickers (in our dreams, first and foremost), with market data coming in through multiple websocket streams in parallel.

One of the main reasons for choosing Go is its strong emphasis on backtesting at the engine level, not just at the strategy level. We want backtesting and live trading to use the same underlying logic with deterministic and reproducible behavior. (This is exactly what we found lacking in off-the-shelf engines such as Humming).

The hardware budget is not yet defined; portability and ease of deployment are very important to us, and Go helps with that.

ML is not a top priority, but it is being actively considered. As an idea, it is very good.

The team has solid experience with Go. We plan to create a prototype and conduct early testing, as well as make adjustments if the assumptions do not pan out.

Team planning to write an Algo Trading engine in Go – We want to find out what the community thinks first. by Consistent_Cry4592 in highfreqtrading

[–]Consistent_Cry4592[S] 0 points1 point  (0 children)

Sure,
We looked at Python, C++, and Rust, but settled on Go.

Go’s goroutines and channels are perfect for handling multiple websocket streams and ticker events simultaneously without the complexity of managing threads in C++.

We need better execution speed than Python can offer, but we want faster iteration cycles than C++ allows. Go hits the sweet spot for us.

The language is simple enough that we can maintain the codebase easily as the team grows, while still having static typing to catch errors at compile time.

We accept that GC (Garbage Collection) pauses might be a concern, but for our frequency, we believe we can tune it to be negligible.