Same script, different result

Posted By: Meini

Same script, different result - 07/24/18 20:52

I developed a trading script and trained it with walk forward over a set period of time. I did quite a bit of testing and changing until I got that result. So I created a copy of the C file as I wanted to develop it further without losing what I already had.

You would expect that this identical copy of the code, being trained with the same time period and currency pair gives you the same result. But in fact the training result is significantly worse than when I train the original.

I am at a loss. Any ideas?
Posted By: Spirit

Re: Same script, different result - 07/25/18 16:39

If the script is the same then something else is different, I would next compare the training data. Maybe you have selected a different account while training or testing.
Posted By: Meini

Re: Same script, different result - 07/25/18 20:00

Thanks for your input Spirit. Yes, I fully agre , I did some more testing yesterday and I am getting a bit closer. I am sure I will find out what's going on. Experience tells me it usually is something quite simple that I overlooked, but this one is weird. Feels like a maybe variable may not be properly initialised. I'll report back with any relevant findings.
Posted By: Meini

Re: Same script, different result - 07/25/18 21:58

Here is a preliminary finding. It seems be related to DataSplit. What happens if only NumWFOCycles is set but DataSplit is not set in the script? I seem to get inconsistent training results if DataSplit is not set.
Posted By: Spirit

Re: Same script, different result - 07/26/18 07:22

If datasplit is not set it has a default value. But maybe that goes in the right direction, maybe some other variable in the script is not initialized in initrun and then gets the value from the last run.
Posted By: Meini

Re: Same script, different result - 07/26/18 11:40

Ok, I ran some more tests and it looks like I am getting closer. With the same DataSplit value I get different results depending on whether I first delete the old *.par files from a previous test or not. (This would also explain my observation in the initial post.) I have no idea if that is by design or if it is a bug. I will do some more testing to get a clearer picture and keep you posted....
Posted By: Meini

Re: Same script, different result - 07/28/18 02:15

Hours of testing, with about 100 individual tests later, and it seems the issue has at least two different causes:

1. Deleting all training related data files *.par before changing DataSplit and running a new training session sometimes has an influence on the outcome.

2. If DataSplit is not set, it seems to change its value from 0 to 85% at some point. The problem surfaced because, I used its value in calculations at a point in the program when it was still 0, it later changed to 85%. This explains at least some of the behaviour.

There is a clue about this inconsistency in the manual - which statement is the correct one?

Quote:
Walk Forward Optimization
If DataSplit is not set otherwise, WFO uses a default training period of 85% and a default test period of 15%.

Quote:
DataSplit
Splits the simulation in a training period (given in percent) and a following test period. F.i. when set at 60, the training period has a length of 60% and the test period has a length of 40%. This works with or without WFO and ensures that the test always uses out-of-sample data.
Typical range:
50..90 (default = 0 = no separate training / test period).


Conclusion: Something needs to be sorted out by the Zorro Developers and/or manual author. Or maybe I am just not understanding things right...
Posted By: Spirit

Re: Same script, different result - 07/29/18 06:20

I believe, when datasplit is 0, it is automatically set to 85 in wfo, otherwise wfo would not work because there is no training period.
© 2024 lite-C Forums