Machine learning in trading: theory, models, practice and algo-trading - page 426
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
You're right, predicting the indicator is an unnecessary link. But predicting the price, in fact, is also an unnecessary link, because the goal of the trading strategy is not price, but profit.
Following this logic, we should model not indicators and not price charts, but the trader's behavior, and the best target function would be the indicators of his profitable trading.
And practically, we take the trading history or run the Expert Advisor in the tester and teach the model - in the input price patterns and in the output trades from the trade report.
So "profit" is the return (yield, return), that is the increase in price normalized by itsabsolute value, and this is the notorious "Momentum" indicator, knowing the future Momentum, you are the ruler of the universe.
And what is being discussed here now is some kind of kindergarten to apply the zigzag or not, what the hell does it matter if the approach to predicting initially wrong (ie, will not lead to success) :)
Yes it is, the question is in the details, there is no need to be overly cautious. And this "childishness" concerns not only a zigzag, it's a real trap...
I dare not do so, not in your attitude or anyone else's. You are not alone in your delusion.
There is a lot of sense in what you have written, the article is great, I say it absolutely sincerely, briefly and capaciously. But there is a small defect, on which I have pointed out, because I myself have been deluded in the same way for a long time.
I will try once again to explain my position.
The article you mentioned is promotional material for machine learning: it shows that the concept of machine learning also includes data preparation for the model and model evaluation. It also shows that anyone interested in machine learning can try it all with minimal effort.
My thoughts are not in the article at all. It's an advertisement.
My thought on this thread and other forum threads is that the main, basic thing in machine learning is NOT the model, the rationale that"predictors are related to the target variable".
It is "relevant," not the target itself or a specific set of predictors. That said, I put my own meaning into the meaning of "have a relationship" other than what is defined by "predictor importance."
I have never advertised or justified the use of ZZ: I have simply used it in my examples as the most prominent of the predictors. Besides, I also pointed out that for my own set of predictors I get less than 30% prediction error - a very good result, I note.
But once again: this result is obtained because I am able to filter predictors and leave those that are "relevant" to the target variable. In my example, it is related to ZZ. But for my method, the target does not matter, but the whole "target-predictors" set does.
In addition, I pointed out that for me personally, for the set of predictors I have, I get a prediction error of less than 30% - a very good result, I note.
But once again: this result is obtained because I am able to filter predictors and leave those that are "relevant" to the target variable. In my example, it is related to ZZ. But for my method, the target does not matter, but the whole set of "target-predictors" does.
It's not a bad result, it's just a fantastic result, I'm sure even Renaissance doesn't have such a result, with their terabytes of data per day. Look at live-score on numer.ai and think why they have at least 45% of error(logloss~0.69) and you have 30%.
But what you're saying is true, you've created your synthetic target function, which is functionally bound to features in a weird way (obviously not very obvious for you) and you have such a nice scan on Lern and test, everything looks right... But why aren't you a billionaire yet, although you could easily become one in about a year, if you had 30% error predicting color of the next candle, and it's because you predict not future but past mixed with future, by indicator. Try predicting a pure future returnee and everything will fall into place.
This is not a bad result, but fantastic result, I'm sure even on Renaissance is not even close, with their terabytes of data per day. Look at live-score on numer.ai and think why they have at least 45% error(logloss~0.69) and you have 30%.
But what you're saying is true, you've created your synthetic target function, which is functionally bound to features in a weird way (obviously not very obvious for you) and you have such a nice scan on Lern and test, everything looks right... But why aren't you a billionaire yet, although you could easily become one in about a year, if you had 30% error predicting color of the next candle, and it's because you predict not future but past mixed with future, by indicator. Try predicting a pure future returnee and everything will fall into place.
ZZ is a bad target variable because its shoulder start and end have the same weight. If you take the target variable BEFORE the reversal and AFTER the ZZ reversal, I have been unable to find predictors for such a target variable - all the predictors I know for such a target variable are just noise. I collaborated with one of the forumers on this, he has his own set of predictors, and we both have the same result.
Not a billionaire for a very simple reason: the machine learning model estimate for my model with a target at ZZ (that 30%) is irrelevant to the results in the tester, because that error is arbitrarily distributed along the ZZ shoulder, i.e. false signals are mixed with real ones. I trade trends, it seems, but I predict the next candle. To overcome this contradiction I have an Expert Advisor that was successfully trading for more than a year and then on October 7 it popped on a stop that was fixing the maximum risk level.
But this is trend trading.
You keep suggesting that you are trading DIFFERENCES, not trends. This is a different trade and there are better designed models for it - GARCH. Extremely well-developed, plenty of ready-made tools, lots of examples for trading in financial markets, including forex. That's what I'm doing now. Join in.
PS.
At the expense of looking ahead in the ZZ.
You have to write carefully. When you train, on the history, you always have a value up to the last, extreme right bar. In Expert Advisors, it is completely different: on the right side of ZZ, you always have the unformed shoulder, and moreover, the preceding shoulder may also be redrawn. Therefore, we have to study it on the history. Then switch to a new file and re-learn it as you move along the chart, taking into account only ZZ values that have already been formed. And this is 100 bars or more of lag. And no "peeking", but the opposite of lagging.
Let me summarize to make it clear for many ....
There are indeed complex target functions, or rather the researcher decides that the problem is in the output variable and starts to complicate it. This was the case, I used to do it too. But with time I understood that there was no need to do that, it was enough to predict the change in price and if it could not be done with the proper level of quality, then no output so complicated would not save the situation.
As for the balance curve, it is a consequence of the quality of training. It is the type of this curve that determines the quality of model learning. Two conditions.
Uniform growth of the balance curve at an angle of 45 degrees.
The absence of strong jumps and drops.
Something like this....
ZZ is a bad target variable because its leverage has the beginning of the leverage and the end of the leverage with the same weight. If we take the target variable BEFORE the reversal and AFTER the ZZ reversal, I could not find predictors for such target variable - all predictors known to me for such target variable are just noise. I collaborated with one of the forumers on this, he has his own set of predictors, and we both have the same result.
Not a billionaire for a very simple reason: the machine learning model estimate for my model with a target at ZZ (that 30%) is irrelevant to the results in the tester, because that error is randomly distributed along the ZZ shoulder, i.e. false signals are mixed with real ones. I trade trends, it seems, but I predict the next candle. To overcome this contradiction I have an Expert Advisor that was successfully trading for more than a year and then on October 7 it popped on a stop that was fixing the maximum risk level.
But this is trend trading.
You keep suggesting that you are trading DIFFERENCES, not trends. This is a different trade and there are better designed models for it - GARCH. Extremely well-developed, full of ready-made tools, lots of examples for trading in financial markets, including forex. That's what I'm doing now. Join in.
PS.
At the expense of looking ahead in the ZZ.
You have to write carefully. When you train, on the history, you always have a value up to the last, extreme right bar. In Expert Advisors, it is completely different: on the right side of ZZ, you always have the unformed shoulder, and moreover, the preceding shoulder may also be redrawn. Therefore, we have to learn on the history. Then switch to a new file and re-learn it as you move along the chart, taking into account only ZZ values that have already been formed. And this is 100 bars or more of lag. And no "peeking", but on the contrary lagging.
Regarding inconsistency of the results of the "tester" and the forecasting I wrote above, why is it so, if you predict returnees, everything fits perfectly, I've been thinking for a long time, but I still have not got time to formalize mathematically the dependence function of the ML forecast into Sharpe ratio, I'm sure there is an explicit display, because the empirical relationship is quite unambiguous. Technically, the result of the "tester" is not much different from a simple convolution (scalar product) of a number of forecasts on realized returns (HFT people forgive me), respectively, the more forecasts correlated with returns the steeper the tester results, the real differs in trade costs. Of course such function (predict2Sharp) will be probably not from accuracy but from logloss since the number of guesses by itself is less important than multiplied by returns which were guessed.
About GARCH as far as I know it's a linear model to predict volatility, it doesn't predict the market direction, or am I wrong?
Regarding the inconsistency of "tester" results and prediction I wrote above why, if you predict returnees, everything fits perfectly, for a long time matures idea, I still can not get, mathematically formalize the dependence function of the ML forecast in the Sharpe ratio, I am sure there is a one-to-one mapping, because the empirical relationship is quite unambiguous. Technically, the result of the "tester" is not much different from a simple convolution (scalar product) of a number of forecasts on realized returns (HFT people forgive me), respectively, the more forecasts correlated with returns the steeper the tester results, the real differs in trade costs. Of course such function (predict2Sharp) will be probably not from accuracy but from logloss since the number of guesses by itself is less important than multiplied by returns which were guessed.
Concerning GARCH as far as I know it's a linear model for volatility forecasting, it doesn't forecast market direction, or am I wrong?
I must admit that I tried to use Sharp's and Sortino's coefficients to classify a signal from the underlying strategy and came to a conclusion that all these coefficients are the result of the underlying strategy. That is, the Sharpe result was exactly that, because the signal closed with such and such profit, but not on the overrun...... Although I'm not a very good programmer, so I may have calculated these coefficients by mistake. But my Sharp was in the range from -2 to 2. So I think it is correct....
I confess I tried to use the coefficient of Sharpe, Sortino, etc. to classify the signal from the underlying strategy and came to the conclusion that all these coefficients are a consequence of the underlying strategy. That is, the Sharpe result was exactly that, because the signal closed with such and such profit, but not on the overrun...... Although I'm not a very good programmer, so I could have calculated these coefficients by mistake. But my Sharp was in the range from -2 to 2. So I think it's right....
There are a lot of generic SR, but the classic SR is the simplest and most common metric to assess the performance of a strategy / trader / fund. It's considered that SR <1.5 - scary, >=2 - great!
SR is roughly speaking the ratio of profit to risk, in quantitative form.There are many generic SRs, but the classic SR is the simplest and most common metric for evaluating the performance of a trader/fund strategy. It is considered that SR <1.5 - creepy, >=2 - great!
SR is roughly speaking the ratio of profit to risk, in quantitative form.In principle, it does not matter. There is zero predictive power there....