Gamestudio Links
Zorro Links
Newest Posts
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
Zorro version 3.0 prerelease!
by TipmyPip. 02/24/26 17:09
ZorroGPT
by TipmyPip. 02/23/26 21:52
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (Martin_HH, TipmyPip, AndrewAMD, Grant, USER0328), 5,287 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
eliminate seasonal effects before optimizing a strategy #440068
04/17/14 15:12
04/17/14 15:12
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
This page of Zorro manual says
http://zorro-trader.com/manual/en/numwfocycles

Quote:
The optimal number of WFO cycles depends mainly on the strategy, and to a lesser extent on the simulation period and the time frame. Large time frames or infrequent trading require a small number of WFO cycles for getting enough trades per cycle. Very market-dependent strategies with fast expiring parameters require a high number of WFO cycles. If the strategy performance highly varies with small changes of NumWFOCycles, a periodic seasonal effect is likely the reason. Try to determine and eliminate seasonal effects before optimizing a strategy.


I'm definitely stuck in the midst of this effect now. But, can you please elaborate? What should I try, to detect and eliminate seasonal effects?

Re: eliminate seasonal effects before optimizing a strategy [Re: GPEngine] #440202
04/20/14 09:20
04/20/14 09:20
Joined: Sep 2003
Posts: 934
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 934
You can see seasonal effects with the plot profile functions, but I would not eliminate them, quite the opposite they can be useful for profit. For instance when the strategy makes better profit on Monday than on the rest of the week you could restrict trading to Monday.

Re: eliminate seasonal effects before optimizing a strategy [Re: Spirit] #440343
04/24/14 02:52
04/24/14 02:52
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
Thanks. I will using some indicators that vary based on day of week, month, month of year, etc. Do you think these patterns likely match up with the calendar, or are there distinct effect from more obscure periods, such as every 43 minutes or something?

Re: eliminate seasonal effects before optimizing a strategy [Re: GPEngine] #444197
08/02/14 03:00
08/02/14 03:00
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
I may be speaking too soon, but I'm excited. I think I figured it out.
It involves Spectrum and BandPass.

Re: eliminate seasonal effects before optimizing a strategy [Re: GPEngine] #444303
08/05/14 19:13
08/05/14 19:13
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
Spectrum and Bandpass both "internally create series and thus must be called in a fixed order in the script."

I would like to re-evaluate Spectrum periodically, but not at every bar. This is a costly computation. Spectrum, for one, doesn't change much from one bar to the next. However, if I try to evaluate Bandpass or Spectrum every N bars, I get message about inconsistent series calls.

Is there a way to evaluate the functions once every N bars?

Re: eliminate seasonal effects before optimizing a strategy [Re: GPEngine] #444325
08/06/14 10:31
08/06/14 10:31
Joined: Jul 2000
Posts: 28,075
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,075
Frankfurt
I haven't tried it, but I think you can use the TimeFrame variable and the frame() function for that.

Re: eliminate seasonal effects before optimizing a strategy [Re: jcl] #444340
08/06/14 15:08
08/06/14 15:08
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
Not quite seeing it yet . But I'll play with it.

I'm wondering how Z1 does it.
Do you identify the cycles online within the backtest as it goes along? or offline, in an initial pass through the data?

If the latter, I find that the cycle frequencies identified by Spectrum do not persist outside of the test region (for long). In other words doing an initial pass to identify the cycles breaks the "future data" barrier and leads to great-looking performance that does not generalize.

Last edited by GPEngine; 08/06/14 15:12. Reason: latter
Re: eliminate seasonal effects before optimizing a strategy [Re: GPEngine] #444392
08/08/14 14:04
08/08/14 14:04
Joined: Jul 2000
Posts: 28,075
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 28,075
Frankfurt
In Z1 and Z2 the cycles are identified in real time with the DominantPeriod function. Only the dominant cycle is used.

Re: eliminate seasonal effects before optimizing a strategy [Re: jcl] #444396
08/08/14 14:18
08/08/14 14:18
Joined: Sep 2013
Posts: 504
California
G
GPEngine Offline OP
User
GPEngine  Offline OP
User
G

Joined: Sep 2013
Posts: 504
California
Thank you!

I will go back to trying something less complicated then.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1