Skip to content
All library documents

Gaussian Process Regression and Forecast Uncertainty in MQL5

Article MQL5 articles

Summary

The article introduces Gaussian process regression as a Bayesian, kernel-based approach that predicts a distribution over possible function values rather than only a point estimate. It explains how a prior encodes assumptions about function shape, how the likelihood represents observation noise, and how conditioning on training data produces a posterior mean and uncertainty. RBF, linear, and periodic kernels illustrate different assumptions about smoothness, trends, and cycles.

The MQL5 implementation covers prediction for both noise-free interpolation and noisy observations, including the distinction between uncertainty in the latent function and forecast uncertainty for new noisy data. Kernel and noise hyperparameters are optimized by minimizing negative log marginal likelihood, using Cholesky decomposition and the BLEIC optimizer. The article is a foundational treatment with example scripts, not a trading strategy or evidence of market forecasting performance. It leaves analytic marginal-likelihood gradients and sparse approximations for larger datasets as further work, and practical usefulness depends on feature design, kernel choice, and suitable validation.

Key ideas

  • A Gaussian process places a probability distribution over functions and yields predictive uncertainty as well as a mean forecast.
  • The kernel determines assumptions about relationships between inputs, including smoothness, linearity, or periodicity.
  • The likelihood models observation noise, which must be included when forming prediction intervals for future observations.
  • Hyperparameters are fitted by minimizing negative log marginal likelihood, with Cholesky decomposition supporting stable computation.
  • The article presents core regression methods but does not establish trading performance or address scalable sparse approximations.

Tags

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