Skip to main content

Time Series & Macroeconometrics

Comprehensive time series analysis, DSGE models, and advanced forecasting. Includes unit root tests, ARIMA/seasonal models, VAR/cointegration, impulse responses, nonlinear models, forecast evaluation, and mixed-frequency regression.

84 procedures · 10 with documented limitations. Every result is computed by the open Python engine and is exportable to APA tables and reports.

ProcedureWhat it doesStatusKey reference
Autocorrelation & Partial Autocorrelation (ACF / PACF)Sample ACF and PACF (Durbin-Levinson / Yule-Walker) with white-noise confidence bands and per-lag Ljung-Box Q statistics, for ARMA order identification.✅ FullBox & Jenkins (1970); Ljung & Box (1978)
HAC Long-Run VarianceEstimates the heteroskedasticity- and autocorrelation-consistent (HAC) long-run variance S = gamma_0 + 2*sum k(j/L)*gamma_j of a time series using the Bartlett (Newey-West) or Quadratic-Spectral (Andrews) kernel, with the Newey-West automatic plug-in bandwidth, reporting the variance ratio S/gamma_0 and the HAC standard error of the mean.✅ FullNewey & West (1987); Andrews (1991)
Structural VECM (long-run restrictions)Fits a Johansen VECM at a given cointegration rank and identifies structural shocks via long-run (Granger-representation) restrictions, reporting the reduced-rank long-run impact matrix, the lower-triangular structural long-run matrix (K-r permanent / r transitory shocks), and few-horizon structural impulse responses.✅ FullKing, Plosser, Stock & Watson (1991); Lutkepohl (2005, ch. 9)
Time-Varying-Parameter VAREstimates a VAR whose coefficients drift over time as random walks, cast as a linear-Gaussian state-space model and recovered by the Kalman filter and Rauch-Tung-Striebel smoother, returning smoothed coefficient paths (start/end/mean), state-innovation variances, an LR test of constant coefficients, and the log-likelihood.✅ FullPrimiceri (2005); Cogley & Sargent (2005)
Markov-Switching VARRegime-switching vector autoregression (Hamilton) whose intercepts, dynamics, and innovation covariance switch between latent Markov regimes, estimated by EM (Hamilton filter + Kim smoother) returning per-regime VAR coefficients, the regime transition matrix, smoothed regime probabilities, and log-likelihood.✅ FullHamilton (1989); Krolzig (1997)
Threshold VAR (TVAR)Estimates a two-regime multivariate threshold VAR by grid-searching the threshold that splits the sample on a transition variable's lag, fits a separate VAR in each regime, and tests for threshold nonlinearity with a bootstrap-calibrated sup-LR statistic.✅ FullTsay (1998); Hansen (1999)
Quantile VARVector autoregression estimated at a chosen conditional quantile via equation-by-equation quantile regression of each variable on the full lagged vector, returning per-lag tau-quantile coefficient matrices alongside the mean (OLS) VAR for comparison, to capture tail/regime-dependent dynamics.✅ FullCecchetti & Li (2008); White, Kim & Manganelli (2015)
Local Projections (Jorda IRF)Estimates Jorda (2005) local-projection impulse responses by running a separate OLS regression of y_{t+h} on the shock at t (plus controls) at each horizon with Newey-West HAC standard errors, yielding an impulse-response function with confidence bands that is robust to dynamic misspecification relative to VAR IRFs.✅ FullJorda (2005, AER 95:161-182)
Unobserved Components (structural TS)Harvey structural time-series model: decomposes a univariate series into stochastic level, optional local-linear-trend slope, optional stochastic seasonal, and irregular via Kalman-filter maximum likelihood, reporting component variances, smoothed series, log-likelihood/AIC, and a short forecast.✅ FullHarvey (1989); Durbin & Koopman (2012)
Vector Moving-Average (VMA)Fits a multivariate VMA(q) model y_t = mu + eps_t + Theta_1 eps_{t-1} + ... + Theta_q eps_{t-q} by conditional Gaussian maximum likelihood, returning the MA coefficient matrices, innovation covariance, finite (zero-beyond-lag-q) impulse responses, log-likelihood and information criteria.✅ FullLutkepohl (2005), ch. 11
VARMA ModelEstimates a Vector ARMA(p,q) for a small multivariate time series by conditional maximum likelihood (via VARMAX), reporting the AR and MA coefficient matrices, residual covariance, log-likelihood and AIC/BIC.✅ FullLutkepohl (2005), ch. 11-12
Intervention Analysis (interrupted TS)Box-Tiao interrupted-time-series analysis fitting an AR(p) model with a deterministic step (permanent level shift) or pulse (transient shock) intervention dummy at a known date, reporting the estimated intervention effect with its t-test, the long-run steady-state level shift, pre/post means, and a plain-language interpretation.✅ FullBox & Tiao (1975, JASA)
Subset / Restricted VAREstimates a vector autoregression then imposes data-driven zero restrictions on coefficients whose full-VAR |t| falls below a threshold, re-estimating the sparser system by restricted EGLS and reporting retained coefficients, the number of restrictions, and the SC/HQ/AIC improvement over the full VAR.✅ FullLutkepohl (2005), ch. 5
Periodic VAR (seasonal coefficients)Fits a periodic vector autoregression / periodic autoregression (PAR) in which the intercepts and lag coefficient matrices vary deterministically by season, returns the per-season coefficient matrices, and tests the constant-coefficient (standard-VAR) restriction via per-equation F tests and a system likelihood-ratio test of periodicity.✅ FullFranses (1996)
Threshold Cointegration (Enders-Granger)Tests for threshold cointegration with asymmetric error correction by fitting Enders-Granger TAR and momentum-TAR models to the cointegrating-residual changes, reporting the two regime adjustment speeds, the Phi no-cointegration statistic, and an F-test of symmetric vs. asymmetric adjustment.✅ FullEnders & Granger (1998); Enders & Siklos (2001)
Generalized IRF (Koop-Pesaran-Potter)Computes ordering-invariant generalized impulse-response functions for a VAR (Koop-Pesaran-Potter 1996; Pesaran-Shin 1998), tracing each variable's response to a shock in the chosen variable without imposing a recursive Cholesky ordering.✅ FullKoop, Pesaran & Potter (1996); Pesaran & Shin (1998)
LSTAR (Smooth-Transition AR)Fits a logistic smooth-transition autoregression by nonlinear least squares, estimating two linear AR regimes plus the smoothness (gamma) and threshold (c) of a logistic transition over a lagged level, with the Luukkonen-Saikkonen-Terasvirta LM test of linearity against smooth-transition nonlinearity.✅ FullTerasvirta (1994, JASA); Luukkonen, Saikkonen & Terasvirta (1988, Biometrika)
Spectral Granger Causality (Geweke)Decomposes Granger causality from one series to another by frequency using Geweke's (1982) spectral measure of linear feedback, reporting causality at low / business-cycle / high frequencies, the dominant frequency, and the frequency-averaged measure that matches the time-domain Granger test by Geweke's integral identity.✅ FullGeweke (1982, JASA)
Tsay Nonlinearity TestTsay (1986) F-test for threshold/quadratic nonlinearity in an AR(p) model: augments the linear AR with the squares and pairwise cross-products of the lagged values and tests their joint significance, returning the F statistic, degrees of freedom, p-value, and a linear/nonlinear verdict.✅ FullTsay (1986, Biometrika 73:461-466)
BDS Test (nonlinearity)Brock-Dechert-Scheinkman-LeBaron test for serial independence: computes the correlation-integral BDS statistic at embedding dimensions 2..max_dim and returns per-dimension N(0,1) statistics with p-values plus an overall iid / non-iid verdict, detecting both linear and nonlinear dependence (e.g. in model residuals).✅ FullBrock, Dechert, Scheinkman & LeBaron (1996, Econometric Reviews 15:197-235)
Kalman Smoother (state-space)Fits a local-level (or local-linear-trend) unobserved-components state-space model by maximum likelihood and returns both the real-time Kalman-filtered and the full-sample RTS-smoothed level (and slope), with estimated irregular/level/slope variances, log-likelihood and smoothed-state standard errors.✅ FullRauch, Tung & Striebel (1965); Durbin & Koopman (2012)
Time-Varying-Parameter RegressionEstimates regression coefficients that evolve over time as random walks via a linear-Gaussian state-space model fit by the Kalman filter/smoother, returning the smoothed time-varying coefficient paths, signal/state variances, and log-likelihood to detect structural change.✅ FullHarvey (1989)
IGARCH (Integrated GARCH)Integrated GARCH(p,q) estimated by maximum likelihood with the variance persistence (sum of ARCH+GARCH coefficients) constrained to exactly 1, so volatility shocks are permanent rather than mean-reverting.✅ FullEngle & Bollerslev (1986)
GARCH-in-Mean (ARCH-M)Estimates a GARCH-in-mean (ARCH-M) model in which the conditional volatility (std. dev.) or conditional variance enters the mean equation as a risk-premium term, reporting the lambda risk premium with significance alongside the omega/alpha/beta variance dynamics and persistence.✅ FullEngle, Lilien & Robins (1987)
FIGARCH (long-memory volatility)Estimates a fractionally-integrated GARCH(p,d,q) by ML over a truncated ARCH-infinity expansion, recovering the long-memory parameter d in (0,1) that places volatility persistence between the GARCH (d=0) and IGARCH (d=1) extremes, with conditional-volatility summary, log-likelihood, AIC/BIC and a long-memory verdict.✅ FullBaillie, Bollerslev & Mikkelsen (1996)
GARCH Portmanteau DiagnosticsFits a GARCH(1,1) by Gaussian QMLE, forms standardized residuals, and tests them for remaining structure via Ljung-Box Q on z_t and z_t^2 and Engle ARCH-LM on z_t^2 at every lag, returning the variance parameters, per-lag statistics with p-values, and a pass/fail adequacy verdict for the volatility specification.✅ FullLjung & Box (1978); Engle (1982); Bollerslev (1986)
Realized GARCHEstimates the Realized GARCH(1,1) model of Hansen, Huang & Shek (2012), jointly fitting the variance recursion h_t = omega + betah_{t-1} + gammax_{t-1} and the measurement equation x_t = xi + phih_t + tau(z_t) + u_t by Gaussian QMLE, reporting omega/beta/gamma, measurement parameters, persistence (beta+gammaphi), log-likelihood, and the fitted conditional-volatility path (building a realized proxy from squared returns when no realized measure is supplied).✅ FullHansen, Huang & Shek (2012, JAE)
CCC Multivariate GARCHBollerslev (1990) Constant Conditional Correlation multivariate GARCH: fits a univariate GARCH(1,1) to each series, estimates the constant correlation matrix R from the standardized residuals, and forms conditional covariances H_t = D_t R D_t that are positive-definite by construction.✅ FullBollerslev (1990)
HAR-RV (realized volatility)Corsi (2009) Heterogeneous Autoregressive model of Realized Volatility: regresses next-period volatility on the daily (1-day), weekly (5-day) and monthly (22-day) trailing averages of a realized-volatility proxy, reporting component coefficients/SE/t/p, a joint significance F-test, R-squared and a one-step-ahead forecast.✅ FullCorsi (2009, J. Financial Econometrics 7:174-196)
BEKK Multivariate GARCHFits a diagonal BEKK(1,1) multivariate GARCH (Engle & Kroner 1995) by Gaussian ML to 2-3 return series, estimating the diagonal A/B ARCH/GARCH parameters, implied per-series persistence, the time-varying conditional covariance/correlation path (guaranteed positive-definite at every t), the mean dynamic correlation, and the log-likelihood.✅ FullEngle & Kroner (1995)
Stochastic VolatilityFits a stochastic-volatility model whose latent log-variance follows its own AR(1) state, estimated by Harvey-Ruiz-Shephard quasi-ML via the Kalman filter on log-squared returns, returning the persistence (phi), vol-of-vol (sigma_eta), long-run variance level (mu), and the Kalman-smoothed conditional-volatility path.✅ FullTaylor (1986); Kim, Shephard & Chib (1998); Harvey, Ruiz & Shephard (1994)
Causality-in-Variance (Cheung-Ng)Cheung-Ng (1996) test for volatility spillover between two series: GARCH-filters each series, then uses the n-scaled sum of squared cross-correlations of the squared standardized residuals to test, in each direction, whether past volatility of one series predicts the other's future volatility.✅ FullCheung & Ng (1996, J. Econometrics 72:33-48)
FMOLS Cointegrating VectorPhillips-Hansen Fully-Modified OLS estimates a single cointegrating vector among I(1) series, correcting OLS for serial correlation and regressor endogeneity via a Bartlett long-run covariance to yield an asymptotically efficient, unbiased long-run coefficient table with valid standard errors.✅ FullPhillips & Hansen (1990)
DOLS Cointegrating VectorStock-Watson (1993) single-equation Dynamic OLS estimate of a cointegrating vector, regressing the I(1) dependent on the I(1) regressors plus leads and lags of their first differences, with HAC (Newey-West) standard errors on the asymptotically efficient long-run coefficients.✅ FullStock & Watson (1993); Saikkonen (1991)
Markov Chain (transition/stationary)Estimates a first-order discrete Markov chain from a state sequence by maximum-likelihood transition counting, returning the row-normalized transition matrix, the stationary (invariant) distribution solving pi = pi P, the n-step transition matrix P^n, and Kac mean recurrence / mean first-passage times.✅ FullNorris (1997); Hamilton (1994)
Phillips-Ouliaris Cointegration TestResidual-based test of the no-cointegration null among I(1) series: runs the cointegrating OLS, then applies the Phillips-Perron Z-alpha and Z-t unit-root statistics to the residuals (Newey-West long-run-variance corrected) against MacKinnon response-surface cointegration critical values to deliver Z-alpha, Z-t, an approximate p-value, and a cointegration verdict.✅ FullPhillips & Ouliaris (1990, Econometrica)
Blanchard-Quah SVARIdentifies permanent and transitory structural shocks in a bivariate (or n-variable) VAR via Blanchard-Quah long-run restrictions, returning the lower-triangular long-run impact matrix, the contemporaneous impact matrix, orthonormal structural impulse responses, and the forecast-error variance decomposition.✅ FullBlanchard & Quah (1989, AER)
VAR Residual Diagnostics (multivariate)Fit a VAR(p) and run a battery of multivariate residual checks - the Hosking (1980) portmanteau/Ljung-Box test for serial correlation, a multivariate ARCH-LM serial-correlation test, and the Doornik-Hansen omnibus normality test - returning each statistic, df, p-value, and an overall model-adequacy verdict.✅ FullLutkepohl (2005); Hosking (1980); Doornik & Hansen (2008)
VAR Lag-Order Selection (IC table + LR)Fits a VAR(p) for every lag p=0..maxlags on a common fixed sample and reports the AIC, Hannan-Quinn, Schwarz/BIC and FPE information criteria plus a sequential likelihood-ratio test, returning each criterion's argmin and the LR-selected lag.✅ FullLutkepohl (2005)
ARCH-LM Test (ARCH effects)Engle's LM test for conditional heteroskedasticity (volatility clustering): n·R² auxiliary regression of the squared series on its own lags. Run before fitting a GARCH model.✅ FullEngle (1982)
Time-trend regression (detrending)Regress a series on a polynomial deterministic time trend; reports trend coefficients, R², overall trend significance, and detrended-residual summary (trend- vs difference-stationary).✅ FullHamilton (1994)
Spurious-regression diagnosticRegress y on x and flag the classic spurious-regression signature (high R², very low Durbin-Watson, non-stationary residuals via Engle-Granger ADF) for integrated, non-cointegrated series.✅ FullGranger & Newbold (1974)
Seasonal ARIMA (SARIMA)Fit seasonal ARIMA with forecasting, including Ljung-Box and Jarque-Bera diagnostics.✅ FullBox & Jenkins (1970)
Holt-Winters Exponential SmoothingExponential smoothing with additive/multiplicative seasonal component and trend.✅ FullHolt (1957); Winters (1960)
Error-Trend-Seasonal (ETS) modelAutomated error-trend-seasonal decomposition with AIC/BIC selection.✅ FullHyndman et al. (2002)
Unobserved Components / State SpaceKalman filter state-space model with level, trend, and seasonal components.✅ FullHarvey (1989)
Structural VAR (SVAR)Structural VAR with estimated A and B matrices for shock identification.✅ FullSims (1980); Amisano & Giannini (1997)
Impulse Response FunctionsOrthogonalized and non-orthogonalized IRF from VAR with cumulative responses.✅ FullSims (1980); Lütkepohl (2005)
Forecast Error Variance DecompositionVariance decomposition of VAR forecasts by shock source over horizons.✅ FullSims (1980); Lütkepohl (2005)
Markov Switching AutoregressionRegime-switching model with time-varying transition probabilities and smoothed probabilities.✅ FullHamilton (1989)
Threshold Autoregression (TAR)Nonlinear autoregression with endogenous threshold detection and linearity test.✅ FullTong (1990); Hansen (1999)
Dynamic Conditional Correlation GARCHDCC-GARCH model for time-varying correlations (Engle 2002) via quasi-MLE.✅ FullEngle (1982); Bollerslev (1986)
Zivot-Andrews unit root testUnit root test with one endogenous structural break in level or trend.✅ FullZivot & Andrews (1992)
DF-GLS unit root testElliott-Rothenberg-Stock feasible GLS-detrended unit root test.✅ FullElliott et al. (1996)
ERS Point Optimal unit root testEfficient detrending with GLS and point-optimal deviations under the null.✅ FullElliott et al. (1996)
Change-in-mean structural break detectionDetects shifts in the MEAN of one series via dynamic-programming least-squares (L2) segmentation, with the number of breaks chosen by BIC; reports segment means and variances.✅ FullBai & Perron (1998); Bai & Perron (2003)
Quandt-Andrews Break Test (sup-Wald)Tests for a single structural break at an unknown date in a linear regression by computing the Chow/Wald F for a full-coefficient break at every trimmed candidate point and reporting the sup-F (QLR), average-F and exp-F (Andrews-Ploberger) statistics, the estimated break fraction, Andrews (1993) asymptotic critical values, and a Hansen (1997) approximate p-value.✅ FullAndrews (1993); Andrews & Ploberger (1994); Hansen (1997)
CUSUM and CUSUM-squared stability testRecursive residual stability test for parameter constancy over time.✅ FullBrown et al. (1975)
Particle Filter (SMC state-space)Bootstrap particle filter (sequential Monte Carlo) for a univariate local-level state-space model: estimates the process/observation variances by maximum likelihood on the exact Kalman likelihood, then runs an SIR filter with systematic resampling to return the filtered latent-state mean, a 90% credible band, the one-step predictive log-likelihood, and the effective sample size over time, benchmarked against the exact Kalman filter.✅ FullGordon, Salmond & Smith (1993); Doucet, de Freitas & Gordon (2001)
Koyck Distributed LagEstimates a Koyck (geometric) infinite distributed-lag model y_t = alpha + betax_t + lambday_{t-1} via OLS on the Koyck transform, reporting the impact multiplier, geometric decay rate, long-run multiplier beta/(1-lambda), mean/median lag, the implied lag-weight profile, and a Durbin's-h serial-correlation diagnostic.✅ FullKoyck (1954); Greene (2018)
Toda-Yamamoto Granger causalityGranger causality test in levels with integration-order adjustment; Wald test on VAR lags.✅ FullToda & Yamamoto (1995)
Nonlinear ARDL (NARDL)Autoregressive distributed lag with asymmetric positive/negative decomposition; symmetry test.✅ FullShin et al. (2014)
Pesaran-Shin-Smith ARDL bounds testCointegration test via F-test on lagged levels in error-correction form.✅ FullPesaran et al. (2001)
Diebold-Mariano forecast comparisonTest comparing forecast accuracy of two models (MSE or MAE) with Newey-West variance.✅ FullDiebold & Mariano (1995)
Forecast combinationCombine forecasts via equal weight, inverse MSE, OLS, or Bates-Granger method.✅ FullBates & Granger (1969); Granger & Ramanathan (1984)
Diffusion-index direct forecast (user-supplied factors)Direct multi-step diffusion-index forecast y_{t+h} = a + sum g_p y_{t-p} + b'F_t using factor columns you supply (e.g. PCA component scores from analysis.pca), with an out-of-sample backtest against an AR benchmark.⚠️ LimitedStock & Watson (2002)
Dynamic Factor Model (EM/Kalman)Estimate a latent dynamic factor model on multiple standardized time series by EM with the Kalman filter/RTS smoother (Doz-Giannone-Reichlin / Watson-Engle), extracting common AR factors and reporting loadings, the smoothed factor path, factor AR coefficients, variance shares, log-likelihood and iteration count.✅ FullDoz, Giannone & Reichlin (2012); Watson & Engle (1983)
Spectral analysisPeriodogram or Welch PSD with dominant frequency and period identification.✅ FullWelch (1967)
Hamilton Filter (trend/cycle)Hamilton (2018) regression-based business-cycle filter that decomposes a series into trend (the h-step-ahead forecast fitted from a constant and p lagged levels) and cycle (the forecast residual), reporting coefficients, R^2 and the cycle standard deviation as a sound, spurious-dynamics-free replacement for the Hodrick-Prescott filter.✅ FullHamilton (2018, REStat)
Spectral Coherence (cross-spectrum)Estimates the squared coherency and phase spectrum between two time series via a smoothed Welch/averaged-periodogram cross-spectrum with a Hann taper, reporting coherence and phase by frequency, the peak-coherence frequency, and an approximate significance threshold.✅ FullPriestley (1981); Welch (1967)
Unrestricted MIDAS regressionMixed-frequency regression: unrestricted lags of high-frequency predictor on low-frequency outcome.⚠️ LimitedGhysels et al. (2004); Ghysels et al. (2006)
Almon polynomial MIDASMIDAS with polynomial lag weighting via NLS; information criterion comparison across lag lengths.⚠️ LimitedGhysels et al. (2004); Ghysels et al. (2006)
Beta polynomial MIDASMIDAS with beta lag structure for smooth, parsimonious high-frequency aggregation.⚠️ LimitedGhysels et al. (2007)
Exponential Almon MIDASMIDAS using exponential-Almon lag polynomial for flexible decay pattern.⚠️ LimitedGhysels et al. (2007)
MIDAS forecastForecast using fitted MIDAS model; extends from low-freq observations with high-freq predictors.✅ FullGhysels et al. (2004)
MIDAS nowcastingReal-time estimate of current low-frequency value using available high-frequency data.⚠️ LimitedGhysels et al. (2004); Ghysels et al. (2007)
MIDAS model comparisonCompare U-MIDAS, Almon, Beta, and Exponential MIDAS across lag range via information criteria.⚠️ LimitedGhysels et al. (2007)
Real Business Cycle modelCanonical RBC with technology shock; analytical steady state, IRF, variance decomposition.⚠️ LimitedHarris et al. (2020)
New Keynesian 3-equation modelIS–Phillips–Taylor system; parameterizable demand, supply, monetary shocks with closed-form IRF.⚠️ LimitedHarris et al. (2020)
Linear rational expectations solverKlein-Sims QZ method for general linear RE systems; determines Blanchard-Kahn determinacy.✅ FullHarris et al. (2020)
DSGE simulationForward simulation of solved DSGE policy matrices under specified or random shock sequence.✅ FullHarris et al. (2020)
DSGE impulse responseImpulse response to single shock in solved DSGE model; orthogonal identification.✅ FullHarris et al. (2020)
DSGE variance decompositionForecast error variance share by shock at specified horizons in DSGE.✅ FullHarris et al. (2020)
DSGE calibrationHeuristic moment-matching calibration for RBC and NK; suggests parameters given targets.⚠️ LimitedHarris et al. (2020)

Notes & limitations

  • Diffusion-index direct forecast (user-supplied factors) — NOT a true Stock-Watson Dynamic Factor Model: there is no latent-factor extraction (no PCA / Kalman / state-space estimation of common factors inside the method) — the factors must be supplied as columns. Automatic latent-factor extraction is a separate upcoming feature.
  • Unrestricted MIDAS regression — Currently uses same dataset for both frequencies (pending multi-dataset resolution).
  • Almon polynomial MIDAS — Uses single dataset for both frequencies (pending multi-dataset support).
  • Beta polynomial MIDAS — Single-dataset limitation; multi-dataset pending (Phase 18).
  • Exponential Almon MIDAS — Single dataset; multi-dataset architecture pending.
  • MIDAS nowcasting — Single-dataset implementation; true multi-frequency data awaits Phase 18.
  • MIDAS model comparison — Single-dataset; intended for separate high/low datasets pending multi-dataset manager.
  • Real Business Cycle model — Log-linearized first-order approximation only; no occasionally binding constraints.
  • New Keynesian 3-equation model — Simplified linearized form; no ELB, expectations-driven dynamics approximate.
  • DSGE calibration — Moment-matching heuristic only; not Bayesian estimation or SMM.