UNPKG

1.62 kBMarkdownView Raw
1# Backtesting with Gekko
2
3**Note that this functionality should only be used for testing purposes at this moment as it's in early development stage**
4
5## Preparing Gekko
6
7You can configure Gekko to test the current EMA strategy on historical data. To do this you need candle data in CSV format. On [this webpage](https://bitcointalk.org/index.php?topic=239815.0) you can downloaded precalculated candles from Mt. Gox or you can calculate your own using the script provided in the link. Alternatively you can supply your own candles, the only requirement is that the csv file has candles ordered like this: `timestamp,open,high,low,close`.
8
9## Configuring Gekko
10
11Once you have the csv file with candles you can configure Gekko for backtesting: in [config.js](https://github.com/askmike/gekko/blob/master/config.js) in the advanced zone you need to the backtesting part like so:
12
13 config.backtest = {
14 enabled: true, // set to true to run backtests instead of live monitoring
15 candleFile: 'candles.csv', // the candles file
16 from: 0, // optional start timestamp
17 to: 0 // optional end timestamp
18 }
19
20Once configured Gekko will run the backtest instead of watching the live market. It wil use the following configuration items:
21
22* Everything under `backtest`.
23* Everything under `profitCalculator`.
24* Everything under `EMA` with the exception of interval, as this will be determined by the candles file.
25
26## Notes
27
28* Use the backtesting feature only for testing until the code is stable.
29* When there are missing candles Gekko will act as if the whole duration of the missing candle never happened.
\No newline at end of file