Ljung-Box Q Test Autocorrelation Calculator
Ljung-Box Q test calculator 1978 ARMA/GARCH residual autocorrelation: Q = n(n+2)Σρ_k²/(n-k). Bank of Italy, ISTAT, BTP FTSE MIB.
Report a calculation error
Help us improve. Describe what is wrong with the calculation.
Result
| Voce | Valore |
|---|
Show full details
Share result
Disclaimer: this calculation is for informational purposes only. For important decisions, consult a qualified professional.
Ljung-Box Q test residual autocorrelation calculator ARMA
The Ljung-Box Q test calculator verifies multiple autocorrelation in residuals of an ARMA or GARCH model, per the formulation by Greta M. Ljung and George E. P. Box published in Biometrika vol. 65 no. 2 (1978) pp. 297-303 "On a measure of lack of fit in time series models", an improvement of the earlier Box-Pierce test 1970 (JASA 65, 1509-1526) with small-sample correction. The portmanteau test formula: Q = n · (n + 2) · Σ_{k=1}^{h} ρ_k² / (n - k), where n = sample size, h = number of lags tested (typically h = ln(n) Tsay 2010 or h = min(20, n/4) rule of thumb), ρ_k = sample autocorrelation at lag k. Under the null hypothesis H0 of no autocorrelation (white noise residuals), the statistic Q ~ χ²(h) chi-square h degrees of freedom; for ARMA(p,q) models df adjusts to χ²(h - p - q). Critical values 5%: h=10 → χ²=18.307; h=15 → χ²=24.996; h=20 → χ²=31.410. The p-value = P(χ²(h) > Q) computed via regularized upper incomplete gamma function Q(h/2, Q/2) with continued fraction expansion NIST DLMF 8.9.2 + series Numerical Recipes Press et al. 1992 ch. 6.2.
The decision: if Q > χ²_critical at level α reject H0 (residuals autocorrelated, model inadequate, re-specify ARMA increasing p or q); if Q ≤ χ²_critical do not reject H0 (residuals white noise, model adequate Box-Jenkins methodology Box-Jenkins 1970). The 5 main applications:
- Diagnostic checking ARMA(p,q)/ARIMA(p,d,q) residuals Box-Jenkins methodology (quarterly GDP ISTAT, monthly inflation NIC FOI HICP, M2 monetary Bank of Italy 1893, ISTAT industrial production seasonally-adjusted X-13ARIMA-SEATS)
- Volatility clustering test financial returns (Q test on standardized squared residuals GARCH(1,1) Engle 1982 ARCH + Bollerslev 1986 GARCH for BTP 10Y yields Bank of Italy + FTSE MIB Borsa Italiana → Euronext Milan 2021 + BTP-Bund spread)
- Basel III risk management Italian banks Intesa Sanpaolo, UniCredit, Banco BPM, BPER, MPS — VaR Value-at-Risk backtesting EBA + Bank of Italy Supervisory Authority regulation
- Italian asset management Anima Holding, Eurizon Capital (Intesa), Mediolanum, Azimut, Generali Investments — multi-factor Fama-French + momentum + quality residual white noise validation
- High-frequency algorithmic trading Borsa Italiana → Euronext Milan + IDEM FTSE MIB derivatives futures, market-making bid-ask spread strategies + statistical arbitrage pair-trading validation. Italian-specific applications:
- Bank of Italy 1893 Research Department Rome Via Nazionale macroeconometric DSGE-IT + BEMOD + IGEM Quarterly Italian Model GDP forecasts + inflation + M2 + ECB deposit rate 2.5% (2026)
- ISTAT 1926 Rome 4,500 employees demographic time series, NIC national consumer price index, FOI workers/employees families, HICP harmonized Eurostat, X-13ARIMA-SEATS US Census Bureau seasonal adjustment
- Bocconi University Milan 1902 Mario Forni dynamic factor models + Marco Lippi + Lucrezia Reichlin empirical time series econometrics
- University of Bologna 1088 Alma Mater financial econometrics + Catholic University Sacro Cuore Milan 1921 quantitative finance methods
- Polytechnic Milan 1863 + Polytechnic Turin 1859 management engineering quant finance
- SISSA Trieste 1978 + ICTP International Center Theoretical Physics Trieste data science statistics
- Bruno de Finetti 1931 Trieste subjective probability founder Italian Bayesian school
- IIT Italian Institute Technology Genoa 2003 machine learning time series
- Cineca Bologna 1969 Marconi100 + Leonardo HPC pre-exascale 250 PFlops 2023 Monte Carlo simulation backtesting
- Consob 1974 financial markets supervision + IVASS 2012 Solvency II insurance
- Borsa Italiana 1808 → Euronext Milan 2021 piazza Affari FTSE MIB 40 blue chip
- BTP yields Bank of Italy + MEF Treasury marginal auction
- Generali Trieste 1831 + Intesa Sanpaolo + UniCredit + Mediobanca risk management
- Carlo Rubbia 1984 Nobel Physics CERN W/Z bosons + INFN AI Atlas/CMS Higgs MC validation 2012
- PNRR Mission 4 Component 2 data science research €6.9B
Italian Q Ljung-Box applications table
| Italian application | Typical model | n observations | h lag | Typical Q | P-value | Decision |
|---|---|---|---|---|---|---|
| BTP 10Y yields Bank of Italy | ARMA(1,1)+GARCH(1,1) | 2,500 daily | 20 | 22 | 0.34 | Adequate model |
| FTSE MIB returns Euronext Milan | GARCH(1,1) Bollerslev | 3,000 daily | 20 | 45 | 0.001 | Volatility clustering |
| BTP-Bund 10Y spread | ARMA(2,1) | 1,500 daily | 15 | 18 | 0.26 | Adequate model |
| Quarterly GDP ISTAT 1926 | ARIMA(1,1,1) X-13 | 120 quart. | 10 | 8 | 0.63 | Adequate model |
| Monthly inflation NIC ISTAT | SARIMA(1,0,1)(0,1,1)12 | 360 monthly | 12 | 14 | 0.30 | Adequate model |
| M2 monetary Bank of Italy | ARIMA(0,1,1) | 240 monthly | 12 | 10 | 0.62 | Adequate model |
| Industrial production ISTAT | Seasonal SARIMA | 300 monthly | 12 | 11 | 0.53 | Adequate model |
| Generali Trieste stock returns | GARCH(1,1)+t-Student | 2,500 daily | 20 | 26 | 0.16 | Adequate model |
| Eurizon momentum factor fund | Fama-French 5 | 500 monthly | 10 | 7 | 0.73 | Adequate model |
| HFT bid-ask spread FTSE MIB | ARMA(0,1) | 50,000 tick | 30 | 120 | <0.001 | Microstructure noise |
(Source: Ljung & Box 1978 Biometrika 65, 297-303 + Box-Pierce 1970 JASA + Box-Jenkins 1970 Holden-Day + Bank of Italy Research Dept 1893 + ISTAT 1926 + Borsa Italiana → Euronext Milan 2021).
Italian Ljung-Box Q test calculation examples
- BTP 10Y residuals ARMA(1,1) Bank of Italy 1893 Research Dept Rome: BTP 10Y daily yields series 2018-2026 n = 2,500 observations, fit ARMA(1,1) (φ=0.15, θ=-0.12), residuals ε_t. Compute ACF lag 1-20, autocorrelations ρ_k all |ρ_k| < 0.04 (confidence band ±1.96/√n = ±0.039). Q = 2,500·2,502·Σ_{k=1}^{20} ρ_k²/(2,500-k) ≈ 22. Df h - p - q = 20 - 1 - 1 = 18 → χ²_18(0.95) = 28.87. Q=22 < 28.87 → do not reject H0, p-value ≈ 0.29. ARMA(1,1) model adequate
- FTSE MIB returns GARCH(1,1) Bollerslev 1986 Borsa Italiana → Euronext Milan 2021: 3,000 daily 2014-2026, fit GARCH(1,1) ω=10⁻⁶, α=0.08, β=0.90 (persistence 0.98 near IGARCH). Q test on residuals ε_t/σ_t Q=15 (h=20) p=0.77 OK mean; Q² on ε_t²/σ_t² Q=18 (h=20) p=0.59 volatility clustering captured. Without GARCH (only ARMA mean), Q² = 250 (h=20) p<0.001 strong rejection → justifies GARCH
- Quarterly GDP ISTAT 1926 ARIMA Box-Jenkins: Italy GDP series 1996Q1-2026Q1 n=120, fit ARIMA(1,1,1) trend + I(1) random walk + MA(1). Residuals Q h=10 = 8 → p=0.63, χ²_10(0.95)=18.3 → do not reject, model OK 4-quarter ahead forecasts
- Monthly inflation NIC FOI HICP ISTAT: 1996m1-2026m4 n=360, SARIMA(1,0,1)(0,1,1)_12 annual seasonal. Q h=12 = 14 (χ²_12(0.95)=21.03) → p=0.30 do not reject. HICP harmonized inflation 1.9% (Apr 2026 ISTAT)
- Asset management Anima Eurizon Mediolanum Azimut momentum factor Fama-French 5: long-short top-bottom decile portfolio monthly returns 500 obs, residuals Fama-French regression + momentum (UMD). Q h=10 = 7 p=0.73 white noise residuals, factor model well-specified no anomalies
- HFT bid-ask spread FTSE MIB IDEM derivatives Borsa Italiana: tick-by-tick 50,000 obs 1 day, ARMA(0,1) bid-ask bounce Roll 1984. Q h=30 = 120 p<0.001 strong rejection → microstructure noise residual, need VECM cointegration bid-ask + limit orders
- Bank of Italy DSGE-IT macroeconometric Quarterly Italian Model: estimated equations 1980Q1-2026Q1 n=180 per equation, each equation residuals Q h=10 0.05 → model validated Bayesian estimation Smets-Wouters style
Italian time series econometrics research
Italian time series econometrics research:
- Bank of Italy 1893 Research and Economic Analysis Department Rome Via Nazionale 7,500 employees, governor Fabio Panetta from 2023 (ex-ECB Frankfurt + ex-IMF), DSGE-IT Quarterly Italian Model + BEMOD + IGEM macroeconometric forecasts GDP inflation M2 ECB rate; "Temi di Discussione" peer-reviewed working papers since 1974
- ISTAT 1926 Rome 4,500 employees National Economic Account ESA 2010 Eurostat + indices NIC FOI HICP harmonized + Permanent Census Population + Labor Force Survey RCFL quarterly; X-13ARIMA-SEATS US Census Bureau seasonal adjustment + JDemetra+ ECB
- Bocconi University Milan 1902 Department Economic Sciences IGIER (Innocenzo Gasparini Institute) Mario Forni dynamic factor models + Marco Lippi structural VAR + Lucrezia Reichlin (LBS ex-ECB Research Director) macroeconometrics + Tommaso Monacelli + Carlo Favero asset pricing
- University of Bologna 1088 Alma Mater Studiorum Department Economic Sciences financial econometrics + Catholic University Sacro Cuore Milan 1921 quantitative finance methods Massimo Guidolin regime-switching + LUISS Guido Carli University Rome 1974 Andrea Mercatanti causal inference
- Polytechnic Milan 1863 Management Engineering quant finance derivatives + Polytechnic Turin 1859 financial mathematics
- SISSA Trieste 1978 Strada Costiera 11 + ICTP Abdus Salam International Center Theoretical Physics Trieste 1964 (UNESCO IAEA) data science statistics machine learning Stefano Battiston complex networks finance
- Bruno de Finetti 1906-1985 Trieste-Rome Sapienza subjective probability founder Italian Bayesian school "Theory of Probability" 1970 + exchangeability representation theorem + IRC De Finetti Award Sapienza
- IIT Italian Institute Technology Genoa 2003 Morego 1,700 researchers, robotics AI Demis Hassabis ex-honorary, machine learning time series Massimiliano Pontil + Lorenzo Rosasco regularization kernel methods
- Cineca University Consortium Bologna 1969 Marconi100 IBM Power9 30 PFlops 2018 + Leonardo HPE pre-exascale 250 PFlops Atos BullSequana 2023 (5th TOP500 worldwide Green500) Monte Carlo simulation derivatives pricing + strategy backtesting + DSGE Bayesian Hamiltonian
- Consob Rome 1974 Italian financial markets supervision + IVASS Rome 2012 ex-ISVAP insurance Solvency II EIOPA Frankfurt + Bank of Italy Banking Supervision EBA Paris Basel III IFRS 9 ECL expected credit loss
- Borsa Italiana 1808 Milan piazza Affari → Euronext Milan 2021 after LSE Group divestiture Euronext merger (Paris Amsterdam Brussels Lisbon Dublin Oslo) post-Brexit; FTSE MIB 40 blue chip + IDEM FTSE MIB futures + MIBO options
- BTP yields marginal auction MEF Ministry Economy Finance + Bank of Italy secondary BondVision MTS Group + Italian Government Bond Telematic Market MOT Borsa Italiana retail
- Italian risk management companies: Generali Trieste 1831 12M clients 50 countries €70B premiums + Intesa Sanpaolo Turin 2007 Sanpaolo IMI + Intesa BCI merger 22M clients + UniCredit Milan 1998 14 CEE countries + Mediobanca Milan 1946 Enrico Cuccia + Banco BPM 2017 + BPER Banca 1867 Modena + MPS Monte Paschi Siena 1472 oldest bank world; VaR 99% 1-day backtesting Expected Shortfall ES Basel III FRTB Fundamental Review Trading Book
- Carlo Rubbia 1934 Gorizia Nobel Physics 1984 CERN W/Z bosons SPS UA1 + INFN National Institute Nuclear Physics 1951 23 sections + ATLAS/CMS LHC Higgs boson 5 July 2012 4.9-5.0σ Monte Carlo validation chi-square goodness-of-fit
- PNRR National Recovery Resilience Plan Mission 4 Component 2 data science research €6.9B + R&D Tax Credit art. 1 c. 200 L. 160/2019 up to 25% + Patent Box L. 178/2020 50% + PIR Individual Saving Plans L. 232/2016 detax Italian markets
Updated July 2026
Comments (0)
Login to leave a comment.
No comments yet. Be the first!