Skip to content
All library documents

Using Matrix Factorization for Predictive Trading Models in MQL5

Article MQL5 articles

Summary

This article develops a predictive modeling workflow in MQL5 using market price data and matrix operations. It normalizes rows of open, high, low, and close observations, separates training and test samples, and estimates linear-model coefficients with a pseudoinverse. It then introduces matrix factorization as a way to represent correlated data with smaller components, aiming to support stable modeling and reveal structure without relying on differenced time series.

The tutorial includes implementation examples and historical trading output, including a profit-curve visualization described as trending positively. That evidence is illustrative rather than a rigorous assessment: the supplied text does not establish robustness across markets or periods, nor does it detail costs, risk controls, or out-of-sample statistical validation. The author also presents the pseudoinverse as an introductory route while suggesting other methods for practical use.

Key ideas

  • Matrix factorization decomposes data into smaller components that may expose hidden structure and reduce dimensionality.
  • The example normalizes price-feature rows before fitting a linear model to closing prices.
  • A pseudoinverse provides a closed-form coefficient estimate for minimizing in-sample squared prediction error.
  • The article shows historical trading output but does not establish generalization or profitability after trading costs.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.