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
3 registered members (MadJack, AndrewAMD, Quad), 540 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
Training Z strategy with different AssetsFix.csv #469326
11/10/17 23:44
11/10/17 23:44
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi all,

I'm probably not remembering something right, so would appreciate help/clarification!

Using Z3 since it Tests faster. laugh I install 1.66.5, and Test Z3. Results are per the manual.

I replace AssetsFix.csv with my own Broker's parameters and reTest. Results are different, as expected - unacceptably worse, in fact.

I Train Z3 and it downloads data and creates a new Z3.par. I reTest expecting better results, as presumably Z3 has now been Trained to my AssetsFix.csv. However, the Test results are exactly the same as before Training.

What am I missing? Why did the Train not improve the Test results? Is there no way to Train to my AssetsFix.csv?

Thanks.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469328
11/11/17 00:45
11/11/17 00:45
Joined: Jul 2017
Posts: 25
Bangkok
JoFo Offline
Newbie
JoFo  Offline
Newbie

Joined: Jul 2017
Posts: 25
Bangkok
For me the Z Systems generate random trades and can only be profitable with a tuned Assetsfix what have nothing to do with reality.

Money for nothing.

Re: Training Z strategy with different AssetsFix.csv [Re: JoFo] #469330
11/11/17 11:44
11/11/17 11:44
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Test results are not different when you modify Z3.par. Z3.par is for live trading, the backtest uses Z3_1.par .. Z3_12.par. - The only asset parameter with a possible effect on Z3 training is Rollover. But then the Rollover must be rather extreme - better check the entered parameters.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469338
11/11/17 15:03
11/11/17 15:03
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Hi Ddlv,
I trade with Oanda and have the same divergent results on Z systems. I guess that the main issue comes from the FAC parameters calculated from other brokers .

I do not find z systems very useful, without having the opportunity to fully train and re-train from beginning and the freedom to modify the ENDDATE.

I hope this will change soon or later.

Ciao

Re: Training Z strategy with different AssetsFix.csv [Re: MatPed] #469343
11/11/17 19:22
11/11/17 19:22
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks all!

@jcl:
Thanks for the clarification. Is this in the manual somewhere? Sorry if I missed it.

Followups:
Do I understand correctly that there is therefore no way to verify the results produced by the Train? I.e., what Trade results would be expected using the new Z3.par and my Broker's values?

My AssetsFix.csv came from the Download script without any changes - are Roll values still suspect in that case?

@MatPed:
Agreed. The Z Systems have yet to completely satisfy my Proof-Of_Concept perspective. But (aside from Z5 frown ) they haven't completely crashed and burned yet either...

How long have you been on Oanda? Has it been an OK/good experience?

Thanks again all.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469361
11/12/17 14:24
11/12/17 14:24
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
Originally Posted By: DdlV
Thanks all!

How long have you been on Oanda? Has it been an OK/good experience?

Thanks again all.


One year, mor or less. So far so good, but tts a MM broker not the best... No ETFs, Stocks, Futures and Options are the real downside...

Re: Training Z strategy with different AssetsFix.csv [Re: MatPed] #469385
11/14/17 06:03
11/14/17 06:03
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi jcl. Would appreciate your comments on the followups:

Do I understand correctly that there is therefore no way to verify the results produced by the Train? I.e., what Trade results would be expected using the new Z3.par and my Broker's values?

My AssetsFix.csv came from the Download script without any changes - are Roll values still suspect in that case?

Thanks.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469387
11/14/17 10:52
11/14/17 10:52
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Depends on whether you train or retrain. Retraining affects only Z3.par. Full Training affects all .par files. Of course you will normally still get the same backtest results, since you're using the same historical data.

I do not think that a different AssetsFix can have a noticeable effect on training. Except maybe in extreme cases, such as a very different Rollover, by factor 10 or so. In such a case the training would possibly generate parameters that close trades a bit earlier. If one of your AssetsFix values is completely wrong, you'll get bad results in the backtest. But the problem should be normally easy to spot in the asset list and the performance report.

Re: Training Z strategy with different AssetsFix.csv [Re: jcl] #469389
11/14/17 17:05
11/14/17 17:05
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl.

It appears that the Z systems (at least Z3) can only be reTrained - whether Trading or not, pressing Train only updates Z3.par. Is this as expected? Or is there some way to full Train Z3?

Thanks.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469431
11/15/17 16:40
11/15/17 16:40
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
You're right. They have no difference in the code between training and retraining.

Re: Training Z strategy with different AssetsFix.csv [Re: jcl] #469432
11/15/17 19:01
11/15/17 19:01
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl.

To be sure we're on the same page:

- The Z systems have been coded such that Train (when not Trading) and reTrain (when Trading) do the same thing - produce only the final Z<n>.par.

- For our own strategies, in the absence of similar specific code to do differently, Train will produce the individual .par files whereas reTrain will produce only the final .par file.

Correct?

Thanks.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469436
11/15/17 21:27
11/15/17 21:27
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
No, train and retrain always do the same thing if not explicitely coded otherwise.

Re: Training Z strategy with different AssetsFix.csv [Re: jcl] #469437
11/15/17 22:01
11/15/17 22:01
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Then *sigh* I'm confused again. frown Why when I Train or reTrain Z3 do I only get the Z3.par file and not the Z3_n.par files?

I suppose it's because Z3 has the PARAMETERS flag OFF?

Thanks.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469438
11/15/17 22:12
11/15/17 22:12
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Z3 is simply programmed to train the z3.par file by clicking the Train button. It is not programmed to do different things in training and retraining.

Re: Training Z strategy with different AssetsFix.csv [Re: jcl] #469439
11/16/17 06:08
11/16/17 06:08
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks for confirming, jcl!

Moving on...

The published ~85% AR is produced using the included AssetsFix.csv. For Z3, the pertinent lines are:

Code:
Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Leverage,LotAmount,Commission,Symbol
NAS100,4185,2,-0.1,0,1,0.0871,2,0,0.1,0,
SPX500,2032.4,0.5,-0.5,0,0.1,0.0871,8,0,1,0,
US30,17520,2,-0.5,0,1,0.0871,6,0,0.1,0,
XAG/USD,17.235,0.046,-0.0009,0,0.01,0.43547,5,0,50,0,
XAU/USD,1260.82,0.47,-0.0124,0,0.01,0.00871,11,0,1,0,



My AssetsFix.csv unchanged from the Download script Tests to ~30% AR (& other metrics reduced as well):

Code:
Name,Price,Spread,RollLong,RollShort,PIP,PIPCost,MarginCost,Leverage,LotAmount,Commission,Symbol
NAS100,6295.60,1.00000,0.1700,-.3400,1.0000,0.100000,3.5000,179.874,1.0,0.000,NAS100
SPX500,2578.17,0.50000,0.1200,-.6300,0.1000,0.100000,14.0000,184.155,1.0,0.000,SPX500
US30,23388.50,2.0000,-.0700,-.3300,1.0000,0.100000,13.0000,179.912,1.0,0.000,US30
XAG/USD,17.0470,0.04300,-.0100,-.0020,0.0100,0.500000,9.0000,94.706,50.0,0.000,XAG/USD
XAU/USD,1279.15,0.39000,-.0100,0.0000,0.0100,0.010000,7.0000,182.736,1.0,0.000,XAU/USD



I don't see values that differ by an order of magnitude. From the Test log, the trades start out the same, but the trade volumes are different. Thereafter, the trades taken differ somewhat, but the different trade volumes continue...

Does anything leap out at you explaining the drastic reduction in AR (& other metrics)?

If not, what would the procedure be to determine what's going on?

Thanks.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469441
11/16/17 07:48
11/16/17 07:48
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Well, the obvious procedure is looking at what's different in the performance reports.

Your downloaded AssetsFix appears at first glance even a bit better than the included FXCM version. But maybe one of the assets got much worse trading cost - just check the report.

30% AR per se is not bad. It's perfectly normal when you trade with less leverage, as with IB. But you should definitely look for the reason.

Re: Training Z strategy with different AssetsFix.csv [Re: jcl] #469450
11/16/17 18:33
11/16/17 18:33
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Yes, 30% AR is not bad. laugh But I think it's important to understand what's going on and why simply changing the Assets parameters seemingly for the better gives a worse backtest...

Comparing the base Transaction costs -1007$ spr, -507$ slp, -655$ rol

to my AssetsFix.csv's Transaction costs -1569$ spr, -935$ slp, -2028$ rol

shows Spread ~50% worse, Slippage almost doubled, & Roll more than tripled. I don't see that the differences in Assets parameters directly accounts for this...

The base Portfolio analysis

Code:
Portfolio analysis  OptF  ProF  Win/Loss  Wgt%  Cycles

NAS100 avg          .068  2.32   22/19    37.9  \///////
SPX500 avg          .000  0.60    7/11   -13.8  ///....
US30 avg            .056  2.23   22/16    37.2  //////./
XAG/USD avg         .020  1.74   17/17    51.1  ////X/X..
XAU/USD avg         .000  0.61   12/24   -12.5  .X/X..//



becomes

Code:
Portfolio analysis  OptF  ProF  Win/Loss  Wgt%  Cycles

NAS100 avg          .149  4.32   16/10    73.7  ///.//////
SPX500 avg          .025  1.28   10/14    11.5  ///../..
US30 avg            .105  2.22   22/15    41.8  //////./
XAG/USD avg         .004  1.10   18/24    15.5  /X/XXX..
XAU/USD avg         .000  0.67    9/23   -42.6  .XX/..//



and again I don't see a direct cause.

There is an indirect cause in that my AssetsFix.csv causes larger trades, which causes different trades to be taken. Could the optimization for one trading pattern not work for another? Since I cannot, could you Train Z3 using my AssetsFix.csv and see what results?

Thanks.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469460
11/17/17 07:43
11/17/17 07:43
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
The difference between the 2 OptF columns was the one that really disoriented me. There is a huge difference...

Re: Training Z strategy with different AssetsFix.csv [Re: MatPed] #469465
11/17/17 09:32
11/17/17 09:32
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
You can see the reason: The losing XAU now reduces the end result by 40%, compared to originally 12%. The higher weight of XAU is due to its leverage 200 in your account, compared with 100 in the original account parameters.

Higher leverage is good for winning, but bad for losing components.

Re: Training Z strategy with different AssetsFix.csv [Re: jcl] #469469
11/17/17 10:05
11/17/17 10:05
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks both!

@MatPed: There's so much about this I don't fully understand yet... I hadn't even really gotten to the OptF's on the belief that they're driven by the backtest results...

@jcl:
a) Isn't it more complicated than that? I.e., the trades taken aren't exactly the same, so while more leverage is involved that doesn't a priori mean bad (-12.5) must become worse (-42.6). F.i., SPX500 changed from losing (-13.8) to winning (11.5). Wouldn't optimizing using the different AssetsFix.csv therefore produce different results than using the leverage 100 values on a leverage 200 account?

b) Finally getting to OptF's laugh , would the 0 OptF for XAU prevent it being Traded and therefore Trade would give better results than the Tested 30% AR (which includes the XAU loss)?

Thanks.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469540
11/20/17 10:30
11/20/17 10:30
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
No, optimizing has nothing to do with leverage. It affects entry and exit points, not the trade volume.

Z3 does not use OptimalF. But I would in this case indeed remove the overweight XAU completely from the portfolio. Use the exclude setting in Z.ini for this.

Re: Training Z strategy with different AssetsFix.csv [Re: jcl] #469547
11/20/17 17:56
11/20/17 17:56
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl.

The veil has lifted a little, but of course that leads to more thoughts/questions... laugh

Re. Optimizing & Leverage:

Leverage determines trade size, and hence affects trade mix, and hence system results. Optimization is working at the individual trade level to maximize individual trade results. But is this an inherent restriction? Couldn't optimization also be used at a "higher" level and affect the trade mix?

Re. Excluding Asset(s):

I will of course try this, but for the benefit of other readers, will Test then run w/o that Asset(s)?

Similarly, for the Cold Blood Index feature to work, do I need to (re)Test with the Asset(s) excluded to get a corrected DBL file?

Thanks!

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469573
11/22/17 15:00
11/22/17 15:00
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Optimizing a portfolio mix is a difficult question. There are several methods for that, but at the moment Z3 just applies equal margin to all components.

Yes, you need to test with the same assets as in trading for the CBI to work.

Re: Training Z strategy with different AssetsFix.csv [Re: jcl] #469576
11/22/17 16:51
11/22/17 16:51
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl.

I gather, then, that none of the Z Strategies attempt to optimize trade/portfolio mix?

Which Z Strategies use OptF? (Or alternatively, which do not and hence need to have Assets manually excluded?)

Thanks.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469580
11/23/17 07:52
11/23/17 07:52
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Z1, 2, and 12 use OptimalF.

Re: Training Z strategy with different AssetsFix.csv [Re: jcl] #469615
11/25/17 00:05
11/25/17 00:05
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl.

Perhaps this would be a good addition to the manual?

Something like: When implementing or updating and Test using your own Broker's AssetFix.csv data gives a very different result from what's posted in the manual (and not Z1, Z2 or Z12), then one should look for the Asset(s) causing the variation, exclude it/them, reTest, and copy the .dbl file to the Trading system...

Thanks.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469626
11/25/17 19:25
11/25/17 19:25
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi jcl.

Another suggestion & question:

Suggestion: When Trade is started, print in the window & log any Assets Excluded. Excluded Assets can be determined in Test from the Performance Report, but in Trade I don't see any confirmation of the Exclude - is it there and I just missed it?

Question: Z3 Test with the underperforming XAU/USD Excluded shows better results, but still nowhere near the results of the lower leverage account. Obviously I can compare trade by trade to see what's being taken vs. missed; but I'd prefer to start by understanding things at a higher level. Is it a correct understanding that strategies are also leverage dependent? I.e., strategies in general work only at certain leverage values/ranges because as leverage changes it changes the trade mix?

Thanks.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469665
11/29/17 11:59
11/29/17 11:59
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
I believe only the flags are printed at start, but of course we can also add the exclude list. For different results, the first thing I'd check are trading costs and max margin, next are the separate asset results. If none of them gives a clear indication what's different, then you must indeed go trade by trade through the log.

Re: Training Z strategy with different AssetsFix.csv [Re: jcl] #469666
11/29/17 17:48
11/29/17 17:48
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline OP
Serious User
DdlV  Offline OP
Serious User
D

Joined: Jun 2013
Posts: 1,609
Thanks jcl.

I was hoping to save some of that effort if the answer is already known. laugh Or at least better target the investigation...

Summary of what I think I experienced, so far: A Strategy's results are directly influenced by the account Leverage (only - nothing else was changed). Different Leverage gives a different trade mix and the results will be different, sometimes dramatically. Nothing is "wrong" per se, and individual trades remain optimized per the Train. But the mix difference means less (or un-) profitable Assets may end up being traded more than the more profitable one(s). Excluding an unprofitable Asset(s) does not return the Strategy to the original Leverage's results.

In that context, are either or both of these true?

a) A difference in Leverage should not change the Test trade mix! There is some problem which needs to be identified!

b) If an Asset(s) are Excluded, the Strategy must be reTrained since different trades will be taken for the non-Excluded Assets. Using the prior optimization values will lead to different Test results.

Thanks.

Re: Training Z strategy with different AssetsFix.csv [Re: DdlV] #469682
12/01/17 07:56
12/01/17 07:56
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
A) I don't know, B) no.

Re: Training Z strategy with different AssetsFix.csv [Re: jcl] #469717
12/04/17 13:18
12/04/17 13:18
Joined: Jul 2017
Posts: 25
Bangkok
JoFo Offline
Newbie
JoFo  Offline
Newbie

Joined: Jul 2017
Posts: 25
Bangkok
@DdlV

its not only that a new Assetsfix downloaded from your broker shows you the REAL results of the Z Sytems, that have nothing to do with the results with the NONSENS Assetsfix.csv from installation.

Different versions of ZORRO give also dramatic different mostly negative results.

Trading NONSENSE with a leaver of 100 is INSANE.

The only winner in this game is this guy who sell you ZORRO and his brokers.

Page 1 of 4 1 2 3 4

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1