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

 
I'm not happy about it myself, it's temporary. I will learn to select the parameters of the indicators - I will get out from D1 to the smaller periods - I will be able to get much more observations for the same time interval.
 
Hello all! If anyone is interested I will tell you about my research...

As for the idea with clustering, nothing came out, gluing pieces from one cluster no homogeneity was noticed, why not know...I think I need to learn spectral analysis with frequencies, amplitudes and phases, I think the Fourier will do, so if there is someone who understands this topic, I will be glad to communicate, not so! I'm looking for a teacher!! So, this topic is slowing down

====================================

Next on the research with RF.

I played with the settings of the RF model, that is, the number of splits and kol. I decided to re-train the same model with the same parameters, I didn't have enough intelligence to save the first good model. So I re-trained the model and got a very average result, then retrained the model the whole evening (about 100 times) in the hope of finding the same parameters but alas, the maximum that I could get is a third of the result of the first model

Question: What was it all? retraining, which came out randomly or the model has caught some strong dependence in the data, how to relate to it in general, in your experience?Is it possible to rediscover these parameters? In what way?

All of the results I mentioned were obtained using new data previously unknown to the model

total data 55,000
training at 35,000
check at 20 000
RTS futures data, TF - 5 minutes
 
mytarmailS:

====================================

Further on the research with RF .


Question: what was it in general? was it random retraining or did the model catch some strong dependence in the data, how to treat it in general according to your experience?Is it possible to find these parameters again? in what way?

Not only forget about this data, but when something like this comes up, run as far away as possible.

PS.

We need to clean up the initial set of predictors from the noise.

Dr.Trader tried the main components, but he has very few observations. Try it. Links above, even the code is posted

 
SanSanych Fomenko:

Not only forget about this data, but when something like this appears, run as far away as possible.


why? argue
 
mytarmailS:
Hello all! If anyone is interested I will tell you about my research...

As for the idea with clustering, nothing came out, gluing pieces from one cluster no homogeneity was noticed, why not know...I think I need to learn spectral analysis with frequencies, amplitudes and phases, I think the Fourier will do, so if there is someone who understands this topic, I will be glad to communicate, not so! I'm looking for a teacher!! So, this topic is slowing down

====================================

Next on the research with RF.

I played with the settings of the RF model, that is, the number of splits and kol. I decided to re-train the same model with the same parameters, I didn't have enough intelligence to save the first good model. So I re-trained the model and got a very average result, then retrained the model the whole evening (about 100 times) in the hope of finding the same parameters but alas, the maximum that I could get is a third of the result of the first model

Question: What was it all? retraining, which came out randomly or the model has caught some strong dependence in the data, how to relate to it in general, in your experience?Is it possible to rediscover these parameters? In what way?

All of the results I mentioned were obtained using new data previously unknown to the model

total data 55,000
training at 35,000
check at 20 000
RTS futures data, TF - 5 min.

it was some kind of error.

To avoid this, keep the experiment log in the table: all training parameters, the best inputs, the result of training, the result of validation. And you'll be happy.

 
mytarmailS:
why? argue
Below and argued
 

Guys! Help with code examples please

Let's say we have three vectors "A", "B" , "С"

We need to build all possible variants of the differences between them in the automatic mode because there are so many variables ...

like:

x1 = A - B

x2 = A - C

x3 = C - B

and write x1,x2,x3 as columns in the data frame

Show me the code if it's not difficult

 
mytarmailS:

Guys! Help with code examples please

Let's say we have three vectors "A", "B" , "С"

We need to build all possible variants of the differences between them in the automatic mode because there are so many variables ...

like:

x1 = A - B

x2 = A - C

x3 = C - B

and write x1,x2,x3 as columns in the data frame

Show me the code if it's not difficult

Working variant. Maybe not optimal:

sampleA <- as.data.frame(matrix(round(runif(n = 51000, min = 0, max = 1)), ncol = 51))


n <- ncol(sampleA) #your columns

differences <- list()
counter <- 1
for (i in 1:n){
        for (j in 1:n){
                differences[[counter]] <-       sampleA[, i] - sampleA[, j]
                counter <- counter + 1
        }
}

diff_data <- as.matrix(do.call(rbind.data.frame, differences))

diff_data_frame <- as.data.frame(t(diff_data))
 
Alexey Burnakov:

Working option. Maybe not optimal:

Thanks a lot, while I was writing all possible combinations of three candlesticks and four of their prices OHLC, I got sweaty three times, so much code
 
mytarmailS:
Thank you very much, while I was writing all possible combinations with three candlesticks and 4 of their prices OHLC, three times sweat, so much code

How do I make the code not to make extra columns? For example, 3 columns in the function produces 9 combinations, although in fact it is enough to have three, like in my example above

there is no sense to do A/B and then B/A

Reason: