r/quantfinance • u/fletchmm • 1d ago
C++/Python vs. C++/Rust: Which Stack Should I Choose for My Trading System Rebuild?
I currently have my servers set up for both dry-run and live trading in weather prediction markets, primarily on Kalshi. I also have access to Polymarket and ForecastEx WebSocket feeds. I’m now expanding into crypto, primarily tracking four cryptocurrencies across 15-minute and one-hour prediction markets.
My system currently uses C++ and Python. The live trading engines run exclusively in C++, while almost everything else is written in Python.
I’m preparing the next iteration of the system and moving it into a new repository to clean up the architecture, standardize workflows, and eliminate unnecessary code. My goal is to reduce the codebase by 50–75%.
That brings me to my next question: should I use this opportunity to change the language split? I’m considering two options:
- C++ and Rust: C++ would handle all trading functionality, while Rust would handle operations, data transport, database ingestion, and related infrastructure.
- C++ and Python: Keep the existing language combination, but expand C++ to cover all trading functionality while retaining Python for operations and related workflows.
What are the pros and cons of each approach? Since I’m already reorganizing the system and moving to a new repository, would this be the right time to make that change? Or is there another code that I'm completely missing here?
2
u/AoideusWasBanned 1d ago
Doing a rewrite and switching languages at the same time sounds like two projects to me. I'd keep Python for the ops side, move the trading parts fully into C++, and only try Rust later on one piece that actually hurts.
1
u/Salty_Hedgehog_6931 15h ago
Why not c++ and eliminate everything else.