About

algotradelib is an event-driven algorithmic trading system based on C++. (more)


Libraries

algotradelib:~# ls libraries/

Tools

algotradelib:~# ls tools/
atlc/ [Rust]
The compiler for atls, a short strategy language: checked, then transpiled to a C++ strategy for algotradelib.
cmdatl/ [C++]
algotradelib from the command line: backtest and run atls strategies described in TOML, with commands an AI agent can trade through inside the operator's limits.
algotradelib:~# cat atlc/examples/mean-reversion.atls
// Buy when the price falls well below its recent mean; sell when it comes back.
params {
  int<lower=2> lookback = 20;
  real<lower=0> entry = 2;
  real exit = 0;
  int<lower=0> quantity = 100;
}
series {
  real z = roll_zscore(close, lookback);
}
on_bar {
  if (z < -entry) {
    target(quantity);
  } else if (z > exit) {
    target(0);
  }
}
algotradelib:~# cmdatl strategy backtest cmdatl/examples/mean-reversion.toml

Projects

algotradelib:~# ls projects/
Strategies from E. P. Chan's Algorithmic Trading (2013), replicated with algotradelib.
Strategies from E. P. Chan's Algorithmic Trading (2013), replicated in Python with pyatl.
Strategies from E. P. Chan's Algorithmic Trading (2013), replicated in atls with cmdatl.