Skip to content
All library documents

Time-Series Statistics for Correlation, Regression, Stationarity, and Cointegration

Article MQL5 code base

Summary

This reference describes a collection of statistical functions for analyzing time series. The listed tools cover basic summaries such as means and standard deviations, relationships between series through correlation and linear regression, and transformations such as detrending. It also names a Dickey-Fuller stationarity test, an Engle-Granger two-step cointegration test, and a lag-one autoregressive model. Additional utilities include a normal-distribution probability function and numerical definite integration, for which users supply the function to integrate.

The material is an API overview rather than a worked trading study: it gives function names and brief descriptions but no formulas, examples, calibration guidance, or empirical findings. It flags an important implementation detail for MetaTrader arrays: the newest observation is stored at index zero, so chronological ordering may need reversal, especially for the autoregressive calculation. Users must also supply an implementation for integration. The reference does not establish how these methods should be combined into a strategy or how their statistical assumptions should be checked.

Key ideas

  • The function set includes descriptive statistics, correlation, regression, and detrending for time-series analysis.
  • It includes stationarity and cointegration tests as well as a lag-one autoregressive model.
  • The integration utility requires the user to provide the function being integrated.
  • MetaTrader time series place the newest observation at index zero, which can require reversing arrays for analysis.
  • The reference lists capabilities but provides no worked examples, trading results, or guidance on statistical assumptions.

Tags

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