Is there a pattern to the chaos? Let's try to find it! Machine learning on the example of a specific sample. - page 2

 
elibrarius #:

Then there is little point in the columns of the financial result. There will also be errors of 0 class prediction (instead of 0 we will predict 1). And the price of the error is unknown. That is, the balance line will not be built. Especially since you have 70% of class 0. I.e. 70% of errors with unknown financial result.
You can forget about 3000 points. If it does, it will be unreliable.

I.e. there is no point in solving the problem....

You have misunderstood something, if you have classified the value 0, and should have been "1", then there will be no loss - no market entry, but if you have classified "1", and should be "0", then there will be a loss, you just need to determine the Target_P column with a loss - Target_100_Buy or Target_100_Sell. You can simply take the value of the Target_100_Buy or Target_100_Sell columnand multiply it by (-1).

Well, how can you state that there is no solution and think that I don't know how to do sampling - shocked.

 
Aleksey Vyazmikin #:

You have misunderstood something, if you have classified the value 0, and should be "1", then there will be no loss - no market entry, but if you have classified "1", and should be "0", then there will be a loss, you just need to determine the column Target_P to determine the column with a loss - Target_100_Buy or Target_100_Sell. You can simply take the value of the Target_100_Buy or Target_100_Sell columnand multiply it by (-1).

Well, how can you state that there is no solution and think that I don't know how to do sampling - shocked.

Earlier you said:

There will be no profit (if you do a revaluation there will be a small percentage of profit at zero).

Which is very confusing.

 
elibrarius #:

You used to say:

Which is very confusing.

So you asked " I .e. if at 0 class (do not enter) the correct direction of the trade is chosen, will there be profit or not? ", I answered that there will be no profit, not from the fact that you can not choose there instead of "0" "1" or "-1" when repartitioning targets, if you decide to do it. In brackets I specified that in fact the strategy can make a profit when applied in reality, if you change the algorithm and let the model determine the direction of entry. Have you been able to explain it now?

 
Aleksey Vyazmikin #:

So you asked " I .e. if at 0 class (do not enter) the correct direction of the trade is chosen, will there be profit or not? ", I answered that there will be no profit, not because you can't choose "1" or "-1" instead of "0" when repartitioning targets, if you decide to do it. In brackets I specified that in fact the strategy can make a profit when applied in reality, if you change the algorithm and let the model determine the direction of entry. Have you been able to explain it now?

Not really...

Are you setting the TP/SL there? Based on the values from the financial result columns?

What do you mean " you can't choose "1" or "-1" instead of "0" ".
The model will make a mistake and choose 1 and -1 instead of 0.

 
elibrarius #:

Not really...

Do you set the TP/SL there? According to the values from the columns of the financial result?

TP is not there at all, and SL is not there either (in this sample - it seems :)). - closing on the next candle that has reached the Donchian channel. For example, we crossed the upper boundary, on the next bar we opened a buy and wait until the lower boundary is crossed, if there was a profit, the target is "1", and if there is a loss, the target is "0".

elibrarius #:

What do you mean " you can't select there instead of "0" "1" or "-1" ".
The model will make a mistake and choose 1 and -1 instead of 0.

It means that target zero cannot be replaced by another target in the sample, because the loss/gain is not calculated for the other target!

 

As a result, the balance is constructed as follows:

Predicted 1, and set 1 => balance increase by the column modulus of any balance
Predicted 1, and set 0 => balance decrease by the column modulus of any balance
Predicted 0 => balance does not change.

Now I see.

 
elibrarius #:

In the end, the balance sheet is structured like this:

Predicted 1, and set 1 => balance increase by the column modulus of any balance
Predicted 1, and set 0 => balance decrease by the column modulus of any balance
Predicted 0 => balance does not change.

Now I see.

Essentially yes. It's just that I had everything customised for 3 targets - some kind of standard and so far I haven't abandoned it.

 
My best results look like this.
Training at 35226, embargo 1000, test 9000 last lines.
Best balance in option 81: 0.01600 pts.
50/50 overall. There is no stable growth.

...
 

What's the best balance you've got?

 
elibrarius #:
My best results look like this.
Training at 35226, embargo 1000, test 9000 last lines.
Best balance in option 81: 0.01600 pts.
50/50 overall. No stable growth.

...

Can you check the model exactly on the exam.csv file?

Have you tried any manipulations with the sample?

Here's the balance on the exam sample after removing some of the predictors.

Of course, on the graphs of the model response distribution you can see that the model was trained just a little bit - Recall is very low, but it is already some result.

train.csv


train

exam.csv

Reason: