Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, Quad, VoroneTZ, 1 invisible), 623 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: New Zorro version 1.54 [Re: pcz] #464738
03/07/17 18:34
03/07/17 18:34
Joined: Mar 2017
Posts: 23
A
atr Offline
Newbie
atr  Offline
Newbie
A

Joined: Mar 2017
Posts: 23
Originally Posted By: pcz
Maybe it could be the Slippage issue in older Zorro versions? Check this thread: Are all backtest results potentially flawed?

You can try to set the Slippage to 0 and see how the results change.


Thank you for your answer. I set the Slippage to 0 and the results are still the same as before. In Zorro 1.50.6 I got AR 2% - SR 0.05 and in Zorro 1.54.5 I got AR 33% - SR 0.46. Which are the good and reliable results? Those made in Zorro 1.50.6 or those made in Zorro 1.54.5?

I attach the script and results.

Thank you very much.

-----------------------------------------------------------

function run()
{
BarPeriod=60;
Slippage = 0;

vars Price = series(price());
vars Trend = series(LowPass(Price,500));
vars Signals = series(0);

Stop = 4*ATR(100);


vars MMI_Raw = series(MMI(Price,300));
vars MMI_Smooth = series(LowPass(MMI_Raw,500));

if(falling(MMI_Smooth)) {
if(valley(Trend))
enterLong();
else if(peak(Trend))
enterShort();
}
}

***********************************
Test 1-PRU EUR/USD - ZORRO 1.50.6
***********************************

Simulated account AssetsFix
Bar period 1 hour (avg 92 min)
Test period 18.01.2012-27.01.2017 (28550 bars)
Lookback period 300 bars (18 days)
Monte Carlo cycles 200
Simulation mode Realistic (slippage 0.0 sec)
Spread 0.5 pips (roll -0.02/0.01)
Commission 0.60
Contracts per lot 1000.0

Gross win/loss 597$ / -576$ (+246p)
Average profit 4.26$/year, 0.36$/month, 0.02$/day
Max drawdown -205$ 958% (MAE -248$ 1159%)
Total down time 73% (TAE 60%)
Max down time 66 weeks from Apr 2013
Max open margin 30$
Max open risk 24$
Trade volume 201115$ (40010$/year)
Transaction costs -8.19$ spr, -50$ slp, -0.45$ rol, -11$ com
Capital required 188$

Number of trades 188 (38/year, 1/week, 1/day)
Percent winning 18.6%
Max win/loss 88$ / -53$
Avg trade profit 0.11$ 1.3p (+196.0p / -43.2p)
Avg trade slippage -0.27$ -3.1p (+0.0p / -3.8p)
Avg trade bars 105 (+399 / -37)
Max trade bars 1372 (11 weeks)
Time in market 69%
Max open trades 3
Max loss streak 16 (uncorrelated 28)

Annual return 2%
Profit factor 1.04 (PRR 0.80)
Sharpe ratio 0.05
Kelly criterion 0.09
R2 coefficient 0.000
Ulcer index 33.9%

Confidence level AR DDMax Capital

10% 5% 78$ 90$
20% 4% 87$ 97$
30% 4% 100$ 107$
40% 4% 109$ 114$
50% 3% 120$ 122$
60% 3% 134$ 133$
70% 3% 147$ 144$
80% 3% 167$ 159$
90% 2% 194$ 180$
95% 2% 229$ 207$
100% 1% 368$ 314$

Portfolio analysis OptF ProF Win/Loss Wgt%

EUR/USD .007 1.04 35/153 100.0
EUR/USD:L .000 0.48 13/86 -873.3
EUR/USD:S .190 1.98 22/67 973.3

*************************************************************
Test 2-PRU EUR/USD - ZORRO 1.54.5
*************************************************************

Simulated account AssetsFix
Bar period 1 hour (avg 92 min)
Test period 18.01.2012-27.01.2017 (28549 bars)
Lookback period 300 bars (18 days)
Monte Carlo cycles 200
Simulation mode Realistic (slippage 0.0 sec)
Spread 0.5 pips (roll -0.02/0.01)
Commission 0.60
Contracts per lot 1000.0

Gross win/loss 749$ / -520$ (+2632p)
Average profit 46$/year, 3.80$/month, 0.18$/day
Max drawdown -129$ 56% (MAE -160$ 70%)
Total down time 72% (TAE 65%)
Max down time 93 weeks from May 2013
Max open margin 40$
Max open risk 26$
Trade volume 210101$ (41798$/year)
Transaction costs -8.54$ spr, 0.00$ slp, -0.49$ rol, -12$ com
Capital required 139$

Number of trades 196 (39/year, 1/week, 1/day)
Percent winning 20.9%
Max win/loss 88$ / -11$
Avg trade profit 1.17$ 13.4p (+209.8p / -38.5p)
Avg trade slippage 0.00$ 0.0p (+0.0p / -0.0p)
Avg trade bars 114 (+414 / -35)
Max trade bars 1366 (11 weeks)
Time in market 79%
Max open trades 4
Max loss streak 16 (uncorrelated 25)

Annual return 33%
Profit factor 1.44 (PRR 1.13)
Sharpe ratio 0.46
Kelly criterion 0.66
R2 coefficient 0.000
Ulcer index 18.0%

Confidence level AR DDMax Capital

10% 45% 78$ 100$
20% 43% 87$ 107$
30% 41% 93$ 112$
40% 38% 102$ 119$
50% 37% 109$ 124$
60% 35% 119$ 132$
70% 33% 129$ 140$
80% 29% 150$ 156$
90% 25% 180$ 179$
95% 24% 198$ 193$
100% 14% 375$ 329$

Portfolio analysis OptF ProF Win/Loss Wgt%

EUR/USD .091 1.44 41/155 100.0
EUR/USD:L .000 0.98 19/80 -2.1
EUR/USD:S .187 2.01 22/75 102.1

Re: New Zorro version 1.54 [Re: atr] #464740
03/07/17 19:26
03/07/17 19:26
Joined: May 2016
Posts: 180
Prague
pcz Offline
Member
pcz  Offline
Member

Joined: May 2016
Posts: 180
Prague
The weird thing is that even when Slippage is set to 0 there's still this: Avg trade slippage -0.27$ -3.1p (+0.0p / -3.8p) in 1.50.6. It makes part of the difference ($50) but not all of it. Maybe someone else will be able to find the other cause.

Also you can check the trade logs side by side and look where the differences occur.

Re: New Zorro version 1.54 [Re: pcz] #464741
03/07/17 21:07
03/07/17 21:07
Joined: Mar 2017
Posts: 23
A
atr Offline
Newbie
atr  Offline
Newbie
A

Joined: Mar 2017
Posts: 23
Originally Posted By: pcz
The weird thing is that even when Slippage is set to 0 there's still this: Avg trade slippage -0.27$ -3.1p (+0.0p / -3.8p) in 1.50.6. It makes part of the difference ($50) but not all of it. Maybe someone else will be able to find the other cause.

Also you can check the trade logs side by side and look where the differences occur.



Thannk you! I have the same problem with all my strategies. So I'am getting a little bit confused. Maybe someone else will find a solution for this...

Re: New Zorro version 1.54 [Re: atr] #464749
03/08/17 12:23
03/08/17 12:23
Joined: May 2016
Posts: 180
Prague
pcz Offline
Member
pcz  Offline
Member

Joined: May 2016
Posts: 180
Prague
atr: I've just remembered another thing that could be causing the difference. See this thread: EXTRADATA Issues. You can try setting EXTRADATA flag in the old Zorro version.

Btw. in 1.54 and 1.52 I'm getting exactly the same results.

Last edited by pcz; 03/08/17 12:23.
Re: New Zorro version 1.54 [Re: pcz] #464751
03/08/17 12:35
03/08/17 12:35
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
jcl, is there a particular reason why Workshop 8 source is no longer provided in the Strategy directory in 1.54.5?

Re: New Zorro version 1.54 [Re: pcz] #464754
03/08/17 14:57
03/08/17 14:57
Joined: Mar 2017
Posts: 23
A
atr Offline
Newbie
atr  Offline
Newbie
A

Joined: Mar 2017
Posts: 23
Originally Posted By: pcz
atr: I've just remembered another thing that could be causing the difference. See this thread: EXTRADATA Issues. You can try setting EXTRADATA flag in the old Zorro version.

Btw. in 1.54 and 1.52 I'm getting exactly the same results.


Backtests are still different. I set the EXTRADATA flag in Zorro 1.50.6 and the results are a little bit different but very different from the results I got in Zorro 1.54.5. Probably the results in the latest versión of Zorro are more reliable but it's only a suspicion...
Thank you!

*******************************************************
Test 1-PRU EUR/USD - ZORRO 1.50.6
*******************************************************

Simulated account AssetsFix
Bar period 1 hour (avg 92 min)
Test period 18.01.2012-27.01.2017 (28550 bars)
Lookback period 300 bars (18 days)
Monte Carlo cycles 200
Simulation mode Realistic (slippage 0.0 sec)
Spread 0.5 pips (roll -0.02/0.01)
Commission 0.60
Contracts per lot 1000.0

Gross win/loss 619$ / -565$ (+619p)
Average profit 11$/year, 0.89$/month, 0.04$/day
Max drawdown -172$ 320% (MAE -215$ 399%)
Total down time 73% (TAE 62%)
Max down time 66 weeks from Apr 2013
Max open margin 30$
Max open risk 24$
Trade volume 201115$ (40010$/year)
Transaction costs -8.19$ spr, -46$ slp, -0.54$ rol, -11$ com
Capital required 163$

Number of trades 188 (38/year, 1/week, 1/day)
Percent winning 19.1%
Max win/loss 88$ / -50$
Avg trade profit 0.29$ 3.3p (+197.5p / -42.7p)
Avg trade slippage -0.24$ -2.8p (+0.0p / -3.5p)
Avg trade bars 109 (+414 / -37)
Max trade bars 1372 (11 weeks)
Time in market 72%
Max open trades 3
Max loss streak 17 (uncorrelated 27)

Annual return 7%
Profit factor 1.10 (PRR 0.84)
Sharpe ratio 0.11
Kelly criterion 0.20
R2 coefficient 0.000
Ulcer index 33.4%

Confidence level AR DDMax Capital

10% 12% 76$ 89$
20% 11% 85$ 96$
30% 10% 96$ 104$
40% 10% 106$ 112$
50% 9% 117$ 120$
60% 8% 129$ 130$
70% 8% 142$ 139$
80% 7% 159$ 153$
90% 6% 191$ 177$
95% 6% 213$ 195$
100% 4% 350$ 301$

Portfolio analysis OptF ProF Win/Loss Wgt%

EUR/USD .018 1.10 36/152 100.0
EUR/USD:L .000 0.56 14/85 -285.6
EUR/USD:S .191 1.98 22/67 385.6


*******************************************************
Test 1-PRU EUR/USD - ZORRO 1.54.5
*******************************************************

Simulated account AssetsFix
Bar period 1 hour (avg 92 min)
Test period 18.01.2012-27.01.2017 (28549 bars)
Lookback period 300 bars (18 days)
Monte Carlo cycles 200
Simulation mode Realistic (slippage 0.0 sec)
Spread 0.5 pips (roll -0.02/0.01)
Commission 0.60
Contracts per lot 1000.0

Gross win/loss 749$ / -520$ (+2632p)
Average profit 46$/year, 3.80$/month, 0.18$/day
Max drawdown -129$ 56% (MAE -160$ 70%)
Total down time 72% (TAE 65%)
Max down time 93 weeks from May 2013
Max open margin 40$
Max open risk 26$
Trade volume 210101$ (41798$/year)
Transaction costs -8.54$ spr, 0.00$ slp, -0.49$ rol, -12$ com
Capital required 139$

Number of trades 196 (39/year, 1/week, 1/day)
Percent winning 20.9%
Max win/loss 88$ / -11$
Avg trade profit 1.17$ 13.4p (+209.8p / -38.5p)
Avg trade slippage 0.00$ 0.0p (+0.0p / -0.0p)
Avg trade bars 114 (+414 / -35)
Max trade bars 1366 (11 weeks)
Time in market 79%
Max open trades 4
Max loss streak 16 (uncorrelated 25)

Annual return 33%
Profit factor 1.44 (PRR 1.13)
Sharpe ratio 0.46
Kelly criterion 0.66
R2 coefficient 0.000
Ulcer index 18.0%

Confidence level AR DDMax Capital

10% 45% 78$ 100$
20% 43% 87$ 107$
30% 41% 93$ 112$
40% 38% 102$ 119$
50% 37% 109$ 124$
60% 35% 119$ 132$
70% 33% 129$ 140$
80% 29% 150$ 156$
90% 25% 180$ 179$
95% 24% 198$ 193$
100% 14% 375$ 329$

Portfolio analysis OptF ProF Win/Loss Wgt%

EUR/USD .091 1.44 41/155 100.0
EUR/USD:L .000 0.98 19/80 -2.1
EUR/USD:S .187 2.01 22/75 102.1

Re: New Zorro version 1.54 [Re: atr] #464756
03/08/17 15:12
03/08/17 15:12
Joined: May 2016
Posts: 180
Prague
pcz Offline
Member
pcz  Offline
Member

Joined: May 2016
Posts: 180
Prague
atr: I didn't find anything else in the changelog that could cause different results. Could you upload the old Zorro version, please? The oldest I have is 1.51.

Re: New Zorro version 1.54 [Re: pcz] #464758
03/08/17 15:45
03/08/17 15:45
Joined: Mar 2017
Posts: 23
A
atr Offline
Newbie
atr  Offline
Newbie
A

Joined: Mar 2017
Posts: 23
From this link you can download Zorro 1.50.6

http://dfiles.eu/files/2yhyc3byk

For backtesting I used data from Zorro Project.

http://zorro-project.com/download.php

Thank you very much!

Re: New Zorro version 1.54 [Re: atr] #464759
03/08/17 17:42
03/08/17 17:42
Joined: May 2016
Posts: 180
Prague
pcz Offline
Member
pcz  Offline
Member

Joined: May 2016
Posts: 180
Prague
atr: Thank you. It's weird. For example I have this trade:
Code:
Type	Lots	Open	                Close	                Entry	Exit	Profit	Roll	ExitType
Long	1	2015-02-20 18:00	2015-02-23 09:00	1.1393	1.1345	-54.3	-9.88	Reverse
Long	1	2015-02-20 18:00	2015-02-23 09:00	1.14004	1.13254	-80.02	-9.88	Reverse


The first one is from the old version with EXTRADATA flag set and Slippage=0. I'm using the same data and asset files in both cases. I don't understand the difference in entry / exit prices at all. Can anyone more competent than me explain, please?

Re: New Zorro version 1.54 [Re: pcz] #464760
03/08/17 17:58
03/08/17 17:58
Joined: Mar 2017
Posts: 23
A
atr Offline
Newbie
atr  Offline
Newbie
A

Joined: Mar 2017
Posts: 23
Thank you for testing. I think we need some help in order to know if the old or the new Zorro versión has a bug.

Page 3 of 4 1 2 3 4

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1