Backtest multiple date ranges with GekkoGA
#1
Hello,

I'd like to be able to have gekkoga do multiple date-ranges like it does multiple parameters for other parts of the config; i.e. I imagine it would be done like this (and maybe it already can do this and I'm just not doing it right? let me know):
Instead of this:
Code:
daterange: {
  from: '2018-02-13 05:54:00',
  to: ' 2018-02-25 04:12:00'
  },
Do this:

Code:
daterange: {
  from: ('2018-02-13 05:54:00', '2018-02-13 05:56:00', '2018-02-13 05:58:00', '2018-02-13 06:01'),
  to: ' 2018-02-25 04:12:00'
  },

It might look pointless, but I think sometimes the difference between a bot started at 5:04pm and a bot started at 5:08pm can be huge, and that by backtesting like this, you could determine where the "starting points" are that work well for your strategy for a given data set. It might be that your strategy always does better when started right on the hour, or 11 minutes after the hour, or 16 minutes after the hour, etc. -- I think that it's totally possible that "lining it up" by checking different start times could make a huge difference in performance.

What do you guys think?

Attached photo is two bots with identical config, 11 minute candles, one performing better than the other, seems to have caught the right cycle, while the other one missed the timing, and so took bigger losses. One started just a few minutes before the other.


Attached Files
.png   Screenshot_2018-05-16_16-30-15.png (Size: 292.93 KB / Downloads: 9)
  Reply
#2
So, my initial thought was that if a bot is not resilient enough to handle being started at any particular moment, that it was a failing of the strategy or configuration of the parameters, and that if you were to find a config that works great but only if started at just the right moment, that your config would fail, being too carefully fit to the backdata.

But after thinking about it a while, and looking at the two live trade bots and their performance, compared with backtest data, I've begun to suspect that it's possible that even a very good strategy may fail simply due to being started during the wrong minute, resulting in the wrong candles, preventing the strategy from being profitable.

Really looking forward to hearing more input on this.
  Reply
#3
Here is a series of backtests, each 1 minute apart in start time. I left the end-time the same for all of them, and the rest of the config the same for all of them. It's tommie's rsi bull bear adx strat.

Looking at these more closely actually made me feel that this is less of an issue. Sure, there are some outliers, but it seems like most of the trades happen approximately in the same places, even when you change the start time by one minute.

However there are discrepancies, as you can see.

Any guidance on making a strategy more likely to give the same results if started at 5:01pm or at 5:03pm? I'd imagine there should be some way to conceptualize and design it such that it won't care if it is starting at 5:01 or 5:03. On the other hand, I can't wrap my head quite around it; it would seem that the series of 11 minute candles starting at 5:01pm would be a whole different set of 11 minute candles than a series starting at 5:03pm.

Please, feedback, thoughts, ideas!

.png   1.png (Size: 107.31 KB / Downloads: 17)

.png   2.png (Size: 107.66 KB / Downloads: 15)

.png   3.png (Size: 106.32 KB / Downloads: 12)

.png   4.png (Size: 106.19 KB / Downloads: 11)

.png   5.png (Size: 105.4 KB / Downloads: 13)
  Reply
#4
I pretty new at this, but I start all my back test on 00:00. Meaning if I was testing on 2hr strategy. I set it 2018-03-04 00:00. If I don't, like you said the results are not the same.

I'm having trouble that the indicators data output... its not the same in other environments. For example, if I look at the cci in trade view or yahoo finance they are the same, but the gekko data is different. I don't understand why. Thoughts?
  Reply
#5
New version BacktestTool support multiple periods if You like Smile
My projects [Strategies] [Datasets]
  Reply
#6
If I look at data in your tool is the output the indicators (i.e. BB, CCI, RSI, SMA, etc...) going to produce the same data output as the other platforms (i.e. tradeview, yahoo finance, etc...)?
  Reply
#7
(05-17-2018, 10:09 PM)gkendrick Wrote: If I look at data in your tool is the output the indicators (i.e. BB, CCI, RSI, SMA, etc...) going to produce the same data output as the other platforms (i.e. tradeview, yahoo finance, etc...)?

The equation in bb.js is wrong for the Bollinger Band in the default system, so I fixed it myself.
  Reply
#8
(05-19-2018, 05:12 PM)gkendrick Wrote:
(05-17-2018, 10:09 PM)gkendrick Wrote: If I look at data in your tool is the output the indicators (i.e. BB, CCI, RSI, SMA, etc...) going to produce the same data output as the other platforms (i.e. tradeview, yahoo finance, etc...)?

The equation in bb.js is wrong for the Bollinger Band in the default system, so I fixed it myself.

CORRECTION: In my previous post I said that the Bollinger Band was a part of the default system (i.e. install), it is not.

I was having overall problems because I didn't adjust the warm-up period correctly when I was using smaller time frames.
  Reply


Forum Jump:


Users browsing this thread: