![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Seems to be the case if TP & SL are used
In fact, there is no difference, there is such a concept of over-sitting, yes with this you can earn quite a long time, but in the end you lose. But this is still more or less a reasonable way.
Optimisation and fitting are one and the same thing.
If two words exist, they will have different meanings.
Fitting can be described as selecting the best parameters on the story for a beautiful picture.
Optimisation is the selection of optimum parameters for further use.
The words seem to be slightly different, but the meaning may be different.
What is the fundamental difference between these concepts?
When I was optimising, I chose the option with the widest extremum (I don't know what to call it). That is, let's say we have the width of the analysis window, in which there is a profit between 40 and 150 bars. And there is a maximum value somewhere there. I selected the analysis window width somewhere in the middle, for example at 95 bars. It does not matter that this is not the highest profit, but the system is stable in a wide range of parameters. If some of the market parameters go away, there is a reserve where they can go. On the whole, this provides stability on the real account. If the window (range of parameters) is too narrow, I did not take these settings. But still it is a fitting for a certain range with the hope that the market parameters will be preserved. The second way: I optimized it for 2 years, and tested it 10 years later. If the algorithm was stable, I believed that the pattern was stable. But again it is also fitting to an unknown series but at least I can say that the regularity is stable.
Now I've decided to abandon optimization altogether. To take some known pattern and trace the known market parameters affecting the profit based on this pattern and predict the future changes of the market parameters. This approach has turned out to be much more stable and versatile.
For example, a simple strategy. If the market is trendy, we should take a long profit and short stop loss, and if the market is flat, we should take a long stop loss and short profit. This way we will always be in profit with a certain probability. The only thing left to do is to monitor the current state of the market and predict when it will be trending or flat. Of course there are a lot of questions here))) what is a trend and what is a flat, but these are details that have been solved.
And I think the variant with optimization and learning based on the past behavior of a price series is a dead end - it will always lead to fitting to a certain series and you will be trained according to some regularity, the nature of which is unknown to you, and if the nature is unknown, then how can you control it? Unless the algorithm learns from history to predict changes in market parameters.
And with optimisation and learning from the past behaviour of the price series, I think the option is a dead end, it will always lead to a fit for a particular series
All basically correct, but with some refinements...
Optimisation " on the past behaviour of the price series" is not a clear thing...
We ( traders ) develop a STRATEGY ( algorithm ) - a certain order of actions to make a profit.
This algorithm has certain parameters. It is these parameters that we optimize, not the "behavior of price series"...
Suppose we optimized our parameters... and gained profit on some history in our test...
How do we verify that these parameters FOR STRATEGY are correct and not a fit?
There are several options...
1. Running a test on a forward section... It helps, but not always... The reason is simple - the currency pair itself retains certain properties, such as smoothness and low volatility... As a consequence, these parameters will have a narrow application for STRATEGY.
2. Run the test on other pairs... If the results will give you a profit, this STRATEGY is universal, and therefore correct in terms of longevity.
P.S. My opinion: the second option is more reliable than the first..., and you can forget about adjusting to the history!
All basically correct, but with some refinements...
Optimisation " on the past behaviour of the price series" is not a clear thing...
We ( traders ) develop a STRATEGY ( algorithm ) - a certain order of actions to make a profit.
This algorithm has certain parameters. It is these parameters that we optimize, not the "behavior of price series"...
Suppose we optimized our parameters... and gained profit on some history in our test...
How do we verify that these parameters FOR STRATEGY are correct and not a fit?
There are several options...
1. Running a test on a forward section... It helps, but not always... The reason is simple - the currency pair itself retains certain properties, such as smoothness and low volatility... As a consequence, these parameters will have a narrow application for STRATEGY.
2. Run the test on other pairs... If the results will give you a profit, then this is a universal STRATEGY, and therefore the correct one in terms of longevity.
P.S. My opinion: the second option is more reliable than the first..., and you can forget about adjusting for the history!
Yes, the second variant is the most correct. Here we have optimized the parameters of the algorithm itself, not adjusted it for the history. Ideally, if it works with any symbol (at least with similar ones, such as all currency pairs or all shares), it means we have optimized the algorithm without adjustment.
But I do not like forward for the simple reason: If we optimize a bunch of parameters, there will definitely be profitable ones. Now we do a forward and... some of the previously obtained parameters remain profitable. That is optimization for one year + forward test for one year = optimization for 2 years. Thus, the longer the optimization period, the less profitable combinations remain. And here it is unclear whether our algorithm is profitable or we have fitted it.
Yes, the second option is the most correct. Here we have optimized the parameters of the algorithm itself, instead of adapting it to the history. Ideally, if it works with any symbols (at least with similar ones, such as all currency pairs or all stocks), it means we have optimized the algorithm without adjustment.
But I do not like forward for the simple reason: If we optimize a bunch of parameters, there will definitely be profitable ones. Now we do a forward and... some of the previously obtained parameters remain profitable. That is optimization for one year + forward test for one year = optimization for 2 years. Thus, the longer the optimization period, the less profitable combinations remain. And here it is unclear whether our algorithm is profitable or we have fitted it.
Well, if we adjusted it over a five-year period, that's good enough for six months, too. Then we adjust it again and we don't have to change it for another six months.
not a fact. I have the old algorithm safely optimised from 2004 - 2019 for almost most of the 28 major pairs, and from 2008-2019 for a minority. But still there was a case on AUDUSD, when the algorithm failed in spite of the optimization since 2004. On the whole yes, the algorithm is good, it has been used for 2+ years on real account and it has yielded profit consistently every month, but I do not feel comfortable when I know about such a big hole.
So it may not be enough for six months, it may be enough for another 10 years, or it may be enough for a month, this is the main problem with fitting, we cannot follow the pattern because we do not understand it. And if we understand it and can track it, there is no need to adjust... There's a problem of its own.
Price reacts and depends on external factors. News, etc., etc...
It turns out that by optimizing you want to influence external factors in the future, so that the price would be what you want.
I can only wish you success)).
The price is reactive and depends on external factors. News, etc., etc...
It turns out that by optimizing you want to influence external factors in the future, so that the price would be what you want.
I can only wish you success)).