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

 
Renat Fatkhullin #:

The task of training a neural network is to find an algorithm that minimises the error on the training sample, for this purpose a loss function is used. To calculate the deviation, theLoss method is used, which allows you to specify 1 of 14 types ofENUM_LOSS_FUNCTION enumeration.

The obtained deviation values are then used to refine the parameters of the neural network, this is done using theDerivative method, which calculates the values of the derivative of the activation function and writes it into the passed vector/matrix.

Due to the ability to extend the enumerations, we can add new algorithms as needed.


I figured it out by the example of MAPE.

I thought it was a loss function that minimises the target function.
And this is just a metric calculation.

vector Forecast = {28.252177870295327, 1.386017247821653, 1.321279511381957};
vector Fact     = {45.979999999999997, 1.710000000000000, 1.340000000000000};

double MAPE = Forecast.Loss(Fact,LOSS_MAPE);

Print(DoubleToString(MAPE,2) + " %");
19.63 %


Which is the same thing in the code

vector Forecast = {28.252177870295327, 1.386017247821653, 1.321279511381957};
vector Fact     = {45.979999999999997, 1.710000000000000, 1.340000000000000};

vector loss = {0.,0.,0.};

for(int i=0; i<3; i++)
   loss[i] = fabs(Forecast[i] - Fact[i]) / Fact[i];

double MAPE = loss.Mean()*100;

Print(DoubleToString(MAPE,2) + " %");
19.63 %



Then there is a question to the description of the documentation.

Is there a mistake in the description?

ll

Maybe it would be more correct:
Calculates the value of losses as a metric MSE, MAE, etc...?
After all, the function of minimising losses should be written by yourself.


And there is some strange description here.

i

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

Looking for companions on an interesting and exciting journey down unknown paths in search of mysterious predictors/features/signs.

I have a map to find them on, need hands to set traps and ponder the habits and halo of these amazing phenomena.

The journey is not easy, long but exciting and I'm sure we won't be without trophies!

If you are interested - ask questions!

Everything has already been invented before us, so I'd like to just jump on the train.

Now we'll get neural networks in metatrader and then we can relax.

In general, we can just buy gas futures and then sell them.
 
Maxim Dmitrievsky #:
So everything has already been invented before us, so I'd like to just jump on the train

Maybe invented, but clearly not on the surface in open sources.

For search and selection of predictors, I am developing a systematic approach, i.e. there will be a typing of predictors, which are based, among other things, on indicator data. I would like to sift through the code base in search of interesting things. In general, in my paradigm there is a concept "Event", it is something that can affect the price, and it is described by predictors. There will be different types of events, for example, "price broke the level" (which is generated by the indicator), and the description of these events are predictors responsible for time, history of the event, relativity of the event (normalisation) - the coordinate system will also be selected.

The method itself works, it allows to select interesting variants, but we need to generate these variants.

I am looking for people to speed up the process and enhance critical and creative thinking.

Yes, there will be no interested people, I will be picking alone - slowly and tediously.

 
Aleksey Vyazmikin #:

Might be invented, but clearly not on the surface in open sources.

For search and selection of predictors I am developing a systematic approach, i.e. there will be a typing of predictors, which are based, among other things, on indicator data. I would like to sift through the code base in search of interesting things. In general, in my paradigm there is a concept "Event", it is something that can affect the price, and it is described by predictors. There will be different types of events, for example, "price broke the level" (which is generated by the indicator), and the description of these events are predictors responsible for time, history of the event, relativity of the event (normalisation) - the coordinate system will also be selected.

The method itself works, it allows you to select interesting variants, but you need to generate these variants.

I am looking for people to speed up the process and enhance critical and creative thinking.

Yes, there will be no interested people, I will pick one - slowly and tediously.

I've already created all this
 
Aleksey Vyazmikin #:

Might be invented, but clearly not on the surface in open sources.

For search and selection of predictors I am developing a systematic approach, i.e. there will be a typing of predictors, which are based, among other things, on indicator data. I would like to sift through the code base in search of interesting things. In general, in my paradigm there is a concept "Event", it is something that can affect the price, and it is described by predictors. There will be different types of events, for example, "price broke the level" (which is generated by the indicator), and the description of these events are predictors responsible for time, history of the event, relativity of the event (normalisation) - the coordinate system will also be selected.

The method itself works, it allows you to select interesting variants, but you need to generate these variants.

I am looking for people to speed up the process and enhance critical and creative thinking.

Yes, there will be no interested people, I will be picking alone - slowly and tediously.

don't forget to add real time...or you'll end up like everyone else :-)

a la 2 pcs: y=abs(sin(x))*sin(x) ; with frequency of 1 day and 1 week ; phase shift is better to calculate in advance

because the probabilities of indicators and line crossings depend on them.

it was by the way about harmful, hated here Fourier :-)

 
mytarmailS #:
I've already created it all.

You're so good!

And you found a lot of interesting and sustainable?

Is the issue with the solution working in the terminal solved?

 
Maxim Kuznetsov #:

don't forget to add the real time...or you'll end up like everyone else :-)

a la 2 pcs: y=abs(sin(x))*sin(x) ; with a frequency of 1 day and 1 week ; the phase shift is better calculated in advance

because the probabilities of indicators and line crossings depend on them.

it was by the way about harmful, hated here Fourier :-)

Well, I'm not clever, in my fantasies.... What does "real time" mean?

 
Aleksey Vyazmikin #:

0)What a good boy you are!

1)And did you find a lot of interesting and sustainable things?

2)Is the issue with the work of the solution in the terminal solved?

0) Yes, I am like that...)

1) I haven't deployed the whole thing yet,
1. There are problems with curse of dimensionality and combinatorial explosion, but this is solvable in theory, in favour of accuracy....
2. There is a problem with the fact that the search algorithm is slow, a lot of things need to be written in C or C++, and I don't know how to do it.
3. Even an optimised algorithm will not be able to search for patterns in a large date, you need to search for patterns locally....
But in general, if it doesn't work, nothing works....

2) Yes.


By the way, the word "event" can be replaced by the word "rule".


 
Aleksey Vyazmikin #:

Well I'm not clever, in my fantasies..... What do you mean, "real time"?

The probability of price crossing any line (and triggering of indicator signals) depends on the time of day and day of week.

It is necessary to add cyclic time to NN and DL. The simplest way is a sine wave. Dependencies are non-linear, so it is simply squared, taking into account the sign. There are two additional inputs that are responsible for time references. Midnight/midday is different everywhere, so it is better to calculate and give the phase in advance. This is the model's connection to the real world and its time.

If they are not explicitly given, then IMHO you will either get a pumpkin or the whole thing will try to get and output them by itself.

 
Maxim Kuznetsov #:

the probability of overcoming any line by the price (and triggering of indicator signals) depends on the time of day and day of the week.

It is necessary to add cyclic time to NN and DL. The simplest way is a sine wave. Dependencies are non-linear, so it is simply squared, taking into account the sign. There are two additional inputs that are responsible for time references. Midnight/midday is different everywhere, so it is better to calculate and give the phase in advance. This is the connection of the model with the real world and its time

If they are not explicitly given, then IMHO you will either get a pumpkin or the whole thing will try to get and output them by itself.

Sine together with cosine should be fed as 2 fics. Otherwise 0,5 etc will occur 2 times per revolution, like 2 identical times...
Or you can just have day number and hour number. No difference. They are equally well memorised.