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

 
Like this,I will never give up:


This is what I was able to achieve on the test data. The network is running on the indicators macd, atr, stochastic. Indicator parameters are by default. There are practically no false signals. Yellow dots are network operation. But the network misses signals. I need some ideas on indicators and their parameters.


Please, tell me. What is your system written on, are there any code examples or may be an indicator posted on the forum. My thanks.

 
Dr. Trader:

It is very dangerous to distribute classes to a teacher at random, like taking some indicator to create teacher classes and then replacing some of the values with NA as well.

Even if there are good predictors and good teacher classes and the model holds good results on new data, any attempt to tweak class values can completely break the model. Finding indicators for predictors and an indicator for classes that will keep the model profitable on new data as well is a great stroke of luck.

I would recommend to start with two simple classes - the color of the next bar (i.e. buy/sell). Take at least 10000 training examples (history bar), train the model and evaluate the result on the next 10000 bars in history (that were unknown to the model during training). When you manage to find the predictors that will maintain the accuracy of the model on the same level on the old and new data - you can start to select an indicator for the teacher's classes. And it will turn out that just taking the first available indicator the model will not preserve the accuracy on new data. Why some indicators can serve for the teacher and some cannot - I do not know, it is some kind of luck and mystic.


It is not a special case of luck when these indicators are working right now. This happens when the choice of training size is right and the parameters of indices are well-matched. The point is that the next time you get a good model with them it will not be possible. But I'll tell you the secret of the market (I hope the magician will not miss it)

In order for the NS to work long and always need to find the basis for predicting or classifying the price!!!!! I have already written a hundred times. It is necessary to take such data which will be the reason for CLOSE. And then you can build ANY trading strategy based on price.

Volim+Delta+Open Interest=Close.

The mystery was easy to solve :-)

Just opening it is not a victory. You have to know how to use correctly what's in it.

 
Mihail Marchukajtes:

For the NS to work long and always it is necessary to find the basis for predicting or classifying the price!!!!! I have already written a hundred times. It is necessary to take such data which will be the reason for CLOSE. And then you can build ANY trading strategy based on price...


A very attractive idea in its simplicity.


And WHAT are we trading: price deviation? trend? level? And how do we account for a variety of orders: Are we out of the market? Are we in? Are we out? Do we hold a position? "Do we have one type of exit or several?

If we start to consider all of these circumstances, it turns out to be very difficult to construct a "teacher". But without taking into account all these circumstances, it is impossible to construct a sensible teacher, or you have to add something outside the decision-making block.

And so when the teacher is constructed, then you have to find the predictors "that will be the reason" for that teacher. And when teaching whatDr. Trader wrote"the accuracy of the model will remain about the same on old and new data".

 
SanSanych Fomenko:

On the account of the teacher, I have already suggested the following indicator, which is a good reflection of the trend in prices, looking ahead.

double iCustomAuto(const int bar, 
                   const string symbol = NULL, const int period = PERIOD_CURRENT)
{   // Generate custom signals for ML
    if( bar >= Bars-2 || 2 >= bar ) {
        return 0.0;
    }
    // double ema22,
    double ema21, ema20, ema2_, ema2__, result = 0.0;
    // ema22 = iMA( symbol, period, 2, 0, MODE_EMA, PRICE_OPEN, bar+2 );
    ema21 = iMA( symbol, period, 2, 0, MODE_EMA, PRICE_OPEN, bar+1 );
    ema20 = iMA( symbol, period, 2, 0, MODE_EMA, PRICE_OPEN, bar );
    ema2_ = iMA( symbol, period, 2, 0, MODE_EMA, PRICE_OPEN, bar-1 );
    ema2__ = iMA( symbol, period, 2, 0, MODE_EMA, PRICE_OPEN, bar-2 );
    if( ema20 < ema2_ ) {
        result = 1.0;
        if( ema21 < ema20 ) {
            result = 0.6;
        }
        if( ema2_ > ema2__ ) { // ema22 < ema21 && ema21 > ema20 && 
            result = 0.3;
        }
    } else if( ema20 > ema2_ ) {
        result = -1.0;
        if( ema21 > ema20 ) {
            result = -0.6;
        }
        if( ema2_ < ema2__ ) { // ema22 > ema21 && ema21 < ema20 && 
            result = -0.3;
        }
    }
    return result;
};
Example
 
Aleksey Terentev:

As for the teacher, I already suggested the following indicator, which is a good reflection of the price trend, looking ahead.

6 classes. What actions do they imply? 1 and -1 apparently buy/sell. And the rest?
Does the model manage to get without skews (when the model predicts predominantly 1 of the classes)? With 3 classes, there is no way I can beat the skewness. Even aligning by class, by copying examples, doesn't help. And there are 6!
 
SanSanych Fomenko:

A very attractive idea in its simplicity.


And WHAT are we trading: price deviation? trend? level? And how do we account for the variety of orders: Are we out of the market? Are we in? Are we out? Do we hold a position? "Do we have one type of exit or several?

If we start to consider all of these circumstances, it turns out to be very difficult to construct a "teacher". But without taking into account all these circumstances, it is impossible to construct a sensible teacher, or you have to add something outside the decision-making block.

And so when the teacher is constructed, then you have to find the predictors "that will be the reason" for that teacher. And when teaching whatDr. Trader wrote"the accuracy of the model will remain about the same on both old and new data".


In fact, the teacher may be anyone, as long as he looks into the future. It is enough even for 1 bar. And the inputs will be those about which I wrote earlier. Believe me, they are the ones to use, but how???? is a different story and that is where the secret of the market lies....

 
elibrarius:
6 classes. What actions do they imply? 1 and -1 apparently buy/sell. And the others?
Does the model manage to get without distortions (when the model predicts predominantly 1 of the classes)? With 3 classes, there is no way I can beat the skewness. Even aligning by class, by copying examples, doesn't help. And there are 6 of them!
No one is forcing you to use them all. Just filter by one unit in the module and that's it. Don't be dramatic.
 

I don't understand what all this utopia is all about.

Machine learning in forex is a useless thing. In forex, a new situation arises all the time, it does not stand still.

You have to make a new decision all the time, like in soccer. It is impossible to predict where the ball will appear. It is impossible to teach the robot to make a new decision.

Just like you can't teach it to compose a poem or music. It doesn't have intelligence, it doesn't have intuition.

It is impossible to program them.

 
Petros Shatakhtsyan:

I don't understand what all this utopia is all about.

Machine learning in forex is a useless thing. In forex, a new situation arises all the time, it does not stand still.

You have to make a new decision all the time, like in soccer. It is impossible to predict where the ball will appear. It is impossible to teach the robot to make a new decision.

Just like you can't teach it to compose a poem or music. It doesn't have intelligence, it doesn't have flair or intuition.

It is impossible to program them.

The schedule changes, NS finds new solutions, different from the previous ones, if I understand the theme correctly. That's why it is NEURO-.
 
Petros Shatakhtsyan:

I don't understand what all this utopia is all about.

Machine learning in forex is a useless thing. In forex, a new situation arises all the time, it does not stand still.

You have to make a new decision all the time, like in soccer. It is impossible to predict where the ball will appear. It is impossible to teach the robot to make a new decision.

Just like you can't teach it to compose a poem or music. It doesn't have intelligence, it doesn't have flair or intuition.

It is impossible to program them.


Really.... You just don't know what you're talking about, that's why you're so negative. NS knows how to generalize data and that is enough to have any new example that was not involved in the training. Interpret it correctly....

Reason: