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

 
Roman #:
I read your battle on optimising parameters, and I see there are people who know how to do it.
Explain, how can I optimise parameters for zero expectation of variance?
For example, it is possible to use the mt5 optimiser, and optimise the trading algorithm by profit, thus adjusting the parameters to variance.
But this requires prescribing the execution of trades, so that the mt5 optimiser starts working.
And how can I optimise not by profit? But by the variance criterion.
Point you in the right direction.

Use the OnTester() function, create any optimisation criterion you are interested in and run optimisation by custom criterion in the tester. Well, or I misunderstood what your question is.

 
Aleksey Nikolayev #:

Use the OnTester() function, create any optimisation criterion you are interested in and run optimisation by custom criterion in the tester. Well, or I misunderstood your question.

Yes, I think you have understood correctly.
I just don't understand, the documentation says
OnTester() is called in Expert Advisors when theTester event occurs in order to perform necessary actions at the end of testing.
So during the whole testing time, we get only one optimisation variant? And only one value?
As I understood from the documentation OnTester() returns only one value of double type.
And if there are more optimised parameters, for example two. Then OnTester() is not suitable for solving this problem?

Документация по MQL5: Программы MQL5 / События клиентского терминала
Документация по MQL5: Программы MQL5 / События клиентского терминала
  • www.mql5.com
События клиентского терминала - Программы MQL5 - Справочник MQL5 - Справочник по языку алгоритмического/автоматического трейдинга для MetaTrader 5
 
Roman #:

And if there are more parameters to be optimised, for example two. Then OnTester() is not suitable for solving this task?

Read about frames.

 
Roman #:

Yes, you probably understood correctly.
I just don't understand, the documentation says
OnTester() is called in Expert Advisors when theTester event occurs to perform necessary actions after the end of testing.
So during the whole testing time, we get only one optimisation variant? And only one value?
As I understood from the documentation OnTester() returns only one value of double type.
And if there are more optimised parameters, for example two. Then OnTester() is not suitable for solving this problem?

There is an article on how to make a custom strategy tester based on OnTester(), but first you need to decide how your two-criteria optimisation will look like. You can mix two criteria into one with given weights, or you can try to build a Pareto surface.

Пользовательский тестер стратегий на основе быстрых математических вычислений
Пользовательский тестер стратегий на основе быстрых математических вычислений
  • www.mql5.com
Статья описывает создание пользовательского тестера стратегий и своего собственного анализатора прогонов оптимизации. Прочитав ее, вы поймете, как работает режим математических вычислений и механизм так называемых фреймов, как можно подготовить и загрузить свои собственные данные для расчетов и использовать эффективные алгоритмы их сжатия. Также эта статья будет интересна всем, кто интересуется способами хранения пользовательской информации внутри эксперта.
 
Aleksey Vyazmikin #:

Read about frames.

Aleksey Nikolayev #:

There is an article on how to make a custom strategy tester based on OnTester(), but first you need to decide how your two-criteria optimisation will look like. You can mix two criteria into one with given weights, or you can try to build a Pareto surface.

I am just reading this article.
I understand a little bit in which direction I should dig. Thanks.
 
СанСаныч Фоменко #:

Speaking of birds.

There are no formulas with the sign of equality in the financial markets, i.e.

no formulas

y = x

By which, if x = 2, then y = 2.

This is deterministic thinking.

There are formulas:

y ~ x

according to which, if x = 2, then y = 2 in the channel of some confidence interval. But for non-stationary markets there is not even a confidence interval, because dispersion is a variable, and not even a variable, but something else.

This is stochastic thinking.

Such TS will not work. Only A=B-trading conditions-stochastic thinking works.

Stochastic thinking in general is like drunken dreams of eternity, where the higher the probability of events, the rarer the possibilities. But they are never 100% guaranteed either. As a result, the best option is not to trade.
 
Evgeni Gavrilovi #:

Maxim Vladimirovich, what do you think about quantum clustering?

https://github.com/enniogit/Quantum_K-means

I didn't see the difference and advantages at first glance.

and I don't know how to use the results afterwards. I tried to add clusters to the markup of labels, but it didn't make any difference.

When classifying, we divide into classes already taking into account forecasts, but we always cluster in the current moment. That's why we have to check these clusters for predictability, also by searching for features. In general, it is a headache.

 

it is not clear from the help how the complex criterion is calculated:

"Maximum of complex criterion" is also available. This is an integral, comprehensive indicator of the quality of a test pass. It takes into account several parameters at once:

  • Number of trades
  • Drawdown
  • Recovery factor
  • Mat. expectation of winnings
  • Sharpe ratio

This criterion allows us to understand that the maximum value of one parameter (for example, profit) is not always the best option from the point of view of complex analysis. It allows you to select the best passages step by step: first by the number of trades, then from this sample by the mat expectation of profitability, then by the recovery factor and so on. Thus, as a result of optimisation you get the best passes by all parameters, and then you can choose specific ones, for example, the ones with the highest profit.

Although it is an integral criterion, but in my opinion it is very successful. in many cases it is useful. it would be nice if the developers would explain this criterion (how exactly it is calculated) and preferably display the explanations in the help.

 
Andrey Dik #:

it is not clear from the help how the complex criterion is calculated

it is clear that there is some formula, perhaps even secret, but if it were possible to set weights to the components of the complex criterion.... mmm, a fairy tale.
 
Andrey Dik #:
it is clear that there is some formula, perhaps even secret, but if it were possible to assign weights to the components of the complex criterion.... mmm, fabulous.

Judging by the description, it can be understood that first a part of the best passes by one criterion is selected, then from the selected ones a part of the best passes by the second criterion is selected, and so on.

"It allows you to select the best passages step by step: first by the number of trades, then from this sample by the expectation of profitability, then by the recovery factor, and so on."