golden
is all-in-one trading engine built with Rust.
There are many public algorithmic trading platforms like QuantConnect and JoinQuant for individual traders to learn, research, backtest and live-trading. However, we still need private algorithmic trading platform for many reasons such as strategy privacy, system stability and other customed features.
One of the well-known private trading libraries is Backtrader with Python, but the community is not active recently, because it hasn't been updated since Apr 19, 2023. I also built a simple project based on backtrader and ib_insync, but it still need a lot of work to do to meet real world trading requirements.
Inspired by backtrader
, golden
aims to build all-in-one trading engine supporting backtesting, analyzing, paper-trading and live-trading.
- As my first Rust practice project: Wonderful chance for me to learn Rust and write algorithmic trading system from scratch.
- Modern programming language: Rust is the modern programming language with a powerful package manager (
cargo
) and toolchain. - High performance: Well-written Rust programs can perform as well as C/C++. [1]
Download csv data from yahoo finance:
Backtest with a simple strategy:
Paper trading with IBKR TWS
Download csv data from yahoo finance:
Backtest with a simple strategy:
Paper trading with IBKR TWS:
cargo install golden
# download csv to data/
golden csv --symbol SPY
# backtest
golden backtest # use config.toml by default
golden backtest --config <path-to-config-file>
# paper trading
golden paper --broker ibkr
- Command Line Argument Parser
- Set configuration with a local toml file
- Set configuration with UI
- Publish it to crate.io
- Customed Strategy writing
- DB design
- Single data feed
- Single strategy
- Download CSV data from yahoo finance
- Set time range while downloading data from Yahoo finance
- Load CSV data from local file
- Multiple data feed
- Multiple strategy
- Set time range in backtest
- Basic Indicators (such as SMA)
- More analyzer
- Create the basic layer
- Implement candlestick chart
- Implement line chart
- Add trading orders list
- Add side panel controller
- Add top menu bar
- Set window size and position
- Add benchmark
- Add more details
- Single live broker: IBKR
- Live trading with single broker
- Risk module
- Online monitor module
- Remote deployment
- Multi-strategy system design
[1] https://rustmagazine.github.io/rust_magazine_2021/chapter_12/rust-perf.html