BacktestTool - batch backtest, import and strategy parameters optimalization
#8
To make the program's idea easier to understand I have expanded README.

Available commands:
Code:
usage: perl backtest.pl
To run backtests machine

usage: perl backtest.pl [parameter] [optional parameter]
Parameters:
 -i, --import     - Import new datasets
 -g, --paper     - Start multiple sessions of PaperTrader
 -v, --convert     - Convert TOML file to Gekko's CLI config format, ex: backtest.pl -v MACD.toml
 
Optional parameters:
 -c, --config         - BacktestTool config file. Default is backtest-config.pl
 -s, --strat STRATEGY_NAME - Define strategies for backtests. You can add multiple strategies seperated by commas example: backtest.pl --strat=MACD,CCI
 -p, --pair PAIR     - Define pairs to backtest in exchange:currency:asset format ex: backtest.pl --p bitfinex:USD:AVT. You can add multiple pairs seperated by commas.
 -p exchange:ALL     - Perform action on all available pairs. Other usage: exchange:USD:ALL to perform action for all USD pairs.
 -n, --candle CANDLE     - Define candleSize and warmup period for backtest in candleSize:warmup format, ex: backtest.pl -n 5:144,10:73. You can add multiple values seperated by commas.
 -f, --from
 -f last        - Start import from last candle available in DB. If pair not exist in DB then start from 24h ago.
 -t, --to         - Time range for backtest datasets or import. Example: backtest.pl --from="2018-01-01 09:10" --to="2018-01-05 12:23"
 -t now        - 'now' is current time in GMT.
 -o, --output FILENAME - CSV file name.

Example usage:
Backtests of all available pairs for Binance Exchange in Gekko's scan datarange mode:
Code:
$ perl backtest.pl -p binance:ALL

Backtest on all pairs and strategies defined in backtest-config.pl with candles 5, 10, 20, 40 and 12 hours warmup period:
Code:
$ perl backtest.pl -n 5:144,10:73,20:36,40:15

Import all new candles for all BNB pairs:
Code:
$ perl backtest.pl -i -p binance:BNB:ALL -f last -t now

Import all candles for pairs defined in backtest-config.pl from 2017-01-02 to now:
Code:
$ perl backtest.pl -i -f 2017-01-02 -t now

New features:
Code:
- price *volality* (based on relative standard deviation) in CSV output
- sum of *volume* and *volume/day* for dataset period in CSV output
- sum of *overall exchange trades* and sum of *overall trades/day* for dataset period in CSV output
- if pair not exist in DB on parameter `-f last` then create table and import from last 24 hours.
- update parameter `--help`
- README update
- some code clean
- some fixes

Sample backtest output
https://github.com/xFFFFF/Gekko-Backtest...output.csv
My projects [Strategies] [Datasets]
  Reply


Messages In This Thread
RE: Gekko backtest tool - by PapoKarlo - 03-20-2018, 05:39 PM
RE: Gekko backtest tool - by CryptoCoeus - 09-22-2018, 02:08 PM
RE: BacktestTool - batch backtest, import or paperTrader on single run - by xFFFFF - 04-10-2018, 07:36 PM
0.00 Profit - by danibeni81 - 08-19-2018, 07:55 PM

Forum Jump:


Users browsing this thread: