Skip to content
All library documents

Forecasting Conditional Volatility with GARCH and Maximum Likelihood

Article MQL5 articles

Summary

This article introduces GARCH as a model for volatility clustering, where large or small returns tend to be followed by returns of similar magnitude. It contrasts this parametric approach, in which conditional variance changes over time, with historical volatility estimated by a rolling standard deviation. The model links variance to past squared residuals and past variance, with parameter constraints intended to keep variance positive and the process stationary. A conditional mean model can be included, though the worked implementation assumes returns have no autocorrelation for simplicity.

The article describes estimating parameters by maximizing a likelihood with an optimizer subject to bounds and a stationarity constraint. It discusses Gaussian residuals and the option of a Student’s t distribution for heavier tails, then presents an indicator that refits parameters on each new bar and displays conditional volatility and price-change intervals. This offers an implementation and forecasting framework, not evidence that the forecasts are accurate or profitable. Frequent parameter refitting can be computationally expensive, and the simplified mean assumption and distribution choice may not suit every asset or sample.

Key ideas

  • GARCH models changing conditional variance and captures the tendency of volatility to cluster over time.
  • The variance equation uses past squared residuals and past conditional variance.
  • Maximum likelihood estimation can fit model parameters subject to positivity, bounds, and stationarity constraints.
  • A Student’s t residual distribution can represent heavier tails than a Gaussian specification.
  • An adaptive indicator can refit parameters and display one-step volatility forecasts, but its accuracy requires empirical evaluation.

Tags

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