Machine learning in trading: theory, models, practice and algo-trading - page 2837

 

If I were on another site, then nothing amazing, but to discuss extremes with people who have seen millions of tester results - it is impossible to find words. One thought is that they are divorced.

Once again: there are no extremes! No, we see them, even ordered by profit or otherwise, but there are no extremes. Just as there is no eagle on a coin that fell with the eagle upwards, because it is not an eagle, but the probability of an eagle. All your extremes are probabilities of extremes. You could talk about the value of an extremum in the sense of mathematical expectation and confidence interval, but it is impossible to talk about it, because there is no mathematical expectation because the value of the extremum is non-stationary!


You have seen it a million times, when you optimise an Expert Advisor on one interval - you get a set of parameters with a set of optimal results. If you take another interval, often just increasing it, you get another set of parameters with different results, and you may get a loss. What? Have none of you seen this? And it has nothing to do with the optimisation algorithm. You can genetics, you can complete oversampling, which may improve the genetics, but outside the optimisation sample the result will be one, most likely sad.

 
СанСаныч Фоменко #:

You have seen it a million times, when you optimise an Expert Advisor on one interval - you get a set of parameters with a set of optimal results. If you take another interval, often just increasing it, you get another set of parameters with different results, and you may get a loss. What? Have none of you seen this? And it has nothing to do with the optimisation algorithm. You can genetics, you can complete oversampling, which may improve the genetics, but outside the optimisation sample the result will be one, most likely sad.

this is an example of how to do unnecessary))) so wrong idea of what extrema we are talking about.

above is an example with grid answers. reduce the optimisation problem not to the summarised answer "maximum balance", but for example the quadratic deviation from the direct difference of balances on each trade. this is an example of how to convert the original problem into a derivative. the result will be a smooth function, not a discrete one in terms of balance. the final balance you have is like 10 in my example.

 
Andrey Dik group of path variants with similar characteristics of angle*length satisfying safety requirements.

That's how it is, in a general way. Not every algorithm is able to find a "safe" road. both search properties and convergence and convergence speed are important.

In the simplest case it will be a spiral curve around the mountain rising to the top. it is obvious that since the mountain is not smooth, there are at least several variants of road construction - this is a plateau of solutions satisfying certain criteria, and not a plateau in the form of an area somewhere on the mountain surface. a plateau on the mountain is not an optimal solution. a plateau of solutions is an optimal solution.

by the way, tester has a complex optimisation criterion, it is a smoother function than just balance, profit factor and other criteria separately. a custom criterion can still be made, trying to make the optimisation function smoother.

 

https://habr.com/ru/post/318970/

specific algorithms for learning networks are different from general-purpose algorithms, the more interesting it will be to do comparative tests of both
Методы оптимизации нейронных сетей
Методы оптимизации нейронных сетей
  • 2017.01.04
  • habr.com
В подавляющем большинстве источников информации о нейронных сетях под «а теперь давайте обучим нашу сеть» понимается «скормим целевую функцию оптимизатору» лишь с минимальной настройкой скорости обучения. Иногда говорится, что обновлять веса сети можно не только стохастическим градиентным спуском, но безо всякого объяснения, чем же...
 
The complex criterion was removed in the latest releases for some reason :)
 
СанСаныч Фоменко #:

Once again: extrema are of no value: an unstable point, which, moreover, does not exist, since we are dealing with random processes, and non-stationary ones at that.

We need to look for a plateau, even the one shown in the figure, as long as it is profitable, even if it is above the local and global minimum. Such a plateau will theoretically show the upper boundary of profitability of the TS. And the found extrema are nothing at all - they are definitely not in the future, but there is hope for a plateau

This isexactly what I am trying to realise, only at a more technical level....

Instead of a plateau I have a real signal, instead of an extremum I have noise...

If we take it for granted that the optimisation surface is noisy, then we need to avoid the noise and look for the real extrema, which should be much more robust to new data.... Because logically, a slow signal changes slower in time than a fast noise.

 
Maxim Dmitrievsky #:
The complex criterion was removed for some reason in the latest releases :)

it seems to be there)))


 
Evgeni Gavrilovi #:

Finally got its own loss function, the derivative is represented as a product of Sharpe, error and weights.

is_max_optimal=False indicates that the value is decreasing, but since I also multiplied by -1, the opposite is true.

Is there any way to feed balance or something else through the gradient into the boost.....


Here's the schematic:

we mark the chart with perfect trades (at the extremum down we buy, at the extremum up we sell) we create a fake perfect trade.

I'll call it a perfect balance


Next we calculate the balance of trade from the boost

then in the objective function we simply calculate the error of the trade balance of the boost with the ideal balance.

sqrt(sum((баланс буста - идеальный баланс) ^ 2)

we get an adjustment to the ideal balance, i.e. it is not a search for an abstract profit maximum, but an adjustment to the ideal trade expressed in the profit balance.


Blue is the ideal balance, black is a trace and model test.

 
Andrey Dik #:

I think I do.)

Ah, now it looks like this
 
mytarmailS #:

Is there any way to feed balance or anything else through the gradient into the boost....


Here's the schematic:

we mark the chart with perfect trades (at the extremum down we buy, at the extremum up we sell) we create a fake perfect trade.

I'll call it a perfect balance


Then we calculate the balance of trade from the boost

Then in the objective function we simply calculate the error of the trade balance of the boost with the ideal balance.

we get an adjustment to the ideal balance, i.e. it is not a search for an abstract profit maximum, but an adjustment to the ideal trade expressed in the profit balance.


Blue is the ideal balance, black is traine and model test.

Well, that's close to what I'm saying.

it is not the balance that needs to be maximised, but a certain complex criterion, in your example, the breakdown into separate trades. this is a derived function from the original balance, a smoother function. that's what we need to look for the global optimum of the derived function. that's what I'm trying to say. and in this case it is important how qualitatively the global extremum of the derived function will be found.

There are many ways of creating derivatives of functions from the original one, limited only by imagination.

instead of throwing yourself at people, you can try to understand. if you understand, good. if you don't understand, pass by.