Discussing the article: "Self Optimizing Expert Advisors in MQL5 (Part 12): Building Linear Classifiers Using Matrix Factorization"
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
Check out the new article: Self Optimizing Expert Advisors in MQL5 (Part 12): Building Linear Classifiers Using Matrix Factorization.
This article explores the powerful role of matrix factorization in algorithmic trading, specifically within MQL5 applications. From regression models to multi-target classifiers, we walk through practical examples that demonstrate how easily these techniques can be integrated using built-in MQL5 functions. Whether you're predicting price direction or modeling indicator behavior, this guide lays a strong foundation for building intelligent trading systems using matrix methods.
Matrix factorization is an important tool for algorithmic traders interested in building numerically driven applications. These tools can help us build various types of machine learning algorithms, and more still. So far in our discussion, we have only considered regression tasks. Let us turn our attention to the problem of classification. For today’s discussion, we’ll take up the challenge of building a market classifier. This classifier will be able to distinguish between upward and downward movements in the market. We want it to help us correctly place our trades. The classifier’s task is to learn from historical observations of market behavior and infer the correct action we should take on a particular trading day.
Our trading strategy works as outlined below. The goal is to anticipate market moves based on the expected behavior of the moving average indicator. In addition, we want price to behave in accordance with the moving average. That is to say, if our classification model expects the moving average to fall, we also want to observe price levels falling below the indicator. If we anticipate that both the moving average and price will fall, we will open sell positions. The moving average indicates the direction of price, but we also want price levels to accelerate beyond the indicator before opening our positions.
The same logic applies to long positions. We want to anticipate that the moving average will rise, and price levels should accelerate well above it for us to enter a strong buy trade.
From this description, you’ll notice that our model will be predicting two categorical outputs at the same time. However, this should not be confused with a multi-class classification model. Each of the two variables our model predicts is a binary outcome. In other words, the model tracks two separate binary outcomes. The architecture we’ll describe here is not suited for classifying more than two classes at once.
Author: Gamuchirai Zororo Ndawana