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

 
Aleksey Terentev:
And yes, the whole point here is normalization. It will jump and normalize the data differently at different time intervals.

That's right, I'll try to solve it sometime.

 
Maxim Dmitrievsky:

No, I already cited the screen, the increments are stationary and symmetrical on both sides of zero, so the probabilities will be +- the same


Maxim Dmitrievsky: "Perhaps it will be, but when I tried to reveal the symmetry in the price behavior I did not find it.

With respect.
 
Andrey Kisselyov:
It may be, but when I tried to find symmetry in price behavior I didn't find it.

With respect.

Here the probability is essentially 50\50 (above/below zero) - whether it belongs to the class or not, and all other values are signal strength. So even if the increments are not symmetric for buy and sell, the NS should understand it by itself :)

 
Maxim Dmitrievsky:

Here the probability is essentially 0 and 1 - belongs to the class or not, and all other values are signal strength. So even if the increments are not symmetrical for buy and sell, the NS must understand it by itself :)

In my opinion, in this case it is necessary, as I said above, to have a 3-state, some limit up to which the signal belongs neither to buy nor to sell.

Sincerely.

 
Andrey Kisselyov:

In my opinion, in this case it is necessary, as you mentioned above, to have a 3rd state, a certain border till which the signal belongs neither to buy nor to sell.

Regards.


then we will refer to both classes with equal probability

 
Maxim Dmitrievsky:

then we assign to both classes with equal probability

NS essentially should find this boundary by itself, it only needs to be provided in the code.And it does not necessarily have to be equal probability for both directions.

With respect.
 
Maxim Dmitrievsky:

On the example of a linear classifier. Suppose we teach something to the classifier, on 2 outputs we supply price increments from 0 to 1, where 0.5 is no signal (sum of outputs is always equal to one)

There is something wrong in this phrase. If you teach the classifier, the teacher is not the increments from 0 to 1 but concrete values like -1 and 1 (falling price / rising price). When you create a training table and a teacher for the model, the increments must be rounded to -1 and 1, and all information about the value of the increment will be lost.

Further the model will be trained, and some classification models at prediction can really give probability of class instead of strict values -1 and 1. But this probability is not related to the value of increment at all, it can be treated as "price with probability X% will probably increase, by an unknown value of increment".


Maxim Dmitrievsky:

And if we take a neural network with non-linear classification, will the outputs tell us about the signal strength or will they only indicate the degree of belonging to 1 of 2 classes and no more

Here again, there will only be degrees of membership in one of the two classes and no more. The requirement as in the picture will not be fulfilled. If you want to know the value of growth, you'll have to create a bunch of classes with several levels of growth.



You can use regression instead of classification. And you need a regression model. Then, during training, you can feed the price increments without changes or rounding, and if the model can achieve high accuracy, it will predict the magnitude of the increment, rather than any probabilities and classes. It is very convenient.

Although in Forex, I did not achieve more with regression than with simple classification. The model produced very small values during prediction, although it guessed the direction in more than 50% of cases, but it was impossible to estimate the size of the expected growth from the prediction. The result was treated as with the two classes - "the price will probably grow by an unknown amount".

 
Maxim Dmitrievsky:

Help me understand the process :)

On the example of a linear classifier. Suppose we teach something to the classifier, we feed two outputs with price increments from 0 to 1, where 0.5 is no signal (sum of outputs always equals 1)

If we simply draw a regression line, for example, according to the prices, the larger price increments will lie further from the line, the smaller ones closer, i.e. if the classifier outputs show 0.9; 0.1, the positive increment lies further from the line, i.e. the signal 0.9 will be stronger than the signal 0.6 to buy

And if we take a neural network with non-linear classification, will the outputs show the signal strength or will they only show the degree of belonging to 1 of 2 classes and no more

I.e., will this condition be met:


It seems to me, that on this situation half of beginners, who don't know the matter very well, will get screwed. The reason is that the degree of belonging to this or that class will intuitively tell about the greater/lower signal strength. But whether it is so actually and whether it is not better to create more classes on which to distribute values of increments, say, in %, then getting of value in this or that class (one of 10, suppose) already precisely will prompt value of increments.

If you want to have such a characteristic as signal strength on the output, why would you want to solve a classification problem that will remain finite (discrete) with any increase in the number of classes. Take the regression problem and give -1 (100% SELL) to 1 (100% BUY) or even in points - negative for SELL and positive for BUY, zero will be flat, as it should be.

P.S.
have already written in the previous message - approximately the same meant...

 
Dr. Trader:

There is something wrong with this phrase. If you train a classifier, the teacher will not be the increments from 0 to 1, but specific values such as -1 and 1 (price drop / price rise). When you create a training table and a teacher for the model, the increments must be rounded to -1 and 1, and all information about the value of the increment will be lost.

Further, the model will be trained, and some classification models may indeed give a class probability instead of strict values of -1 and 1. But this probability is not at all related to the value of the increment, it can be interpreted as "price with X% probability will probably increase, by an unknown amount of increment."


Here again there will only be degrees of belonging to 1 of 2 classes and no more. The requirement as in the picture will not be fulfilled. If you want to know the magnitude of the increment, you have to create a bunch of classes for several increment degrees.



You could use regression instead of classification. And you need a regression model. Then it is possible to feed price increments during training without changes and rounding, and if the model can achieve high accuracy, it will predict the magnitude of the increment, rather than any probabilities and classes. It is very convenient.

Although in Forex, I did not achieve more with regression than with simple classification. The model produced very small values during prediction, although it guessed the direction in more than 50% of cases, but it was impossible to estimate the size of the expected growth from the prediction. The result was interpreted as with the two classes - "the price will probably grow by an unknown amount".


I see :) so the probability of assigning to a class on the output has nothing to do with the probable value of increments... you see, some people get confused here too, for newbies it's an ambiguous point... On the other hand, if a neural network outputs probabilities (e.g. softmax layer), what for do we need them if belonging to class will be defined by probability more than 0.5 all the same? And then you can really try to use regression model and get rid of all normalization of output values... by the way, I use random forests and normalization of inputs is not needed there

 
Ivan Negreshniy:

If you want to have such a characteristic as signal strength at the output, then why do you need to solve the classification problem, which will remain finite (discrete) with any increase in the number of classes. Take the regression problem and give -1 (100% SELL) to 1 (100% BUY) or even in points - negative for SELL and positive for BUY, while zero will be a flat, as it should be.

P.S.
have already written in the previous message - approximately the same thing I meant...


Yes, it turns out that the regression will be smarter (I use RF, not neuronet by the way)

Reason: