xFFFFF / Gekko-BacktestTool

Batch backtest, import and strategy params optimalization for Gekko Trading Bot. With one command you will run any number of backtests.
MIT License
231 stars 85 forks source link

BacktestTool results differ from Gekko UI #55

Open WilbertNL opened 5 years ago

WilbertNL commented 5 years ago

Hi,

I keep getting different results in BacktestTool and the Gekko UI. I cross-checked the value for slippage, fee taker and fee maker, etc. (multiple times): backtest.pl

config.paperTrader = {
  enabled: true,
  reportInCurrency: true,
  simulationBalance: {
    asset: 0,
    currency: 4,
  },
  feeMaker: 0.05,
  feeTaker: 0.05,
  feeUsing: 'maker',
  slippage: 0.5,
}

backtest-config.pl

# Other Gekko's settings for backtest
$asset_c = 0.00662;
$currency_c = 0;
$fee_maker = 0.05;
$fee_taker = 0.05;
$fee_using = 'maker';
$slippage = 0.5;
$riskFreeReturn = 5;
############################# END OF CONFIGURATION #############################

config/plugins/paperTrader.toml

feeMaker = 0.05
feeTaker = 0.05
feeUsing = 'maker'
slippage = 0.5

[simulationBalance]
asset = 0.00662
currency = 0

Even when I change the asset/currency (in the Gekko UI) to correspond with either the backtest.pl or the backtest-config.pl, I still get a different result in de Gekko UI.

This is what I would expect to see:


currency | asset | strategy | profit[%] | profit-market | profit/day[%] | market change[%] | trades/day | wins[%] | best win | median wins | worst loss | median losses | avg HODL[min] | candleSize | historySize | days | dataset from | to | strategy settings | note
-- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --

USDT | BTC | MACD 7\|15\|10\|7 | 13,22 | 6,15 | 0,73 | 7,08 | 2,67 | 43,48 | 9,67 | 1,03 | -4,34 | -0,53 | 545 | 5 | 250 | 18 | 2018-12-19 20:49:00 | 2019-01-07 00:01:00 | long = 15 short = 7 signal = 7 [thresholds] down = -0.025 persistence = 10 up = 0.025 | first run
-- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | --

According to this backtest it would result in 2,67 trades/day (*18 days), so that would be a total of ~48 trades. Gekko UI however produces 173 trades. image image

The only thing I can think of is the riskFreeReturn value, would that be of influence? I tried adding this value in the papertrader, but without any result: image

Any ideas? I guess I must be overlooking something, but I just can't figure out what that might be.. Thanks!

BacktestTool v0.7 Gekko v0.6.8

konstantin-doncov commented 5 years ago

@WilbertNL hello! Have you fixed this issue?