nick-dolan / gekko-batcher

Batch backtest tool for Gekko.
MIT License
36 stars 15 forks source link
backtesting gekko trading

Backtest tools for Gekko

CLI tool helps to put together testing and optimizing strategies that extend the Gekko's Trading Bot capabilities – and thus you may get the most of it, and see what combinations were the best and the worst backed up by statistics.

The results appear in a CSV report file. It provides key statistics describing the overall performance of the selected strategies over the chosen historical timing of the simulation.

It uses Gekko's API, one gekko instance running required only.

Tools

You can set up multiple…

Strategies / Trading Pairs / Candle sizes / History sizes / Dateranges / Range of strategy config's parameters (BruteForce)

Features

Requirements

Before start

In Gekko's folder

  1. npm install – first, you need to install dependencies.
  2. Download all candles data you need via the importer.
  3. node gekko --ui – start Gekko in ui mod.
  4. cp sample-config.js config.js – just copy sample-config.js like this. Strategy settings will be taken from here.

Additional:

Increase server.timeout at /gekko/web/server.js to avoid a timeout error if the strategy runs for a long time. For example, this happens for small sized candles.

In Batcher's folder

  1. npm install
  2. cp sample-config.js config.js – don't forget to create config file as well.
  3. Set up everything you need in config.js and you are ready to go.

Start

After all the above you can start tools by running one of the following in your terminal:

node batch -c config.js – to start Batcher

node bruteforce -c config.js – to start Bruteforce

node import -c config.js – to start Importer


You can find results in the results folder after backtests. Take a look of Sample file output

:movie_camera: Gekko Trading Bot - Gekko Batcher - YouTube – watch a video review of these tools.

:spiral_notepad: [RU] Gekko-batcher — тестирование и оптимизация торговых стратегий


Contributing

Forks and stars are highly welcome.

For bugs and feature requests, please create an issue.