Optimization

There is an opinion that the market does not stand still and is constantly changing, therefore systems, that worked with the same parameters need to be re-optimized for the changed market. Read many opinions, but, mostly, most agree that intraday systems need to be optimized often. There are even proponents of system optimization every day. — for example, we optimize for the last three months and with these parameters we play the system the next day, and so every day. Type, a kind of adaptive system turns out. Other traders are not so extreme and advise to re-optimize intraday systems every few weeks or every one to three months..

Since I am far from these re-optimizations, then I just read and did not attach any importance to it, although the memory still remained. But curiosity takes its toll and I also want to feel what others are doing because doubt in one's own righteousness is always present. Для того чтобы проверить how would it be if, for example, with 2005 the system was re-optimized every few months and with the obtained optimal parameters traded for the next period of time, don't have to have anything special, you don't even need to do it manually, as in many testing programs there is such a feature as Walk-Forward Optimizator. We just launch it and it goes through all the steps of a trader-optimizer for any period of time..  And at the exit we admire the result..

So I decided to play with the intraday system for the futures on the Russell2000 stock index at five minutes. What caught my eye after hours of research — with decreasing IS and OOS periods results, for some reason, worsened significantly, despite the fact that I thought it should be just the opposite. That is, if, for example, we take the interval for optimization three months and the trading period for the obtained parameters one month, then the results are worse than when we take the optimization period of a year and trade with the obtained parameters for three months. And the more we take these periods, the better the results are. I.e, if we continue the trend of this phenomenon, then the worst results should have been obtained for the very next short periods, а самые лучшие просто разделив весь schedule на две части — one IS, another OOS.

  Investidea: Emcor, since the complex of infrastructure facilities will be - with or without Biden

But check, setting each time different periods of optimization and trading according to the obtained parameters, it takes away, of course, очень много времени. Therefore, testing programs have not only a trick for Walk-Forward Optimization, but also a trick, automatically determines the most optimal periods for optimization — Cluster Analysis, which optimizes the value of the periods used in Walk-Forward Optimization. To do this, you need to set the minimum value of the period, maximum and step size. So here, just run this feature and after a while, really, make sure that the longer the optimization periods, the better the results of trading with the system.

Here's an example, how does it look:

1

Failed — means that during such periods of optimization it is dangerous to trade the system
PASS — can be traded
Runs — how many parts the traded chart is divided into for optimization. Since the graph was long 10 years, that number 5 means that we optimize the system every two years. BUT 30 means that we optimize every three months. Can, of course it was to expand the ranges of Runs, but this has been going on for too long, therefore limited to this range. But the trend is visible — the longer the periods of optimization,the better the results are.

You can click on each cell and get an exhaustive analysis of trading by the system, optimized with these periods.

For comparison, this is what the trading results look like when re-optimized every two years:

2

And these are the results of re-optimization every three months.:

1A

Well, the intermediate results roughly correspond to this trend..

But the most interesting thing is , that by simply dividing the entire graph into 70% IS и 30% OOS and optimized without any WFO, the result on OOS turned out better than using WFO on the same period….

Scroll to Top