Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by dr_panther. 05/18/24 11:01
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (7th_zorro, dr_panther), 724 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 5 of 7 1 2 3 4 5 6 7
Re: Z5 [Re: jcl] #437450
02/17/14 11:27
02/17/14 11:27
Joined: Sep 2013
Posts: 73
M
Mangal Offline OP
Junior Member
Mangal  Offline OP
Junior Member
M

Joined: Sep 2013
Posts: 73
When doing backtests, some questions pop up regarding the WFO analysis. Checking the same script in different periods of time I get the following results:

2000-2005, WFO 3 cycles, Anual Return = -58%, nr of trades 55
2000-2005, WFO 10 cycles, Anual Return = 37%, nr of trades 137

Is the result with larger number of trades with 10 cycles rather than with 3 cycles more realiable?

Backtesting the same script through other periods of time:
2005-2010, WFO 3 cycles, AR = 93%, nr of trades 93
2008-2013, WFO 3 cycles, AR = 79%, nr of trades 83.

The results are different depending on the period of time considered. Would that be in backtesting standards a reasonable result?

In the three tested periods of time it gives different results.

Do the Zorro estrategias, Z5, Z12, and so on, have been tested in different periods of time than those one can test by default?

Re: Z5 [Re: Mangal] #437509
02/18/14 17:17
02/18/14 17:17
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, different test periods will produce different results. This also applies to the Z systems, for which the test periods have been selected for best significance. Due to the slow change of markets, the longest possible test period is normally not the best.

Re: Z5 [Re: jcl] #437527
02/18/14 21:10
02/18/14 21:10
Joined: Sep 2013
Posts: 73
M
Mangal Offline OP
Junior Member
Mangal  Offline OP
Junior Member
M

Joined: Sep 2013
Posts: 73
When you say test periods have been selected for best significance, do you follow some specific rule to select them, like uptrend, downtrend and sideways, or you just consider a 10% aleatory sample of, say, 10 -20 year period?

In physical sciences the rule of 10% sample works reasonable well, though nobody knows why, but I don't know if same rule applies to the market.

Last edited by Mangal; 02/18/14 21:12.
Re: Z5 [Re: Mangal] #437539
02/19/14 07:16
02/19/14 07:16
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
We normally select the test period so that it covers about 50..100 trades per degree of freedom of the strategy. This is an empirical rule - shorter test periods tend to produce less significant results.

There are exceptions, for instance Z4 and Z5 were only tested with data after 2011.

Re: Z5 [Re: jcl] #437599
02/20/14 08:36
02/20/14 08:36
Joined: Sep 2013
Posts: 73
M
Mangal Offline OP
Junior Member
Mangal  Offline OP
Junior Member
M

Joined: Sep 2013
Posts: 73
The fact that the backtests are based on WFO analysis, if one develops an strategy which results are based on the results obtained in recent period backwards, then one has to keep on optimizing it every certain period of time, say every month or couple of weeks, right? Though in Z5 this is not necessary as you were mentioning somewhere.

Would you advice to keep on optimizing a particular script every certain period of time or rather any number of 50-100 trades backwards for degree of freedom?

This brings the question also that better keep changing the script every certain period of time?. Some particular script adapts better in the inmediate 5 years back than in the 5 years old back in the past. For instante, in one script I get with 10 cycles WFO:

2000-2005, AR = 4 % , nr trades 193 for two degrees of freedom
2005-2010, AR = 191 %, nr trades 313
2008-2013, AR = 77 %, nr trades 282

As far as I understand, if a script doesn't consider the trend and it behaves in a similar way in an upward, downward and sideways period, then it gives more confidence. Other reasons, like periods of less volatility may be also behind the different behaviour.

Last edited by Mangal; 02/20/14 08:58.
Re: Z5 [Re: Mangal] #437654
02/21/14 09:31
02/21/14 09:31
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
200 trades should be ok for 2 DOF, so the WFO period is good. Re-optimization should happen in the same time interval as the WFO test period. It can happen that a system does not work on old data, due to the change of markets. For the same reason, very long simulation periods, such as 15 or 25 years, make not much sense. The lifetime of a system is normally in the 5 years range.

Re: Z5 [Re: jcl] #437688
02/23/14 02:05
02/23/14 02:05
Joined: Sep 2013
Posts: 73
M
Mangal Offline OP
Junior Member
Mangal  Offline OP
Junior Member
M

Joined: Sep 2013
Posts: 73
Thank you, Jcl.

One question I have is regarding the function ExitTime = 1. Does it close the position at the Close of the present Bar?

Re: Z5 [Re: Mangal] #437724
02/24/14 14:29
02/24/14 14:29
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
No, at the Open of the next bar AFAIK.

Re: Z5 [Re: jcl] #437754
02/25/14 02:07
02/25/14 02:07
Joined: Sep 2013
Posts: 73
M
Mangal Offline OP
Junior Member
Mangal  Offline OP
Junior Member
M

Joined: Sep 2013
Posts: 73
There is something that escapes to my understanding here. Supose you take the following script:

function run()
{
BarPeriod = 1440;

vars A1 = series(priceClose(2));
vars A2 = series(priceClose(1));
vars A3 = series(price(0));
//Vlr = 10*PIP


if (A1[0] < A2[0] and A3[0] < A1[0]) enterLong();
if (A1[0] > A2[0] and A3[0] > A1[0]) enterShort();

//Stop = 30*PIP;
//TakeProfit = 500*PIP;
ExitTime = 1;

}

It gives the following results:

A1,A2,A3 compiling................
Error 055: EUR/USD 2014 price history missing
BackTest: A1,A2,A3 EUR/USD 2009..2014
Profit -33$ MI -1$ DD 33$ Capital 32$
Trades 176 Win 0% Avg -2.4p Bars 2
AR -26% PF 0.00 SR -8.92 UI 0.0% Error 64%


As you can see there is Win 0% and this can not be. If it really would close at the Close of present bar or Open of next bar, there should be some % of win. It could be small but not 0%.

So ExitTime = 1, I don't know exactly where it closes the open position. Or the entry point doesn't happen exactly at the moment indicated in the script. Any light about this?

Last edited by Mangal; 02/25/14 02:25.
Re: Z5 [Re: Mangal] #437784
02/26/14 07:21
02/26/14 07:21
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Well, from what I've learned, a trade is a loser when its profit is negative, or does not cover its costs.

If you don't understand why your trades are losing, just examine the trade list. There you can see the entrty and exit of every trade, and check why, when, and how much you lost. You should do that anyway all the time while developing a strategy.

Page 5 of 7 1 2 3 4 5 6 7

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1