Machine learning in trading: theory, models, practice and algo-trading - page 11
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The idea is interesting. I also have advisors working. Maybe I will think about how to update them. But it is not clear to me what exactly needs to be improved. What do I have to teach my programmer?
The Expert Advisor has a rigid logic of opening and closing positions. The decision in machine learning is made somewhat differently.
That is, it is not quite clear what exactly you are going to do.
Please note this in my post above:
I take the general direction from the high bar. But if you look closely at time, there is an enormous lag in terms of lower bars especially. So if it is D1 and I trade on M5, it turns out that I take almost the day before yesterday's data for direction. Even predicting one step forward for D1 with 30% error has radically improved the Expert Advisor's profitability, and most importantly, increased confidence that it will not fail.
In my case I'm using lagged data from indicators for appropriate R-prediction.
Note this from my post above:
I take the general direction from the high bar. But when you look closely at the time there is a monstrous lag in terms of lower bars especially. So if it is D1 and I trade on M5, it turns out that I take almost the day before yesterday's data for direction. Even predicting one step forward for D1 with 30% error has radically improved the Expert Advisor's profitability, and most importantly, increased confidence that it will not fail.
In my particular case I'm going the way of using lagging information from indicators on corresponding predictions from R.
I have straight up big news.
While I was on a business trip, in the evenings I ran the Lerning machine on my data. Tried different combinations of approaches. And it looks like a stone flower came out - all of a sudden.
So, I have been using my data from the link above and have been doing this all over again, trying everything described in my blog. But I added a couple more tricks. For example, I selected those training parameters where there is more profit on crossvalidation, rather than abstract guessing accuracy.
For this, of course, I had to write my own fitness function.
On the graph are pairs of expectation values on Training and Validation for different prediction horizons and training parameters. I also used the idea of a "gray area", that is, a prediction space where nothing happens.
As you can see, I got quite sane MO values on both training and correlated values on validation! Note that a spread of 0.00020 (twenty pipettes) was included in the simulation.
I also counted the total trade including the spread. The values are also very nice. The maximum profit is achieved at a certain ratio of the number of trades to the MO of the trade, all this on a planning horizon of 12 hours. On the chart is a search of all planning horizons, all gray area values, and the best learning parameters of the model. See below:
Well, and in order to spread this knowledge, I am attaching a file with all the results, including even the scaffold training parameters. But without the inputs. The inputs from my data are selected. This will be a little secret. Whether or not to post the full code of the experiment, I'll think about it. Now I want to do integration with MT of this machine, because the result seems to me already quite working.
Alexey
I have straight up big news.
While I was on a business trip, in the evenings I ran the Lerning machine on my data. Tried different combinations of approaches. And it looks like a stone flower came out - all of a sudden.
In general, on my data on the link that gave me I ran the training more and more, tried what is already described in my blog. But I added a couple more tricks. For example, the selection of those training parameters where there is more profit on crossvalidation, rather than the abstract accuracy of guessing.
For this, of course, I had to write my own fitness function.
On the graph are pairs of expectation values on Training and Validation for different prediction horizons and training parameters. I also used the idea of a "gray area", that is, a prediction space where nothing happens.
As you can see, I got quite sane MO values on both training and correlated values on validation! Note that a spread of 0.00020 (twenty pipettes) was included in the simulation.
I also counted the total trade including the spread. The values are also very nice. The maximum profit is achieved at a certain ratio of the number of trades to the MO of the trade, all this on a planning horizon of 12 hours. On the chart is a search of all planning horizons, all gray area values, and the best learning parameters of the model. See below:
Well, and in order to spread this knowledge, I am attaching a file with all the results, including even the scaffold training parameters. But without the inputs. The inputs from my data are selected. This will be a little secret. Whether or not to post the full code of the experiment, I'll think about it. Now I want to do integration with MT of this machine, because the result seems to me already quite working.
Alexey
The total profit in pips is not an indicator. The ratio of this total profit to the number of bars of history at which it is obtained is the quality factor that is indicative. I've been saying for a long time and I use it only for model optimization and estimation.
Hard work gives results.
Good luck
The total profit in pips is not the indicator. It's the ratio of this total profit to the number of bars of the history, on which it is obtained, that is the quality factor which is indicative. I've been saying for a long time and I use it only for model optimization and estimation.
Hard work gets results.
Good luck
It seems to me that one does not exclude the other.
Alexei has overcome the obvious disadvantage of all estimates of classification predictions: it is obvious that the value of a correct prediction of a bar of 1 pip and the value of a prediction of a bar with 10 pips are completely different.
Congratulations to you Alexey!
The total profit in pips is not an indicator. It is the ratio of this total profit to the number of bars of history at which it is obtained that is indicative. I have long said and use it only for model optimization and estimation.
Hard work gets results.
Good luck
Let me explain.
The forecast for 12 hours ahead (724 minutes, to be exact).
The number of transactions - more than 5000 for each of the validation samples. The result is averaged over 49 validation samples. Trades within each sample occur in increments of about 12 hours, that is, there is no explicit dependence and no overlap of results. I will now post more charts of trade simulation. The results are too good. But so far all is confirmed.
Final data on my experiment:
Simulation of trading on signals from a trained machine on 49 validation samples (in pips):
Distribution of trade results in pips for 49 samples:
And performing hypothesis tests on the significant difference of the mean (median) MO of each validation sample from zero:
The distribution within samples is not normal. Wilcoxon test shows that MO is significantly different from zero.
By the way, the change in the growth pattern of the point sum curve in the last 3/5 parts of the validation samples is explainable.
I have about the same number of observations for the 5 majors within the samples, and they are in the following order:
I am sure that for the last three pairs the volatility is higher and the spread is higher (we should take 25-30 pips, not 20). Therefore, the gross result and percentage of guessed directions is better for them. But introduction of an increased spread will not reduce the statistics to zero anyway. Just to understand what's going on.
FAQ.
It seems to me that one does not exclude the other.
Alexei has overcome the obvious disadvantage of all estimates of classification predictions: obviously, the value of correctly predicting a bar of 1 pip and the value of predicting a bar of 10 pips are completely different.
Congratulations Alexey!
Warning. Found a bug in the code, which has given me great results. All my optimizations are canceled until the detailed analysis!