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

 
forexman77:

So far I can not say exactly, because I played a lot of parameters improvements were about 0.1. Maybe there are some techniques that I do not know, that's why I asked.

if nothing helps, then the problem is in the data, there is nothing else to tune in las there
 
Aleksey Vyazmikin:

Of course you can, but you will have to do it in parts (the server is glitchy), the Filter set - to determine where you cannot buy/sell, the MaloVhodov set - trend entries for a decent profit, the MnogoVhodov set - all entries except for unprofitable ones.

I tried malovhodov for starters.

Tried to teach the forest to predict arr_Buy from 2015 based on arr_Vektor_Week, arr_Vektor_Day, etc.

The classes are very unbalanced (there are 10 times more examples with class 0 than class 1), this adds a lot of difficulty.

This is the 2015 tree trained on


y_pred
y_true01
09726886118
1552912256
And this is 2016, new data for the tree:
y_pred
y_true01
09658190918
162968956

The prediction in both cases is not very accurate, but at least it is more than 50% accurate in both cases.

The tree is like this:


There's always TRUE to the left, FALSE to the right. For ovals, I'll try mnogovhodov, I think it will be better, there classes 0 and 1 are more equal.

 
Dr. Trader:

I tried malovhodov for starters.

Tried to teach forest to predict arr_Buy from 2015 based on arr_Vektor_Week, arr_Vektor_Day, etc.

The classes are very unbalanced (there are 10 times more examples with class 0 than class 1), this adds a lot of difficulty.

This is the 2015 tree trained on


y_pred
y_true01
09726886118
1552912256

The prediction in both cases is of low accuracy, but at least more than 50% accuracy in both cases.

The tree is like this:


There's always TRUE to the left, FALSE to the right. In ovals prediction, you still need to round (>=0.5 -> 1; <0.5 -> 0) I will try mnogovhodov, I think it will be better, there classes 0 and 1 are more equal.

Wow, what a tiny little tree! I am surprised! From the tree I read the desire to enter on a trend reversal, i.e. to buy actually at the very bottom. According to your system the other predictors were not informative?

What are numbers in ovals?
 

I ran my forest for true and false marks.

[[ 2011  2948]
 [  215 11821]]//тест

[[14997     0]
 [    0 35985]]//тренировка

The sought class is more than half in another class in the test, but in training well divided)

 
Dr. Trader - please write a list of predictors in the tree, because the screen cut their names.
 
Aleksey Vyazmikin:

Wow, what a tiny little tree! I'm surprised! From the tree I read the desire to enter at a trend reversal, i.e. to buy at the lowest levels. According to your system the other predictors were not informative?

What are the numbers in the ovals?

Some of the predictors were rejected in the process of selecting the parameters of the tree and the predictors. I can't say anything specific about informativeness in general, but for this case these ones fit the best.

The ovals are predictions by the tree. My tree was trained in "anova" mode, i.e. a probability is given not a specific prediction 0 or 1, but a probability. What is greater than 0.5 is most likely class 1. What is less than 0.5 - most likely class 0. Accordingly the closer to 0 or 1 the more confident in the forecast the tree is.

You can describe the tree programmatically in the following way:

double prediction;
if(arr_Donproc<3.5)
{
  if(arr_iDeltaH1>=-6.5)
  {
    if(arr_TimeH>=14)
    {
       prediction = 0.29;
    }
    else
    {
       prediction = 0.44;
    }
  }
  else
  {
     prediction = 0.58;
  }
}
else
{
  if(arr_RSI_Open_ < 0.5)
  {
     //...
  }
  else
  {
     //...
  }
}

int predictionClass = 0;
if(prediction >= 0.5) predictionClass=1;

if(predictionClass == 0)
{
  //...
}
else if(predictionClass == 1)
{
  //...
}
 
Aleksey Vyazmikin:
Dr. Trader - please write a list of predictors in the tree, because the screen cut their names.

Right, I hadn't noticed. In rattle it was somehow easy to see the list and the rules. I don't have rattle now, I'll look for an alternative way to do it.

 
Dr. Trader:

Some of the predictors were eliminated in the process of selecting the parameters of the tree and predictors; some of the predictors were rejected by the tree itself. I cannot say anything specific about informativity in general, but for this case these ones fit the best.

The ovals are predictions by the tree. My tree was trained in "anova" mode, i.e. a probability is given not a specific prediction 0 or 1, but a probability. What is greater than 0.5 is most likely class 1. What is less than 0.5 - most likely class 0. Accordingly the closer to 0 or 1 the more confident in the forecast the tree is.

You can describe the tree programmatically in the following way:

Yesterday I redid arr_iDelta information in different variations, added two additional types of predictors and made calculation more complete for H4,MN1,W1 - I think they are significant predictors, so I removed the old analogue and added new ones, for example

By the way, most of predictors are calculated using script, new ones are calculated using EA and the result is congruent, i.e. no peeping.

Thanks for the interpretation in code form! If interesting, data on gluing futures Si.

I will attach the files again, I suggest to experiment with them.

Files:
Filter_02.zip  3805 kb
 
MaloVhodov_02
Files:
MaloVhodov_02.zip  3774 kb
 
MnogoVhodov_02
Files:
MnogoVhodov_02.zip  3804 kb
Reason: