forked from askmike/gekko
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
297 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,5 @@ dwsync.xml | |
|
||
# Folders to ignore | ||
|
||
node_modules | ||
node_modules | ||
candles.csv |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Backtesting with Gekko | ||
|
||
**Note that this functionality should only be used for testing purposes at this moment as it's in early development stage** | ||
|
||
## Preparing Gekko | ||
|
||
You 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`. | ||
|
||
## Configuring Gekko | ||
|
||
Once 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: | ||
|
||
config.backtest = { | ||
enabled: true, // set to true to run backtests instead of live monitoring | ||
candleFile: 'candles.csv', // the candles file | ||
from: 0, // optional start timestamp | ||
to: 0 // optional end timestamp | ||
} | ||
|
||
Once configured Gekko will run the backtest instead of watching the live market. It wil use the following configuration items: | ||
|
||
* Everything under `backtest`. | ||
* Everything under `profitCalculator`. | ||
* Everything under `EMA` with the exception of interval, as this will be determined by the candles file. | ||
|
||
## Notes | ||
|
||
* Use the backtesting feature only for testing until the code is stable. | ||
* When there are missing candles Gekko will act as if the whole duration of the missing candle never happened. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.