[TUT] Backtesting with gekkoga
#41
Hard to tell without any more details, but as of version 0.6 gekko changed the backtesting API, and as far as I'm aware gekkoga hasn't been updated to match. Probably best to try GAB or japonicus (if I've spelt that right...)
  Reply
#42
(08-29-2018, 08:31 PM)Gryphon Wrote: Hard to tell without any more details, but as of version 0.6 gekko changed the backtesting API, and as far as I'm aware gekkoga hasn't been updated to match. Probably best to try GAB or japonicus (if I've spelt that right...)

Thank you very much for the help anyway!!!
  Reply
#43
(08-29-2018, 08:31 PM)Gryphon Wrote: Hard to tell without any more details, but as of version 0.6 gekko changed the backtesting API, and as far as I'm aware gekkoga hasn't been updated to match. Probably best to try GAB or japonicus (if I've spelt that right...)

I believe the same. I am having the following error when i run gekkoga with gekko 0.6
Code:
uncaughtException TypeError: Cannot read property 'exchange' of undefined
  Reply
#44
Yep, that looks like the same issue.

I have since realised that there is an unmerged pull request that seems to have updated gekkoga for 0.6. I haven't tested it, but it's here: https://github.com/gekkowarez/gekkoga/pull/49
  Reply
#45
Hey guys, ive recently installed the patch and this seems to work but i can only get it to work on the MACD strat (to make sure its working). Im trying to use the RSI BULL BEAR ADX strat however Gryphon's previous code on here doesnt seem to work and unfortunately i cant find anything on the gekkoga thread that seems to point me in the right direction, is anyone able to help???
  Reply
#46
(09-14-2018, 04:33 PM)Borrismorris Wrote: Hey guys, ive recently installed the patch and this seems to work but i can only get it to work on the MACD strat (to make sure its working). Im trying to use the RSI BULL BEAR ADX strat however Gryphon's previous code on here doesnt seem to work and unfortunately i cant find anything on the gekkoga thread that seems to point me in the right direction, is anyone able to help???

you need to get your parameters exports the settings to the RSI_BULL_BEAR_ADX as it is explained in the update of tommiehansen.. 
I think you just need sthing like this: 
getProperties: () => ({
 
    candleSize: 5,
    historySize: 350,
      
    // SMA Trends
SMA: {
    long: randomExt.integer(500,200),
short: randomExt.integer(50,15),
    },
    
    

// BULL
    BULL: {
    rsi: randomExt.integer(85,10),
high: randomExt.integer(90,60),
low: randomExt.integer(60,30),
    mod_high: randomExt.integer(20,0),
    mod_low: randomExt.integer(0,-20), 
    },


// BEAR
    BEAR: {
    rsi: randomExt.integer(85,10),
high: randomExt.integer(60,40),
low: randomExt.integer(50,15),
    mod_high: randomExt.integer(25,0),
    mod_low: randomExt.integer(0,-25), 
    },


//ADX
    ADX: {
  adx: randomExt.integer(21,2),
high: randomExt.integer(70,40),
low: randomExt.integer(45,20),       
    },
 })
  Reply
#47
HI guys,

Firstly this might help someone. https://github.com/valentinbercot/gekkoga works against the Gekko 0.6* api. Thanks valentinbercot for updating the API configuration.

Secondly, hoping someone can help me. I would like to run gekkoga against NNv2 strat. I have loaded it all up and it works fine BUT the strat needs to use decimal places. Just 2 really. When using randomExt.float it defaults to 0.0000000000000000 meaning that GA will have to run perhaps millions more tests.
I tested randomExt.floatArray with 2 as the length but this messed up the outputs in gekkoga.

Is there a way in js to limit the decimal places?
I can fallback to integer but my results will not be as accurate as I would like.

Thanks!

BD
  Reply
#48
Thanks for sharing the link.

Best way I've found to do fixed point floats is generate an integer 10 or 100 times the value you need and then divide to bring it back down. I.e randomExt.integer(100, 50)/100, will give 1 to 0.5 in 0.01 steps.
  Reply
#49
(11-10-2018, 10:48 AM)Gryphon Wrote: Thanks for sharing the link.

Best way I've found to do fixed point floats is generate an integer 10 or 100 times the value you need and then divide to bring it back down. I.e randomExt.integer(100, 50)/100, will give 1 to 0.5 in 0.01 steps.

Oh nice!
Thanks Gyphon.
Never been much of a coder but now I'm motivated to learn Smile

BD
  Reply
#50
You're welcome - and coding is a great skill to have.

Just don't get too sucked into the results that gekkoga can give you. Strategies that generate lots of profit through hundreds of trades a day don't work in live as the order can't be filled quickly enough, and strategies that generate massive trades in backtests by hitting tops and bottoms of each peak perfectly are generally not good in live as the market is very unlikely to repeat itself.

Sacrificing overall backtest proft for a good percentage of +ve round trips, low drawdowns and good sharpe ratio will often give a far better performance in live trading - but nothing is guaranteed Smile
  Reply


Forum Jump:


Users browsing this thread: