Skip to content
All library documents

Building an MMAR Fit-and-Forecast Pipeline for Volatility

Article MQL5 articles

Summary

This article combines a multifractal model of asset returns into a MetaTrader 5 library with a single facade. Its Fit stage first performs partition analysis to estimate scaling behavior, including the Hurst exponent and multifractality diagnostics, then fits candidate distributions to the multifractal spectrum. The Forecast stage runs Monte Carlo simulations using the fitted parameters to produce volatility forecasts; the library also supports generating individual simulated paths.

The article describes a demo Expert Advisor and the staged status system: partition results remain available if spectrum fitting fails, while forecasting requires a complete fit. It positions the implementation as a portable MT5 workflow using built-in libraries. The evidence described includes earlier module-level validation and a EURUSD example in which a distribution is selected, but the excerpt does not provide enough forecast evaluation detail to establish predictive performance. Results depend on the partition and spectrum settings, data suitability, distribution fit, and simulation assumptions; a successful API run alone does not show that a forecast is profitable or calibrated.

Key ideas

  • The facade combines partition analysis, spectrum fitting, and simulation behind a fit-and-forecast interface.
  • Partition analysis estimates the Hurst exponent, volatility, fit diagnostics, and multifractal scaling behavior.
  • Spectrum fitting selects a cascade distribution and parameters for downstream simulations.
  • A partial-fit status preserves partition diagnostics when spectrum estimation fails, but forecasting then remains unavailable.
  • Monte Carlo output depends on fitted model assumptions and requires separate evaluation for forecast quality.

Tags

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