[TUT] Backtesting with gekkoga
#21
(03-01-2018, 08:55 PM)Gryphon Wrote:
(03-01-2018, 06:25 PM)FeRm00 Wrote: First of all, thank so much for your great job!!! Also a great tutorail!!

I'm having a problem, Im not able to solve when I start running gekkoga about "Error:  socket hang up"

I paste a picture with the error. Any idea?

https://prnt.sc/ilicks

Thanks!

You're welcome Smile I think that error might be the timeout on gekko... another bit I missed from the first post! I'll add it now.

If you open gekko/web/vue/UIConfig.js you'll see the timeout setting. If the backtest takes longer than this period you'll get the socket freeze. I have set mine to 480000 which is 8 minutes.

Now it's working perfectly!!! Thanks!!!

Is there a way to know how many the loops remaining to finish the simulation?

---> I answer my question, the number of combinations is really huge with 8 parameters with a 20 possibilities per combination: 20^8 and I'm not keeping in mind all the posibilities for example on the strategy RSI_BULL_BEAR_ADX...
  Reply
#22
gekkoga doesn't take a brute force approach - nowhere near 20^8 combinations will be ran before an good solution is found. However you will never know when the best solution has been found, so gekkoga will loop forever until you kill it, always looking for a better solution. The top solution that it's found is always stored in the gekkoga/results folder.

So far I've found that after 500-800 epochs it takes a loooooong time to find any further improvements.
  Reply
#23
Many thanks for your detailed TUT. it is very helpful for us.

By the way, do you change the parameters of Gekkoga itself? (just like belowSmile
I was wondering if those parameters would impact the result? Thanks for your sharing in advance.

// Population size, better reduce this for larger data
populationAmt: 20,

// How many completely new units will be added to the population (populationAmt * variation must be a whole number!!)
variation: 0.5,

// How many components maximum to mutate at once
mutateElements: 7,

// How many parallel queries to run at once
parallelqueries: 8,
  Reply
#24
I'll admit I haven't played around with those parameters too much...

Population amount is the number of individual tests to do per backtest.

Each epoch, a number of totally new, random parameter sets are added - this is defined by variation * population amount.

The rest of the parameter sets are generated by mutating a few of the parameters from the best set yet. Mutate Elements set the maximum number to be changed at once.

Parallel Queries is simply how many backtests it runs in parallel.

For efficiency it is probably best to set parallel queries equal to the  number of cores in your computer, and potentially to make population size a multiple of parallel queries so that you can always run as many queries as you have cores - however as backtests take different amounts of time depending on the candle size, there will always be a case when the CUP utilisation drops off towards the end of each epoch.
  Reply
#25
Thank you very much for this forum! It's very useful.

The problem is that I tried several configurations both installing gekko on windows and on windows with bash on windows 10 (with ubuntu app), but it doesn't work. Never, ever! I'm exhausted  Sad

I fellow all your instructions, but after installing Gekko and Gekkoga, and after launching both of them, I receive always the same errors.
For example, using windows, I receive these errors: "TypeError: Cannot read property 'long' of undefined" in Gekko and "StatusCodeError: 500 - Internal Server Error" in Gekkoga

Can you tell me if something changes in Gekko, Gekkoga or in your file configuration?

Can you make a guide step by step about the complete installation on Windows, in order to be sure to launch Gekkoga without any error?  Angel

I'm looking forward to hearing from you soon.

Thank you so much!

Luke
  Reply
#26
Luke, first of all you should make only Gekko run succesfully. Once you do it, try to use gekkoga.

Gryphon's config has a little typo at:
stratName: 'RSI_Bull_Bear_Adx',

It shoud be "RSI_BULL_BEAR_ADX".

Remembering that if are using gekko/gekkoga/gekko_tools latest version you should update getProperties according to the new TOML.
  Reply
#27
Guys, I've running gekkoga with RSI_BULL_BEAR_ADX for days, and never got a positive profit.

How can I optimize the randomExt limits?

I'm using the same as recommended by Gryphon.

Code:
historySize: 1300, // max possible SMA_long

   SMA_long: randomExt.integer(27, 10) * 50, // From 1300 to 500 in steps of 50
   SMA_short: randomExt.integer(60, 40),

   BULL_RSI: randomExt.integer(13, 7),
   BULL_RSI_high: randomExt.integer(85, 70),
   BULL_RSI_low: randomExt.integer(65, 40),

   BEAR_RSI: randomExt.integer(20, 10),
   BEAR_RSI_high: randomExt.integer(60, 40),
   BEAR_RSI_low: randomExt.integer(30, 10),

   ADX: randomExt.integer(5, 2),
   ADX_high: randomExt.integer(80, 60),
   ADX_low: randomExt.integer(60, 40),
  Reply
#28
(04-03-2018, 10:01 PM)Ualas Wrote: Guys, I've running gekkoga with RSI_BULL_BEAR_ADX for days, and never got a positive profit.

How can I optimize the randomExt limits?

I'm using the same as recommended by Gryphon.

That's surprising - I've found Tommie's strategy can pretty much always give a profitable outcome on gekkoga backtests, often with poor sharpe ratios though!

What data set and candle sizes are you running it at?

Also, to double check the settings from gekkoga are making it into gekko, add a log.debug in the init function of the strategy and print out all of the parameters to the console. If a few are coming out as undefined that could explain it.
  Reply
#29
Code:
log.debug(+this.settings.SMA.long );
log.debug(+this.settings.SMA.short);
log.debug(+this.settings.BULL.rsi );
log.debug(+this.settings.BEAR.rsi );
log.debug(+this.settings.ADX.adx );
log.debug(+this.BULL_MOD_high );
log.debug(+this.BULL_MOD_low );
log.debug(+this.BEAR_MOD_high );
log.debug(+this.BEAR_MOD_low );
log.debug(+this.settings.BEAR.high );
log.debug(+this.settings.BEAR.low);
log.debug(+this.settings.BULL.high );
log.debug(+this.settings.BULL.low);
log.debug(+this.settings.ADX.high );
log.debug(+this.settings.ADX.low);

All of the parameters are being populated ;(

      from: '2018-03-05 00:12',
      to: '2018-04-05 00:12'
  candleValues: [9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25],

Any ideas?

EDIT

Code:
        log.debug(+this.indicators.maSlow.result );
        log.debug(+this.indicators.maFast.result );
        log.debug(+this.indicators.BULL_RSI.result );
        log.debug(+this.indicators.BEAR_RSI.result );
        log.debug(+this.indicators.ADX.result );

I've tried this way and i'm getting zero for all of them. Whats could be wrong?
  Reply
#30
Ah, so it's the strategy indicators rather than gekkoga. Have you installed the extra indicators from Gab0 that Tommie uses in his update strategy? See 'Instructions for use' update here: https://forum.gekko.wizb.it/thread-100.html

As a seperate test, does the strategy give any results run from the UI? If it is the indicators failing I imagine it won't...
  Reply


Forum Jump:


Users browsing this thread: