Algorithmic ''centrifuge'' - page 3

 
Реter Konow:

If I understand the GA correctly, it narrows down the search for values in the Optimisation process.

For example:

There are Parameters A,B,C. Their range of possible values is 4.5 billion.

There is Parameter X, which varies from the values of Parameters A,B,C. However, a pattern of changes is not revealed.

Task: bring Parameter X to value Y by enumerating values of A,B,C.

Two variants: (1) direct brute force and (2) genetic algorithm.

The second variant effectively narrows down the field of searching for the right values.

During optimization, genetic algorithm cuts off branches with ranges of parameters whose results are statistically averagely below the parallel range of parameters that are more statistically promising according to the chosen maximality criterion. It simply stops dealing with the less promising ones.

Besides, the tester has an opportunity to use Custom maximisation-minimisation selection parameter. Let it be the ratio of profit to the drawdown. But if "Use genetic algorithm" is checked, the optimizer will not stupidly calculate all possible combinations of parameters. It will cut off on statistical probability. More precisely, non-perspective.

And the logical "AND". when trading already, ie this indicator in the right conditions, and the second and third, and the 10th always narrows the probability of a positive convergence of all parameters at one time. Individually, without mathematical "AND" they are more likely to trigger. There are on the Christmas tree. :) All together. Otherwise, one came, the other didn't. Okay, that's New Year's Eve. Happy New Year.

There are these combinations of indictors that confirm one another. But they are already self-written. And how do you incorporate them into the strategy builder? In addition, Custom indicators plugged in the Expert Advisor significantly lengthen the optimization time. By 10 times.

 
Реter Konow:

Based on this topic:https://www.mql5.com/ru/forum/79324

Is it possible to build strategies to automatically build parameter configurations?


The concept is as follows:

  1. All trading systems use common groups of parameters:
  • Indicator parameters - derived parameters calculated by indicators. Each indicator can be represented by a single parameter, which produces different values using its calculation formula.
  • Order parameters - lot, stoploss, takeprofit, trailing values and others. Formulas are not used in calculations. Only optimization that selects the best values depending on other factors is used.
  • Market parameters - price, volume. They are taken into account within the indicator formulas and do NOT require a separate inclusion into the systems.
  • Statistical parameters - drawdown, profit factor, equity... They do NOT need to be included in the trading system, as their function is replaced by optimizing the order parameters and system overshooting.
  • The deposit balance is the main parameter with respect to which the other parameters are searched and their values are optimized.

Since combinations of these parameters can be found in all Expert Advisors, we could theoretically create a mechanism for the automatic strategy build. The mechanism will try different configurations of the indicator parameters and their values, considering them as market entry signals. Order parameters will be optimized on the history in the tester. The main indicator of a successful parameter fitting is the increased deposit. It is the percentage of its growth that will be considered as the efficiency of parameters configurations and their values.

I would like to know about practicability and expected technical complexity of implementing such a mechanism.

Here I am talking about the same, but there are more good and different topics)

https://www.mql5.com/ru/forum/329028#comment_14326397

In a nutshell, decomposition of the problem allows for this. You divide the general view of the strategy into sub-stages - links of the decision tree, and create a tree assembly shell and enumeration of variations of its branches and leaves.

The strategy builder I called.

Оптимизация. Граничные Условия Параметров
Оптимизация. Граничные Условия Параметров
  • 2019.12.21
  • www.mql5.com
Решаю задачку о автоматизации проверки стратегий, это типа как тут в соседней ветке описывалось, но по другому...
 
Dmitry Fedoseev:

This is a genetic optimization algorithm. Only it doesn't usually parse which block which parameter belongs to which block.

ps: everything you can think of has already been invented a long time ago.

ps2: the centrifuge has its rightful place next to the kernel and the engine.

And about my constructor idea at the link above - has it been done somewhere already?

 

Compile a database of strategies.

Strategy

Martin

grid

indicator

elementary

1 indicator

Stochastic

parameters

5,3,3

signal

Up - crossing 20

Down - crossing 80

2 indicators

Stochastic and RSI

parametres

stochastic (5,3,3) && (RSI 3)

signal

Up - Stoch-20 && RSI 30 crossing

Down signal - crossing Stoch-80 && RSI 70 or something similar and more realistic.

from levels

combination of candlesticks

etc.

Without this or some other formalisation, streamlining, I don't think there's much to catch.

It will all be the rustling of leaves in the garden.

 
Aleksey Mavrin:

And as for my constructor idea in the link above - has this been done somewhere before?

It has actually been done that way.

 
Dmitry Fedoseev:

This is actually how it is done.

I don't mean strategy construction itself - but a shell for automatically enumerating combinations of all subspecies each with each, including in the MT optimiser.

I just did not find information about such results other than ideas, but maybe it really has been done before and I did not look hard enough.

 
Oleg Papkov:

...

There are combinations of indictors that confirm one another. But they are already self-written. And how to include them into the strategy builder? In addition, Custom indicators plugged in the Expert Advisor significantly lengthen the optimization time. By a factor of 10.

Include them as one Parameter. One confirms the other - so they are together - ONE. To combine.

(There is nothing you can do about increasing the time of optimization. ))

 
Aleksey Mavrin:

I'm on the same page here, but more topics are good and different)

https://www.mql5.com/ru/forum/329028#comment_14326397

In a nutshell, task decomposition allows you to do this. You divide the overall view of the strategy into sub-stages - the links of the decision tree, and create a shell to assemble the tree and enumerate variations of its branches and leaves.

The strategy constructor I have named.

If you've managed to tie this constructor entirely to Optimisation - that's what I'm talking about.

  1. We take some common base of Parameters for the Trading System.
  2. Under some Parameters - calculation algorithm, Indicator, equation, preset sampling.
  3. Parameters, presented as Indicators, are variables and their values are formulas. They will be "enumerated" at the same time as the rest of the System parameters.
  4. Only the values of the Order and Stop parameters are optimized (without going through the parameters themselves).

As a result, the Optimization should result in full-fledged Strategies. I see no reason why this method of strategy building cannot work.

 
Oleg Papkov:

Compile a database of strategies.

Strategy

Martin

grid

indicator

elementary

1 indicator

Stochastic

parameters

5,3,3

signal

Up - crossing 20

Down - crossing 80

2 indicators

Stochastic and RSI

parametres

stochastic (5,3,3) && (RSI 3)

signal

Up - Stoch-20 && RSI 30 crossing

Down signal - crossing Stoch-80 && RSI 70 or something similar and more realistic.

from levels

combination of candlesticks

etc.

Without this or some other formalisation, streamlining, I don't think there's much to catch.

It will all be the rustling of leaves in the garden.

From the point of view of Optimisation and strategy generation, such classification is unnecessary. Even, useless. It does not matter for the final result, type or name of the strategy. The main thing is that the strategy should make money on the period and instrument being tested.

Normal Optimization uses ONLY the values of the Parametersof the already built System. This optimization should substitute in the Signal different Parameters (depending on the pass), representing different indicators and formulas.

This is the peculiarity of the approach.

 

indicators considering history with N depth can be presented as a functional product of SMA 1...N, that's why

even for a pair of elementary indicators with period 32, without taking into account constant coefficients and excluding symmetric solutions,

number of variations C(32,16)=601080390

live with it

Reason: