1 registered members (AndrewAMD),
1,507
guests, and 12
spiders. |
Key:
Admin,
Global Mod,
Mod
|
|
|
Interpreting various WFO results
#436876
02/04/14 18:07
02/04/14 18:07
|
Joined: Jan 2013
Posts: 68
ibra
OP
Junior Member
|
OP
Junior Member
Joined: Jan 2013
Posts: 68
|
Hi, I'm looking for your opinions/thoughts regarding a strategy that I've been coding. Actually, it's the WFO results that I have questions about. The code:
function run()
{
Hedge = 2;
set(PARAMETERS);
NumWFOCycles = 5;
BarPeriod = 60;
StartDate = 20020101;
EndDate = 20130101;
var TimeCycle = optimize(1000,500,1500,50,0);
var TimeFactor = optimize (2, 1, 3, 0.2, 0);
vars Pris = series(priceClose());
vars LP1 = series(LowPass(Pris, TimeCycle));
vars LP2 = series(LowPass(Pris, TimeFactor*TimeCycle));
vars Signal = series(0);
Stop = optimize(2,1,3,0.1,0) *ATR(50);
Trail = optimize(100,75,125,5,0) *PIP;
var NumSignal = 60;
if (NumOpenLong == 0 && LP1[0] > LP2[0] && (rising(LP1)))
{
if(Sum(Signal+1,NumSignal) == 0)
if(enterLong())
Signal[0] = 1;
}
else if (NumOpenShort == 0 && LP1[0] < LP2[0] && (falling(LP1)))
{
if(Sum(Signal+1,NumSignal) == 0)
if(enterShort())
Signal[0] = 1;
}
plot ("LP1", LP1[0], 0, BLUE);
plot ("LP2", LP2[0], 0, RED);
PlotWidth = 600;
PlotHeight1 = 300;
}
I deeply appreciate any comments/improvements of my coding. Regarding the WFO: If I use the code above, I get the following results: http://sv.tinypic.com/view.php?pic=2untsp3&s=8#.UvEpwvl5NVU Which looks kinda neat... But I've tested it with other settings. For example, I did change the EndDate to 20140101 instead of 20130101. And the results of this was quite amazing(or not so amazing): http://sv.tinypic.com/view.php?pic=i2t05g&s=8#.UvEqSfl5NVU So, can anyone enlight me how come the difference is that palpable? Also, the result varies kinda much when I use more WFO cycles, for example. Last, I've checked in the manual but I don't really understand what the error factor(right next to Ulker index) is telling me, so if someone could tell me, that would be kind. Thank you!
|
|
|
Re: Interpreting various WFO results
[Re: ibra]
#436880
02/04/14 21:43
02/04/14 21:43
|
Joined: Jul 2013
Posts: 522
dusktrader
User
|
User
Joined: Jul 2013
Posts: 522
|
Make sure you re-Train after you add the additional data. That could definitely cause an issue if you just pressed Test without a new Train. Also, I am a big fan of oversampling, which might help your situation. The timing of the trades (ie, which bar you enter) could vary between simulation and real life, so oversampling tests a variety of "starting points" and then uses the average. This helps confirm that it is your logic eeking-out the edge, and not just luck. The theory is that doing this would give you a more accurate simulation. To try oversampling, add a line like this:
if(is(TESTMODE)) NumSampleCycles = 5; //oversampling on Test only, not Train
I too have noticed that varying the NumWFOCycles can sometimes cause dramatic differences. I think there is no one-size-fits all correct setting. If your logic requires more frequent parameter optimization, then you would want to have more WFO cycles. In my current strategy that I'm building, I am now testing the WFO cycles and determining which slicing is best. It would be different for each logic I think, and trying to philosophically say "it should be X" or "should be Y" seems wrong. I rather just let the data speak to me. The error factor is a statistical measure that goes down as your # of trades increase.
|
|
|
Re: Interpreting various WFO results
[Re: dusktrader]
#437979
03/04/14 05:06
03/04/14 05:06
|
Joined: Sep 2013
Posts: 73
Mangal
Junior Member
|
Junior Member
Joined: Sep 2013
Posts: 73
|
I would sugest you try it in three different periods of time. For instante, for EURUSD from April 94 till October 2000 when it was a downward period, from October 2000 till june 2008 when it was an upward period and from Auguts 2008 till jan 2014 when it has had more or less a lateral movement period.
For what JCL is telling in similar question, make sure you get 50-100 trades at least for each degree of freedom when you do the WFO. In your case you have 4 degrees of freedom to optimize, so after WFO you should have 400 trades for the system to be reliable. May be you can try to increase the number of cycles to increase the number of trades.
Also, closer to the present date, better. That is, he says that a system has 5 years lifetime. Though, I am not giving up the search for the holy grail...a system that works similarly in all periods of time, either up, down or lateral movement.
|
|
|
|