Serial autocorrelation can remain hidden behind a clean equity curve. Lag-1 checks are…

MQL5 Algo Trading, @mql5dev

Open in Telegram
#4239Photo

Serial autocorrelation can remain hidden behind a clean equity curve. Lag-1 checks are insufficient; dependence often shows up at higher lags or across a block of lags. The Ljung-Box portmanteau test addresses this by aggregating sample autocorrelations through horizon h into a single Q statistic and chi-square p-value. Residual diagnostics matter: if ARIMA/GARCH residuals remain autocorrelated, the model is leaving structure unmodeled, and downstream stats assuming independence can be biased. An MQL5 toolkit (no external deps) implements ACF, Ljung-Box Q, df adjustment, and p-values via the regularized incomplete gamma function (MQL5 lacks a chi-square CDF). Inputs support three data sources: closed-bar price returns, closing-deal P/L sequences, or external residual files, with guards for zero variance, invalid df, and malformed lag sets. 👉 Read | AlgoBook | @mql5dev

Open in Telegram
Views9,799−3%vs avg
Forwards5
Reactions24
Comments—

Views growth

Hours after publication

Show as table
Hours after publicationViews
0 h0
8 h4,237
25 h7,712
43 h9,799
  1. After 6 hours4,237
  2. After 24 hours7,712
  3. Total to date9,799

More from MQL5 Algo Trading

  1. 01
    Views16.6K
    Forwards9
    Reactions—
    Comments—
  2. 02
    Views13.3K
    Forwards7
    Reactions5
    Comments—
  3. 03
    Views12.5K
    Forwards5
    Reactions34
    Comments—
  4. 04
    Views12K
    Forwards6
    Reactions40
    Comments—
  5. 05
    Views11.9K
    Forwards4
    Reactions16
    Comments—

All posts of MQL5 Algo Trading