GekkoGA on "Bestone" strategy
#1
Hey there, 

recently I was experimenting with tulip-indicators and discovered some challenges. As I want to become more familiar with tulip, I focused on the "Bestone" strategy from here: link

As usual, results of standard settings are quite poor, so I want to perform gekkoga on it to improve. Now I am facing problems creating the correct gekkoga-config-file. Receiving error messages all the time, when starting gekkoga (Bestone strategy itself is running fine via gekko UI). 

Has anyone succeeded using gekkoga on Bestone strategy? Would be nice to share the gekkoga config file. There is something I am missing...

Cheers

edit:
I assume to have a mistake in assigning the "variables" correctly as some of them are named identically ("optInTimePeriod" for EMAshort and EMAlong and RSI). Here is an extract of my gekkoga-config-file for reference... 


candleValues: [10,12,14,16,20,30,40],
  getProperties: () => ({
    // Strat settings must be flattened and cannot be nested for mutation to work properly!

// historySize: randomExt.integer(100, 20),
  historySize: 100,
// historySize: randomExt.integer(6, 1) * 100,

//[MACD]
optInFastPeriod: 12,
optInSlowPeriod: 26,
optInSignalPeriod: 9,

//[EMAshort]
optInTimePeriod: 9,

//[EMAlong]
optInTimePeriod: 21,

//[STOCH]
optInFastKPeriod: 9,
optInSlowKPeriod: 3,
optInSlowKMAType: 1,
optInSlowDPeriod: 3,
optInSlowDMAType: 1,

//[RSI]
optInTimePeriod: 14,

//[thresholds]
RSIhigh: randomExt.integer(85, 65),
RSIlow: randomExt.integer(35, 20),
MACDhigh: 0.0,
MACDlow: 0.0,
persistance: 1,

    candleSize: config.candleValues[randomExt.integer(config.candleValues.length -1, 0)]

  })



(sorry, attachments not allowed...)
  Reply
#2
warning, while GekkoGA seems a sweet ideas, in practice it's not...
I can't help you to configure it, but I can tell you why it's not such a great idea to use it for your settings.

What GekkoGA will give you after backtesting all the different parameter variations, is an overfitted configuration for your backtest range.
Which most certainly will fails with a live run.

So, for your strat settings, I would suggest you to understand what the strat is doing, and figure out reasonable values for the parameters.

I'm currently using RSI_BULL_BEAR_ADX, and to find the settings, I've ported it to a TradingView script, so I can visualise the effects of the parameters.

Just my two cents
  Reply
#3
Firstly, I agree with loki666 about gekkoga providing overfitted results - putting amazing gekkoga parameters into a live trader doesn't generally return anything near the backtest results. This is especially true if you have the target set to profit - setting it to score (and I've re written the score calculations for mine) can give more realistic parameters.

What I do find it useful for is when you have a lot of configuration parameters it will give you a good guide. From there you need to look at the strategy on tradingview or similar and adjust it to be more general.

As for your issue, gekkoga can't work with nested variables - each of the [bracketed] lines represents an array, and you have parameters of the same name inside different arrays. You need to go into the strategy , remove the arrays and give each parameter a unique name.

For instance you have
[EMAshort]
optInTimePeriod = 9

This will be passed as the array into the EMA constructor in the strategy file as this.settings.EMAshort

You need to alter the TOML file to give it a unique name outside an array - something like:
EMAShortOptInTimePeriod = 9

Then in the strategy where previously the settings.EMAshort array was passed in, now replace it with { optInTimePeriod : this.settings.EMAShortOptInTimePeriod }

It is a bit of a faff to swap it all over - the arrays make everything far neater and we need to make it messy to work with gekkoga!
  Reply


Forum Jump:


Users browsing this thread: