[TUT] Backtesting with gekkoga
#51
(11-10-2018, 04:16 PM)Gryphon Wrote: 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

Thanks for the tip. That is similar to what I was thinking.
Aiming for a strat that is not in for a long time and essentially scalps on shorter time frames 4-8 times a day. 
I started out like many around March thinking there was a dip. Boy was I wrong! My capital is not what is once was. Wink
  Reply
#52
(11-10-2018, 10:15 AM)dray01 Wrote: 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

Im using it like this:
 threshold_buy: randomExt.float(1.20,0.40).toFixed(2),
  threshold_sell: randomExt.float(-0.50,-1.00).toFixed(2),
  Reply
#53
With that approach, the random library sees millions of steps between your limits as it generates values to a very high resolution. I.e. it might generate 0.00000001, 0.0000002, 0.0000003 etc, all of which .toFixed will evaluate to 0, which means lots of passes will be run with exactly the same settings. Generating an integer and dividing has the effect of defining the resolution.
  Reply
#54
Sorry j'm trying to run Gekkoga but j have the follow error after a few seconds from the start:

xxx POST /api/backtest 500 855ms -
Error: non-error thrown: [object Object]
at Object.onerror (/home/paolo/gekko/node_modules/koa/lib/context.js:105:40)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:189:7)

Someone can help me ??

Thanks
  Reply
#55
Thanks for the tut, I found it easy to follow and works great!

I was wondering how gekkoga goes about when adding multiple candle times. Combined with the history, wouldn't that result in different warmup-times and therefore different periods over which profits are calculated? E.g. I have two different strats running at this moment with gekkoga, each has the same endPrice, but different startPrices since the candles differ. How does that work within testing one strategy?

I also like the csv's that come as a result from e.g. gekko-batcher, showing all the results (or top 20 or so) of each parameter set for the strategy. Is something like this also possible?

Lastly, for now ( ;-) ) is there way to see the %winning trades, biggest win, biggest lost, etc. for a parameter set for a strategy?

Thanks for all the info so far!
  Reply


Forum Jump:


Users browsing this thread: