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
Serial autocorrelation can remain hidden behind a clean equity curve. Lag-1 checks are…
Views9,799−3%vs avg
Forwards5
Reactions24
Comments—
Views growth
Hours after publication
Show as table
| Hours after publication | Views |
|---|---|
| 0 h | 0 |
| 8 h | 4,237 |
| 25 h | 7,712 |
| 43 h | 9,799 |
- After 6 hours4,237
- After 24 hours7,712
- Total to date9,799
More from MQL5 Algo Trading
- 01Views16.6KForwards9Reactions—Comments—
- 02Views13.3KForwards7Reactions5Comments—
- 03Views12.5KForwards5Reactions34Comments—
- 04Views12KForwards6Reactions40Comments—
- 05Views11.9KForwards4Reactions16Comments—