https://github.com/flouthoc/aku
Aku - Tiny Backtesting/Trading Engine
https://github.com/flouthoc/aku
backtesting backtesting-trading-strategies trading trading-bot trading-simulator
Last synced: about 1 year ago
JSON representation
Aku - Tiny Backtesting/Trading Engine
- Host: GitHub
- URL: https://github.com/flouthoc/aku
- Owner: flouthoc
- License: mit
- Created: 2020-06-27T19:01:31.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-03-26T07:07:02.000Z (about 4 years ago)
- Last Synced: 2025-03-18T10:21:20.155Z (about 1 year ago)
- Topics: backtesting, backtesting-trading-strategies, trading, trading-bot, trading-simulator
- Language: C++
- Homepage:
- Size: 2.73 MB
- Stars: 40
- Watchers: 2
- Forks: 9
- Open Issues: 3
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README

# 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.
```bash
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
```base
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.
```cpp
/* Initialise tick manager*/
TickManager * tick_manager;
tick_manager = new YourTickManager(input_file);
/* Initialise strategy */
Strategy * strategy;
strategy = new YourCustomStrategy();
/* Initialise trade manager */
TradeManager * trade_manager;
trade_manager = new YourTradeManager(virtual_bank);
Tick last_traded_tick;
/* Start the core event-loop */
while(tick_manager->hasNextTick()){
Tick t = tick_manager->getNextTick();
last_traded_tick = t;
Trade tr = strategy->processTick(t);
trade_manager->performTrade(tr);
}
```
### Todos
- Write MORE Tests
- Clean the code ( as always)
- Implement more strats
### License
- MIT License
- Logo by https://www.deviantart.com/foxboy2015