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

 

I take it that all the problems of using MO in trading are solved and we can switch to images?

It's a pity. The thread seems to have dried up.

 
Vladimir Perervenko:

I take it that all the problems of using MO in trading are solved and we can switch to images?

It's a pity. It looks like the branch has dried up.

Have you read all 452 pages? )
 
Yuriy Asaulenko:
Have you really read all 452 pages? )

Come to think of it.

I read it exactly.

 
Vladimir Gribachev:

Come to think of it.

I definitely read it.


I only selectively).

But the topic is already so big that it is almost impossible to find anything specific in it. I tried, I found it on 300-some pages. But it takes too long).

 
I don't know what to do with them:

I suppose all the problems of using MO in trading have been solved and we can switch to images?

The more the old problems are solved, the more the new ones are unsolved.

Some time ago, using the tips from the forum, I started to learn to predict not the direction where the price will go (2 classes up and down), but to predict the amount of price increase by bars (regression). It is more difficult, but such results are much more evident.

If you can achieve a 60% accuracy in classification and a nice graph, it is much more difficult to obtain a positive R^2 in regression. It seems to be impossible to achieve R^2 = 1 using the data available in the terminal.
But while classification usually yields good results on the backtest and poor results on the fronttest, regression with proper crossvalidation makes the backtest look bad, which itself indicates poor results on new data, no false expectations.

Having added various proven crossvalidation methods and tried different models, it turns out that even a stable model cannot be trained well enough, there is not enough data. Perhaps this can only be solved by paying subscriptions for high quality predictors.

For myself so far I've taken the following direction - to predict the growth of the price at M5, to update the model at every new bar, limit the trade by time to not more than a couple of hours a day, and the time of trade should be selected somehow, for example, in the Market there are many Expert Advisors that work only for a couple of hours at midnight when large exchanges are not working. If I use timeframe less than M5, or work by ticks, it seems impossible, because spreads will eat up any profits. If it works, it will be fine.

 

Also Forex, according to my observations, is very artificial. Prices sometimes behave completely against the previously found patterns, or vice versa, there are patterns that have been repeated for years and the price behaves either according to them or against them, in order to be at zero on average.
If I had not seen my own profits in the Market advisors, I would have given up studying Forex Market Advisors long ago. And so it turns out that there are successful examples, there is something to strive for.

 
Dr. Trader:

Also Forex, according to my observations, is very artificial. Prices sometimes behave completely against the previously found patterns, or vice versa, there are patterns that have been repeated for years and the price behaves either according to them or against them, in order to be at zero on average.
If I had not seen my own profit using the Market Advisors, I would have given up studying Forex Market Advisors long ago. In this case it turns out that there are successful examples, so there is something to strive for.

I have recently downloaded two stories from different big well known brokerage companies. Two big differences. When I look at the first one I cannot trade at all.) And the second one is quite normal, at least the story is normal. What was it online, that we do not know.)
 

Experiment. What if we take different gbpusd, usdchf, usdrub, and other popular symbols and use them to predict eurusd.

Here are two tables in atache, train.csv and test.csv, in them the targeting is the eurusd m5 gain over the next bar, and the predictors are audusdOpen[0]-audusdOpen[1], audusdOpen[2]-audusdOpen[3], audusdOpen[3]-audusdOpen[4], eurusdOpen[0]-eurusdOpen[1], eurusdOpen[1]-eurusdOpen[2], etc. There are 12 symbols in total, the increments of the previous 3 bars of history are taken from each of them. Actually, everything is clear from the column names.
The training table has 10000 rows, that is about 7 weeks.

I tried to train one model and got r^2 = 0.0006164161 on the training data, and if I round up the target and the results to classes -1 and 1, the accuracy is 0.5052. That's pretty bad. But it's just unrealistic to take dozens of bars for each training example and dozens of characters themselves, I have a model on these hundreds of columns will be trained for weeks.
On the testbed, the model's test results dropped, r^2 = -0.003390913 and an accuracy of 0.4907. Random was and random is still random.

But this is all boring and inconclusive.
It was interesting when I looked at what weights the model gave to each predictor (the higher the weight the better):


Conclusion: Trying to predict the direction where eurusd will go on the next m5 bar is better using first of all audusd, usdrub, usdsgd

Files:
 
Dr. Trader:

Conclusion: trying to predict the direction of the eurusd on the next m5 bar is better to use audusd, usdrub, usdsgd first of all

Add 10-30 more random columns for interest

 

To be honest, this approach (predicting movement here and now) was a fiasco for me. Try to predict levels to which price will arrive over a certain period of time, for example a day, the results will be much better.

Reason: