Aku - Tiny Backtesting/Trading Engine
Aku - Toy Backtesting/Trading Engine
Aku is a toy backtesting/trading engine with some very basic interfaces. Its easy to extend aku by providing custom implementation of interfaces.Usage: Aku v0.0.1 [OPTION...]
-i, --input arg Input csv file, will read ticks from here -o, --output arg Output csv file, will output trade / results here (default: output.csv) -d, --debug Enable debugging -h, --help Print usage
Build
make
Key Terms
- Tick: A standard stock candle. - TickManager: Responsible for Fetching Ticks from any source e.g Web/Database - TradeManager: Implements Basic operations for your trading exchange/portal. - Strategy: Implements processTick()Your standard Implementation or refer main.cpp.
/ Initialise tick manager/
TickManager * tick_manager;
tickmanager = new YourTickManager(inputfile);
/ Initialise strategy / Strategy * strategy; strategy = new YourCustomStrategy();
/ Initialise trade manager / TradeManager * trade_manager; trademanager = new YourTradeManager(virtualbank); Tick lasttradedtick; / Start the core event-loop / while(tick_manager->hasNextTick()){ Tick t = tick_manager->getNextTick(); lasttradedtick = t; Trade tr = strategy->processTick(t); trade_manager->performTrade(tr); }
Todos
- Write MORE Tests - Clean the code ( as always) - Implement more strats