Warmup period?
#1
Could someone please explain in more detail the purpose of this "warmup period" and how it should be used?

For example, I have downloaded 4 months of backtesting data, 1.1.2017 - 30.4.2017, because I would like to test my method based on M15 candles for 4 months period. But, I also want to make trades only on a positive long term trend, which would be filtered with EMA 960 (=~ EMA 10 on D1 chart).

So, does this mean that I have to set "warmup period" at 960? What happens if I don't?

And does this also mean that the first trades can be taken only after that period is gone, which is about 11.1.2017? Should I set the backtesting period to include the warmup period or not, i.e. should the back tester's start date be 11.1. or 1.1.?
  Reply
#2
Yes, the warmup is the time the indicators need to be operational.
so for an EMA 960, you need a 960 warmup.

During the warmup phase, only the update strat function is called.
After the warmup, both the update and the check functions are called.

If you don't set this period, the check method will use an indicator that is not correctly initialized. In the best case, it will return a value partially ok. In the worst case, it will return garbage.

Last point, for paper trading / live trading, the warmup will use history data ONLY in command line, not in the UI.
This is a known limitation that the next version will tackle.

Manu
  Reply
#3
So if I start with a RSI_BULL_BEAR_ADX with long 400 it needs 400 of warmup (around 3 days with 10min candles). When I start with UI it does not calculate right in the first days, but then it works? Is there a way to start by commandline and track by UI?
  Reply
#4
Thank you very much ManuManu! Smile

But what do you exactly mean by tuis:

(04-01-2018, 07:08 PM)ManuManu Wrote: Last point, for paper trading / live trading, the warmup will use history data ONLY in command line, not in the UI.
This is a known limitation that the next version will tackle.

If I start the live trader from UI and I'm using EMA 960, what should I do to make things right?

And, how about this question of mine; "Should I set the backtesting period to include the warmup period or not, i.e. should the back tester's start date be 11.1. or 1.1.?", when using EMA 960 on M15 candles?
  Reply
#5
Could anyone help with this? Does this mean If I start a live trader with EMA 960, Gekko will not make valid trades before that 960 candles have been gone, or what?? :-o
  Reply
#6
(04-07-2018, 01:04 PM)jasurakk Wrote: Could anyone help with this? Does this mean If I start a live trader with EMA 960, Gekko will not make valid trades before that 960 candles have been gone, or what?? :-o

Yes, in the UI gekko will wait for 960 candles  (10 days @ M15) before it starts trading. If you launch the trader through CLI and have the required candles downloaded in history, it will use those for the required history and start giving advice immediately.
  Reply
#7
Oh my, that's quite a show-stopper for using Gekko's UI overall. Luckily CLI can go over that issue, though.

But just to be sure; did I understand correctly that even the CLI- does not download the needed history automatically when started, it must downloaded manually before starting the CLI?

And what happens if I the CLI dies for some reason, and I re-start it again after few days? Do I again need to manually download that few days' history before starting, or can Gekko handle it somehow? Would it be possible to do some sort of a script which always downloads the needed history, before starting the CLI?
  Reply
#8
It is the main reason I don't use the UI, but it is being worked on.

You do need to manually download history data for your strategy on first start (I use the UI for that). In the CLI config file, if you set the candleWriter enbled to true, it writes all history to the database as it goes, so it can restart at any point.
  Reply
#9
Ok, thanks Gryphon!

Does it actually matter which exchange I download the history from? I mean; do the history need to be from the same exchange where I'm trading at, or can it be from anywhere, as long as the pair is same?
  Reply
#10
Is there a way to increase the maximum warmup period gekko can handel? I need to allow 42750 candels.. (M1) for my long SMA, But gekko seems to only be able to handel smaller historys
  Reply


Forum Jump:


Users browsing this thread: