Optimisation vs Fitting in the story - page 4

 
Vladimir Baskakov:
Seems to be the case if TP & SL are used
In fact it makes no difference, there is such a concept of overstaying, yes with it you can earn quite a long time, but in the end you lose. But that's still a less sensible way to go.
And as for tests and everything else, neither optimization nor tests or anything else give absolutely no guarantees, unless you use something that worked works and will always work.
 
Martin_Apis_Bot Cheguevara:
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.
As for tests and everything else, neither optimisation nor tests or anything else give absolutely no guarantees, unless you use something that has worked and will always work.
That's why I say that the best system where position closing is written in the code, without using TP. For example as in MACD Simple
 
Martin_Apis_Bot Cheguevara:
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.

 
Vladimir Baskakov:
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.

 
Maxim Romanov:

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!

 
Serqey Nikitin:

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.

 
Maxim Romanov:

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 for the five-year period, it is good enough for six months. Then we adjusted it again and we can keep it the same for another six months.
 
Vladimir Baskakov:
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)).

 
Uladzimir Izerski:

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)).

Write in your own thread about your exertions
Reason: