Methods of carrying out a rolling forward - page 5

 
Youri Tarshecki:
Yes, we should have created a topic a long time ago - what a wolfing forward in MT should be like. I just can't get around to it. There was something on this topic in the futures part of the forum recently, by the way.
The futures market is not very interesting for them, as they do not know what they want or what they have done, believing that by telling about the method they are giving away something more valuable than the expert. And in some ways they are right. I, for example, told them about my method. Perhaps because I consider it imperfect and would like to improve it. By the way, your method is not quite clear either. Could you tell us what is done step by step and what your automated optimizer does?
 
elibrarius:
Some people are reluctant to tell you what they need, believing that they will give something more valuable than the expert itself by telling you about the methodology. And in some ways they are right. I, for example, told them about my method. Perhaps because I consider it imperfect and want to improve it. By the way, your method is not quite clear either. Could you tell us what is done step by step and what your automated optimizer does?

There can be no special methods of volking-forwarding. It is a perfectly clearprinciple ofstep-by-step checking and the EA itself is, of course, primary to the result. And the principle of checking is either followed or not. So, it's either a volking forward or it isn't. Therefore, my method is absolutely classic. Nothing new. (There is something new in my ideas, but I haven't got down to realization.)

Optimize backward - get forward of non-optimized part and evaluate it - move forward by forward length - optimize again with previous settings - etc.

What you told about accumulated sets and general run with them is just a variant of evaluation of forwards (assuming that in order to get them you have loaded the set obtained for the previous period at every step of optimization). If it is more convenient for you, fine. The main thing that the principle saved.

 
Youri Tarshecki:

There can be no special methods of volking-forwarding. It is a perfectly clearprinciple ofstep-by-step checking and the EA itself is, of course, primary to the result. And the principle of checking is either followed or not. So, it's either a volking forward or it isn't. Therefore, my method is absolutely classic. There is nothing new here.

We optimize backward - get forward of non-optimized part and evaluate it - move forward by forward length - optimize again with previous settings - etc.

What you told about accumulated sets and general run with them is just a variant of evaluation of forwards (assuming that in order to get them you have loaded the set obtained for the previous period at every step of optimization). If it is more convenient for you, fine. The main thing is that the principle should be maintained.

The methodology is the same, I agree.

And what about the selection of a single result out of 10 000+ options from the back test? By maximal profit? Or by max profit with some drawdown level (I choose it with drawdown < 20%). Or another method of selection?

The criterion for selecting the result - one for all sectors? (I think it should be) Or different?

 
elibrarius:

The methodology is the same, I agree.

And what about picking the only result out of 10,000+ options from the back test? By max profit? Or by max profit with some drawdown level (I choose it with drawdown < 20%). Or another method of selection?

The criterion for selecting the result - one for all sectors? (I think it should be) Or different?

I've already told you - the forward will judge everything!) Check everything yourself, don't take anyone's word for it!

The main thing - there should be as many backs as there are forwards and the set of a previous back becomes the start for a new one.

 
elibrarius:

The methodology is the same, I agree.

How about selecting a single result out of 10000+ options from a back test? By max profit? Or by max profit with some level of drawdown (I select with drawdown < 20%). Or another method of selection?

The criterion for selecting the result - one for all sectors? (I think it should be) Or different?


My thoughts, including on the interface:

So, firstly. WF optimization answers the question: if I reoptimize my EA every N days and choose the best result (based on some criterion/rule/fitness function) how would it affect the trading period of M days? (excerpt from the theory)

I.e. the developer for the expert determines experimentally:
1. Custom criterion (implicit in the Expert Advisor) - at the developer's discretion - a wide field for discussion (this is relative to your drawdown of <20%).
2. Periods N (In Sample For Window) and M (Out Of Sample For Window). And it is an interesting research field to change N and M on the basis of some criteria of the previous period.
3. Parameters of the system to be optimized
4. A range of parameters values where optimization is to be done (it is possible to limit it programmatically)

I.e., it is obvious that this is a separate class of Expert Advisor with a special approach to trading. Such an Expert Advisor (probably) will not be able to show profitable trading on history even for the last year with one set of parameters, and will fail on history after one month.

Is WF needed for other Expert Advisors whose developers haven't implemented all these 4 items? I think not.

I.e., it would be good for a trader if he/she would select "Trade Mode" in the list when wishing to check the Expert Advisor according to the recommended scenario from the programmer


Why trade mode? Because in the end we emulate trading with the strategy of over-optimization at specified areas, choosing the best one by Custom Max criterion and trading with parameter values defined at each step.

That's it. Do not provide any other settings. But provide the developer with a programmatic interface:

- to determine that WalkForward is selected
- set the length of periods N and M


 
Igor Volodin:

My thoughts, including on the interface:

So, firstly. WF optimization answers the question: if I were to reoptimize my EA every N days and choose the best result (based on some criterion/rule/fitness function) how would it affect the trading period of M days? (excerpt from the theory)

i.e. the developer for the Expert Advisor determines by experience:
1. Custom criterion (embedded into Expert Advisor) - at the developer's discretion - a wide field for discussion (this is relative to the drawdown of <20%).
2. Periods N (In Sample For Window) and M (Out Of Sample For Window). And it is an interesting research field to change N and M on the basis of some criteria of the previous period.
3. Parameters of the system to be optimized
4. Range of parameters values where optimization is to be done (it is possible to limit it programmatically)

I.e., it is obvious that this is a separate class of Expert Advisor with a special approach to trading. Such an Expert Advisor (probably) will not be able to show profitable trading on history even for the last year with one set of parameters, and will fail on history after one month.

Is WF needed for other Expert Advisors whose developers haven't implemented all these 4 items? I think not.

I.e., it would be good for a trader if he/she would select "Trade Mode" in the list when wishing to check the Expert Advisor according to the recommended scenario from the programmer


Why trade mode? Because in the end we emulate trading with the strategy of over-optimization at specified areas, choosing the best one by Custom Max criterion and trading with parameter values defined at each step.

That's it. Do not provide any other settings. But provide a program interface for the developer:

- to determine that WalkForward is selected
- set the length of periods N and M


Nostalgia, how much complexity is ahead
 

Technically, for analysis, developer can collect information for each back+forward run through frames, maybe add information about walk step number in frame.
But it is not necessary to enter step number, indirectly, the arrival of frame with data from new walk step can be done by analyzing pass.

static int step = 0;
static bool lastState = 0; //0 - бэк, 1 - форвард
while(FrameNext(pass,name,id,value,data)) {
   bool is_forward = CheckPass(step, pass); //проверим pass в пуле для step шага
   if (!is_forward) {
     AddPass(step, pass); //добавим pass в пул
     if (lastState == 1) {
        //первый фрейм от нового walk-step'а
        step++;
        lastState = 0;   
     }
     
     //обработка бэка с учетом значения step
   } else {
     lastState = 1;

     //обработка форварда с учетом step'а
   }

}//endwhile
In documentation we can add an example of saving and visualization of frames for walk-forward mode in tester, and in kodobase, I think, there will be a simple variant which can be modified for your purposes.
 
Igor Volodin:


i.e. the developer for the Expert Advisor determines by experience:
1. Custom criterion (embedded in Expert Advisor) - at developer's discretion - a wide field for discussion (this is for your Expert Advisor with drawdown <20%)
2. Periods N (In Sample For Window) and M (Out Of Sample For Window). And it is an interesting research field to change N and M on the basis of some criteria of the previous period.
3. Parameters of the system to be optimized
4. Range of parameters values where optimization is to be done (it is possible to limit it programmatically)

I.e. it is obvious that this is a separate class of Expert Advisor, with a special approach to trading. Such an Expert Advisor (probably) will not be able to show profitable trading on the history even for the last year with one set of parameters, and will lose money on the history in a month.

Is WF needed for other Expert Advisors whose developers haven't implemented all these 4 items? I don't think so.

1. The tester already contains the optimization criteria, so why "cram" them into the Expert Advisor?

The change and ratio of back to forward is also the subject of check on the forward. If the forward ratio turns out to be better, we will use it for further analysis.

3 Parameters for optimization are user variables. It is the code itself that is the subject of testing.

4. A range of variables - indeed, we can search for them programmatically but there are many subtleties - for now it is more reliable and easier to do it manually. And this is a question of optimisation, not of volking-forwarding.

Why is it obvious that this is a separate class of experts? I think this class includes ALL EAs, because ALL EAs without over-optimization or over-training are leaking. Forward just shows how quickly this happens.

 
Igor Volodin:

My thoughts, including on the interface:

So, firstly. WF optimization answers the question: if I were to reoptimize my EA every N days and choose the best result (based on some criterion/rule/fitness function) how would it affect the trading period of M days? (excerpt from the theory)

i.e. an Expert Advisor developer will experimentally determine the following
1. Custom criterion (built into the Expert Advisor) - at the developer's discretion - a wide field for discussion (this is relative to your drawdown <20%).
2. Periods N (In Sample For Window) and M (Out Of Sample For Window). And it is an interesting research field to change N and M on the basis of some criteria of the previous period.
3. Parameters of the system to be optimized
4. A range of parameters values where optimization is to be done (it is possible to limit it programmatically)

I.e., it is obvious that this is a separate class of Expert Advisor with a special approach to trading. Such an Expert Advisor (probably) will not be able to show profitable trading on history even for the last year with one set of parameters, and will fail on history after one month.

Is WF needed for other Expert Advisors whose developers haven't implemented all these 4 items? I think not.

I.e., it would be good for a trader if he/she would select "Trade Mode" in the list when wishing to check the Expert Advisor according to the recommended scenario from the programmer


Why trade mode? Because in the end we emulate trading with the strategy of over-optimization at specified areas, choosing the best one by Custom Max criterion and trading with parameter values defined at each step.

That's it. Do not provide any other settings. But provide the developer with a programmatic interface:

- to determine that WalkForward is selected
- set the length of periods N and M


I think the best thing is to analyse WF using third party tools, then show MQ and ask to integrate it in tester.

But something seems to me it will be difficult. I, for example, without a database have not made up my mind. A simple calculation:
1 pass of optimization yields 10000+ lines
+ 1 pass of forward - another 10000+ rows
=20000+ rows
* for example by 12 - year segment with monthly over-optimization

=240 thousand lines

If we add the data of all deals for balance and equity curves from frames, the amount of data for analysis will increase tens, hundreds or thousands of times for scalpers. Another less resource-intensive variant is to save equity and balance data not for each trade but once a day, for example. I calculated the slenderness of the curve for my Expert Advisor, i.e. obtained one figure and entered it into Custom parameter calculation for optimization. Of course, it is not as informative as the curve (per day or per trade).

I haven't done it yet, but I will most likely introduce filters by level (e.g. drawdown <20%) + sorting (max profit). The filter is likely to be more than one.

In the terminal, you can operate only with files and arrays, which is much more labor-intensive than an SQL query.

Of course, it is possible to attach a DB to the MT5 system. But it will not be a scalable solution, because it will be very difficult for a common user. I am doing it for myself on my site - loading of files of back and forwards through a form in the database followed by analysis.

And I've never seen any possibility to output tables in MT5, like in browser. I think there will be some problems with it, too.

In general, I'm afraid that in MT5 - WF will never be.

 
Youri Tarshecki:

1. Optimisation criteria are already present in the tester, why should they be added to the Expert Advisor.

Are you sure that those criteria are sufficient to identify (automatically) the best set for walk-step? After all,elibrarius was just in this thread, asking a question about what criterion is better and who uses what. This is a very wide field for research and choosing the best set for working on a walk-step. Moreover, different approaches to trading will probably require different criteria, somewhere the drawdown is very critical, somewhere the number of deals is important, somewhere the final profit.

Further, I don't see any difference from my list.

Why is it obvious that this is a separate class of Expert Advisor? I think this class includes ALL EAs, because ALL EAs without over-optimization or over-training will fail. Forward is just showing how quickly it happens.

The developer declares that the EA operates in this mode and has implemented support for WF in the code. And not just when the EA starts to fail - re-optimize it.

And you can't set N and M in the interface of the tester - that's what I suggested, only programmatically. If you see how clear it is for all to make settings in the tester interface, and they will then already be fixed - the periods of N and M will be entered by user (although your"Change and the ratio of back to forward - this is THE subject of check on forward" will not work), suggest your version.

Reason: