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

 
Dr. Trader:

I ran the code from the article and it worked the first time.
The R version is 3.4.2, but I don't think it matters much.


I have R open... so it's a bug

 
Aleksey Terentev:
Some people here are just classifying prices. This is for them.

The type of classification determines the teacher, with which you have to be very careful.

If the teacher is trends (trend model), then there should be the same amount (approximately) up and down. But it is not clear where to put the sideways... And if there are sideways, it is not clear: what is up and what is down. It's a deadlock with trends.

That's why the most promising, and this is what is being discussed here, is forecasting price increments. But the teacher is different for it, not like for trends.

By the way, no one is classifying prices here.


If you're intotime series forecasting, it's better to read the articles.

Your link is only stationary time series? Judging by exponential smoothing, yes. There are no stationary time series in financial markets.

The article you refer to has nothing to do with forecasting - it's an extrapolation of the curve in analytical form. What if there is a gap? What if there's a Draghi or something?

 

Autosampling periods of 3 different attributes by the lowest RMSE, we can see that the importance of the attributes in the market varies significantly over time, both in absolute values and relative to other attributes. Sometimes there are stable periods when the same periods of the signs hold or change insignificantly, but in general the variability is large. This is just a small clipping. All of the predictors are stationary.

2017.10.20 16:56:12.405 2017.06.05 03:15:00   39 48 45
2017.10.20 16:56:13.105 2017.06.05 03:30:00   40 49 46
2017.10.20 16:56:13.793 2017.06.05 03:45:00   41 49 47
2017.10.20 16:56:14.481 2017.06.05 04:00:00   42 49 49
2017.10.20 16:56:15.168 2017.06.05 04:15:00   43 49 49
2017.10.20 16:56:15.853 2017.06.05 04:30:00   44 49 49
2017.10.20 16:56:16.538 2017.06.05 04:45:00   45 49 49
2017.10.20 16:56:17.255 2017.06.05 05:00:00   46 49 49
2017.10.20 16:56:17.981 2017.06.05 05:15:00   47 49 49
2017.10.20 16:56:18.673 2017.06.05 05:30:00   48 49 49
2017.10.20 16:56:19.368 2017.06.05 05:45:00   49 49 49
2017.10.20 16:56:20.038 2017.06.05 06:00:00   48 49 49
2017.10.20 16:56:20.760 2017.06.05 06:15:00   49 49 49
2017.10.20 16:56:21.429 2017.06.05 06:30:00   24 6 49
2017.10.20 16:56:22.136 2017.06.05 06:45:00   5 6 49
2017.10.20 16:56:22.824 2017.06.05 07:00:00   5 6 49
2017.10.20 16:56:23.495 2017.06.05 07:15:00   27 7 6
2017.10.20 16:56:24.200 2017.06.05 07:30:00   6 7 5
2017.10.20 16:56:24.901 2017.06.05 07:45:00   5 7 6
2017.10.20 16:56:25.603 2017.06.05 08:00:00   6 6 5
2017.10.20 16:56:26.275 2017.06.05 08:15:00   7 7 5
2017.10.20 16:56:26.963 2017.06.05 08:30:00   4 5 5
2017.10.20 16:56:27.694 2017.06.05 08:45:00   5 6 6
2017.10.20 16:56:28.415 2017.06.05 09:00:00   6 7 7
2017.10.20 16:56:29.118 2017.06.05 09:15:00   13 8 16
2017.10.20 16:56:29.826 2017.06.05 09:30:00   12 12 17
2017.10.20 16:56:30.546 2017.06.05 09:45:00   17 13 19
2017.10.20 16:56:31.242 2017.06.05 10:00:00   18 16 20
2017.10.20 16:56:31.978 2017.06.05 10:15:00   19 18 21

In other words, the null hypothesis about the presence of constant patterns in the market is not confirmed, to put it in a silly statistical language

Conclusion: we should create at least 2 models: one will select informative attributes in real time, and the other will learn and retrain on them. And for this purpose we need such a system, which variation of signs will give effect, i.e. to consider all this case as a holistic system.

 
Maxim Dmitrievsky:

Conclusion: it is necessary to make at least 2 models: one will select informative signs in real time, and the other will learn and retrain on them.

As for me the conclusion is not correct, because the model will always be one step behind, always one step out of date with respect to existing market characteristics... The same rolling lagged average...

 
Dr. Trader:

There is an idea that to train a classification model you need to balance the number of classes, so that the number of training examples with class "1" coincides with the number of training examples with class "2" (and remove unnecessary examples)

I noticed a similar requirement for some regression models, but it's more complicated - the number of examples with the target of 0.001 should be the same as the number of training examples with the target of -0.001,
the number of examples with the 0.002 target should be the same as the number of examples with the -0.002 target, etc.

Here is a script to make this balancing

In caret everything is already implemented, different types of class alignment, unfortunately I don't remember the names of these functions, I messed with it a long time ago
 
mytarmailS:

As for me, the conclusion is not correct, because the model will always be a step behind, always a step outdated in relation to the existing characteristics of the market... The same sliding lagging miserable average...


yes, but no...i.e. better than without it

 
elibrarius:
What does it essentially mean?
If the dollar has been growing (trending) for several months in a row, then by smoothing the number of training examples, we will show NS as if it has been flat all this time. And accordingly it will learn it to be flat. Is it correct? Maybe we should let it learn the trend?

And what if the price starts to fall with the new data? The model is waiting for it to rise. In such a situation the model that I use starts to be a bit dull and sit in trades for a long time, overstaying.

 
Maxim Dmitrievsky:

Yes, but no... I mean, it's better than without it.

What can I say, try it, share your experiences, that's what's interesting to read

I tried to retrain the model on every bar...

Yes- the model works better than a static model ( one time trained)

No - the model doesn't work

p.s. I hope you can do better
 
mytarmailS:

What can I say, try it, share your experiences, that's what's interesting to read

I tried to retrain the model on every bar...

Yes- the model works better than a static model ( one time trained )

No - the model can not be called working

p.s. I hope you can do better

I'm making the model not to retrain at all, but to have certain parameters adjusted in the optimizer. But there is a constant fitting of features in another model that allows the first one to give the same results, but as the periods of features change, it either gives more differently directed signals or less, depending on the market. For example, small periods of predictors are good for a flat market, but for a trend they are longer. It is clear that there is still a lag, the question is how critical it is. But since everything is optimized for a certain period, it results in a super adaptive style.

Well, in short these are my fantasies, I'll show them when I'm done )

 
Maxim Dmitrievsky:

I make the model not to retrain at all, but to have certain parameters adjusted in the optimizer, but there is a constant fitting of features through another model, so that the first model would always give approximately the same results, but because the periods of features change it gives either more differently directed signals or less, depending on the market. For example, small periods of predictors are good for a flat market, but for a trend they are longer. It is clear that there is still a lag, the question is how critical it is.

Well, these are my fantasies, I will show you when I finish them)


What does "periods of features/predictors" mean? What kind of periods? )