What to feed to the input of the neural network? Your ideas... - page 54

 

This idea:

As you know, SL and TP are usually not set during training/optimisation. It is difficult for training, and when optimising - the results on back and forward are usually worse than without them. The price tries to hit the stops.
And the task is to teach the NS to exit in time both in profit and loss.

But in practice, on back and forward without stops, the NS often goes into over-sitting or closes at the bottom, because it does not have skills on new data - when to exit.


And what if we input drawdown by means?

We will poke the NS's nose into the online result of its work, in which it will see a heavy drawdown and react to it.

For example, it is known that a number affects the NS's work the more its value is. In normal operation the input drawdown value will be zero or near zero, but when the position goes bad - the value will increase and will start to "nightmare" the integer structure of weights, as a result of which the optimiser will select weights in such a way as to react to this input.

In the end, it will either nullify it so that it doesn't interfere with it, in which case the feature won't work, or it will somehow learn to react to its work.


Notes of training with reinforcement slip through, in which all account data are also thrown as a state: balance, drawdown, etc.

But I haven't done such a thing with MLP.

If there is something interesting, I'll write you back.

 
Ivan Butko training with reinforcement slip through, in which all account data are also thrown as a state: balance, drawdown, etc.

But I haven't done such a thing with MLP.

If there is something interesting, I'll write you back.
The idea is interesting. I tried it, I input (among others) the drawdown in % of the current depo, normalised to the range [0;1]. Then I found the topic too deep to dig up quickly, so I switched to other tasks.
 
Ivan Butko #:
What if we input drawdown by means?
.

it will be a martingale. the feedback from the drawdown generates it, and it doesn't matter how it is realised by a rigid formula or with a layer of neuronics.

 
Maxim Kuznetsov #:

Martingale will be martingale. feedback with drawdown generates it, and it doesn't matter how the connection is implemented by a rigid formula or with a layer of neuronics.

In my experiments the opposite happened - the network tried to suppress trading activity at the slightest drawdown, I had to penalise for lack of trades.
 
Ivan Butko #:
For MLP, that's with 3 neurons.

How many predictors? How many predictors actually influence the result in the model?

Do you get similar results on other tools?

How do you stop the training - by what criterion or full search?

 
Aleksey Vyazmikin #:

How many predictors are there? How many predictors actually affect the outcome in the model?

Do you get similar results on other instruments?

How do you stop the training - by what criterion or a complete search?

When ZigZag, from 1 to 3 inputs.
When price position in the corridor, also from 1 to 3 inputs.

I checked only on the euro, pound and franc. On the euro and pound all are good, on the franc the price position behaves better, apparently due to the flatness of the pair.

Training, if through the reverse propagation of the error, I do not stop, in NeuroPro it stops itself after several appearances of ZeroStep instead of the number of the error. I don't know what criterion is set there.
And if it is an optimiser, I run it full time until it stops. Sometimes I will run it a second time. Roman Poshtar runs it ten times in his articles, I have not reached such events yet.

 

I have implemented two features

It all relates to fitting, so nothing supernatural



The first is dynamic weight, range mobility, running the input number through anartificial function. It's all of the same essence.

I drew myself an idea in pinterest, variations of the idea




That is, depending on what the input value is, it is multiplied by a different weight. Such a thing consumes more values in the MT optimiser per neuron, but it is more... flexible. And sometimes it unlocks the potential of the input data, producing sets that do not appear in standard MLP with the same number of weights.






The second feature is signal amplification/weakening.

It differs from the shifter from the previous chip (when a separate section in the range of a number changes polarity) in that it flips numbers only in its polarity.

For example, if a number came to the input 0.9 from the range [0..1], the system flips it to 0.1. And vice versa.

If the range is [-1..1] and the number is -0.3, it will be flipped and amplified to the negative zone to -0.7.

This feature is necessary if you need to amplify the signal, which in a conventional MLP constantly only weakens (due to the specifics of the weights - they are all - less than 0). Of course, it is possible to set the range from -2 to 2, or from -10 to 10 as weights, especially relevant in the first feature - but, firstly, it is more expensive for the Optimiser, which is limited by parameters, and where it is easier to invert the number with a single boolean (true-false), which is nothing for the Optimiser, and multiply this new number by the standard weight below 0-l, thus making the necessary correction with the input. Secondly, it is impossible to amplify the input number 0.01 and below with such a range. It will still be uninfluential to the system. But what if it is key to the strategy? This is where amplification is needed.

Optionally, the optimiser also chooses whether to apply weakening or amplification to the input.




All these features in practice, in my subjective opinion, better and faster unlock the potential of the input data in the limited form provided by the Optimiser.
And also, it introduces new sets, which in the standard scheme of weights (all with all and static) - do not allow to reveal the input data.

 

Feature


Surprisingly, I found a blatant MLP bug - it doesn't just fit the trade to the story, it fits positions to the story specifically



Based on these considerations, I added a mirror module - I resubmit data to the input, only mirrored: each value is multiplied by -1.
But I do it only if there is no signal to one of the positions.
That is, if after the first run the output of the NS is greater than the opening threshold - please, open at ease
.
And if it is less than the threshold value - then I mirror it to see if it corresponds to the inverted pattern on the chart, which the NS does not want to trade.
And if the new value is higher than the threshold value - then I rewrite OUT to this value, but with the opposite sign.


As a result, the NS cannot "hide" from one and the same type of position and has to put up with the fact that it has to open both BUY and SELL depending on the chart. Now "on the slope" SELLs are not lost, and BUYs are not lost on the rise


In practice, there are fewer sets, the extremely "cool" ones are gone, and the "good" ones are left.

Subjectively, it seems that on the back and forward, when overoptimised, the balance is more likely to flutter than to go to the bottom. This is already good.

I think such a feature should be a mandatory attribute of NS.

 
Ivan Butko #:


In practice, there are fewer sets, the extremely "cool" ones are gone, and the "good" ones are left.

Subjectively, it seems that on back and forward, when overoptimised, the balance more often flies rather than goes to the bottom. This is already good.

I think this feature should be a mandatory attribute of NS.

If I understand the idea correctly, under these conditions the network tries to look for mirror patterns only, basically.

Probably, there are fewer trades, as there seem to be no real mirror patterns, there are different patterns for sell and buy - you can see it well with your eyes.

You can try to train two networks for two directions, and the number of trades in both directions should be approximately equal. In case of a strong difference in the number of trades - apply penalties or a decreasing coefficient on the final value of ff.

 
Andrey Dik #:

If I understand the idea correctly, the network is only trying to look for mirror patterns under these conditions, essentially.

Probably, there are fewer trades, because there seem to be no real mirror patterns, there are different patterns for sell and buy - you can see it with your eyes.

You can try to train two networks for two directions, and the number of trades in both directions should be approximately equal. In case of a strong difference in the number of trades - apply penalties or a decreasing coefficient on the final value of ff.

We have come to the principle paradigms of trading:

1) Patterns are the same for buy and sell, just mirror

2) Patterns for buy and sell are different


Yes, indeed, as long as there is no evidence, you can rely on some beliefs or facts.

In this case, as I said above, I rely on the fact that in all known TSs the conditions for BUY and for SELL are the same, mirror-like.

This applies to both draining (99.9....%) TSs and successful ones. I emphasise - successful ones. They all have mirror rules.


The fact that any discrimination of one of the types of deals negatively affects forwards and backs also plays against the second position in my opinion.

For example, my trick about the range - if it is not mirrored, but different (i.e. from -1 to 0 and from 0 to 1 will be completely different areas with different weights) - then the optimisation and training itself will look both on the optimisation period - terrible and cramped, and on the forward and back - terrible and cramped.

And if it is mirrored - then smooth transitions are more likely to occur. Imho, subjective.


Also against the second option plays the fact, as mentioned above, if you teach in 2020 - then in 2021 pours. And these are two years opposite in direction, starting right from the New Year.
So, an NS without a mirror, or a separate NS for BUY, which is trained separately, is guaranteed to pour in all sets of optimisation in 2021. You press them right after each other, they all peaked. All of them have learnt BUY, and in 2021 they open BUY wherever they can, they don't know how to get out of it, and only a little bit SELL, and then - it's unclear where.


But I don't reject this variant and test everything that comes to hand ))
Because every day something new shows up