Skip to content

ryqdev/golden

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

golden

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.

Why to use Rust

  • 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]

Quick glance

On Linux:

Download csv data from yahoo finance: image Backtest with a simple strategy: image Paper trading with IBKR TWS image

On Windows:

Download csv data from yahoo finance: image Backtest with a simple strategy: image Paper trading with IBKR TWS: image

Quick Install

cargo install golden

Useful Commands

# 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

Project feature list

  • 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

Backtest features list

  • 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

Visualization feature list

  • 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

Paper trading & live trading feature list

  • Single live broker: IBKR
  • Live trading with single broker
  • Risk module
  • Online monitor module
  • Remote deployment
  • Multi-strategy system design

Reference

[1] https://rustmagazine.github.io/rust_magazine_2021/chapter_12/rust-perf.html

About

All-in-one trading engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published