MIDASVARResult#

class cultivars.multivariate.reduced_form.mixed_frequency.MIDASVARResult(*, endog, names, order, trend, sigma_u, sigma_ml, resid, fittedvalues, design, llf, nobs, n_params, posterior=None, prior_label='none', coefficients, deterministic, exog_high, exog, exog_names, midas_coefficients, theta, period, midas_lags)[source]#

A fitted MIDAS vector autoregression.

The low-frequency system

\[y_t = D d_t + \sum_{i=1}^{p} A_i\, y_{t-i} + B\, x_t(\theta) + u_t, \qquad x_{t}(\theta)_q = \sum_{j=1}^{L} w_j(\theta_q)\, x^{(q)}_{t, j},\]

where \(x^{(q)}_{t,j}\) is the \(j\)-th most recent sub-period reading of high-frequency series \(q\) at the end of low-frequency period \(t\), and the weights are the normalized exponential Almon curve \(w_j \propto \exp(\theta_1 j + \theta_2 j^2)\) summing to one, so the scale of each regressor lives in its column of \(B\) and the two entries of \(\theta_q\) carry only the shape of the window. Estimation profiles \(\theta\) – least squares conditional on it, a derivative-free search over it – and this record holds the estimate at the maximizer.

The reduced-form surface is inherited unchanged, and everything it reports is conditional in exactly one place: the coefficient standard errors, and every test built from them, take the estimated lag polynomial as known. joint_stderr() is the honest alternative and says what it costs.

forecast() is conditional in the same sense a VARX forecast is: the model holds no process for the high-frequency block, so it asks for the future sub-period path and refuses without it.

Note

The propagation surface – companion, stability, impulse responses, variance and historical decompositions – reads the endogenous block only. The compressed regressors are conditioned on, not shocked, so they enter no moving-average representation, and a response here is the response of the low-frequency system to its own innovations holding the high-frequency path fixed. exog is the compressed block at the estimated polynomial, so it is a function of the data and of theta, not a supplied regressor; the inherited design treats it as data, which is the conditioning the Note above describes.

Variables:
  • endog – The low-frequency sample.

  • exog_high – The high-frequency panel as supplied, chronological.

  • exog – The compressed regressor block over the effective sample, one column per high-frequency series at the estimated polynomial.

  • names – Endogenous labels, in Cholesky order.

  • exog_names – High-frequency series labels.

  • order – Endogenous autoregressive order.

  • period – Sub-periods per low-frequency period.

  • midas_lags – Sub-periods each weight curve spans.

  • trend – Deterministic specification.

  • coefficients – (p, k, k) stack of A_1, ..., A_p.

  • midas_coefficients – (k, m) slopes on the compressed regressors.

  • theta – (m, 2) estimated lag-polynomial parameters, one row per high-frequency series.

  • deterministic – Deterministic coefficients, one row per term.

  • sigma_u – Residual covariance with the degrees-of-freedom correction.

  • sigma_ml – Residual covariance divided by the effective sample.

  • resid – Residuals over the effective sample.

  • fittedvalues – One-step conditional means over the effective sample.

  • design – The regressor matrix as estimated, compressed block last.

  • llf – Gaussian log-likelihood.

  • nobs – Effective sample size.

  • n_params – Free parameters – coefficients, covariance, and the two polynomial parameters per high-frequency series.

See also

  • MIDASVAR – the model whose fit() returns this record.

  • MFVARResult – the high-frequency alternative, inferred rather than estimated.

  • VARXResult – the same conditional surface with an unrestricted exogenous block, the model this collapses to at period == 1.

References

Ghysels, E., Santa-Clara, P., & Valkanov, R. (2004). The MIDAS touch: Mixed data sampling regression models. CIRANO Working Paper 2004s-20.

Ghysels, E., Sinko, A., & Valkanov, R. (2007). MIDAS regressions: Further results and new directions. Econometric Reviews, 26(1), 53-90.

Ghysels, E. (2016). Macroeconomics and the reality of mixed frequency data. Journal of Econometrics, 193(2), 294-314.

Example

A quarterly pair in which the first variable loads on the last two months of a monthly series with weights 0.7 and 0.3. The profiled polynomial recovers the decaying curve and a unit slope, the second equation’s slope is nothing, the joint standard errors widen the conditional ones where the polynomial matters, and the forecast needs the three future months:

>>> import numpy as np
>>> rng = np.random.default_rng(0)
>>> x = rng.standard_normal((360, 1))
>>> window = 0.7 * x[2::3, 0] + 0.3 * x[1::3, 0]
>>> noise = 0.1 * rng.standard_normal(120)
>>> y = np.column_stack([window + noise, rng.standard_normal(120)])
>>> res = MIDASVAR(y, x, order=1, period=3).fit()
>>> res.midas_weights.ravel().round(2), res.midas_coefficients.round(1).ravel() + 0.0
(array([0.69, 0.3 , 0.01]), array([1., 0.]))
>>> res.nobs, res.n_params, res.k_exog, res.midas_lags
(119, 13.0, 1, 3)
>>> joint = res.joint_stderr()
>>> bool(joint["y1: x1"] > res.bse["y1: x1"]), sorted(k for k in joint if "theta" in k)
(True, ['theta1[x1]', 'theta2[x1]'])
>>> res.forecast(1, exog_high_future=np.ones((3, 1))).shape
(1, 2)

Attributes#

coefficients

The (p, k, k) endogenous autoregressive matrices.

deterministic

The (d, k) deterministic coefficients, one row per term.

exog_high

The (nobs_low * period, m) high-frequency panel as supplied, chronological.

exog

The (nobs, m) compressed regressors at the estimated polynomial.

exog_names

High-frequency series labels.

midas_coefficients

The (k, m) slopes \(B\) on the compressed regressors.

theta

The (m, 2) polynomial parameters \((\theta_1, \theta_2)\) per series.

period

Sub-periods per low-frequency period.

midas_lags

Sub-periods each weight curve spans.

bse

Standard errors, keyed identically to params.

coefficient_covariance

Covariance of the coefficient matrix, sampling or posterior.

companion

The (kp, kp) companion matrix of the autoregressive block.

design

endog

fittedvalues

information_criteria

AIC, BIC, and HQIC derived from the likelihood and parameter count.

is_stable

Whether every companion eigenvalue lies inside the unit circle.

k_endog

Number of endogenous variables.

k_exog

Number of high-frequency series.

llf

midas_weights

The estimated weight curves, (midas_lags, m), most recent first.

n_params

names

nobs

order

params

Every coefficient, keyed "{equation}: {regressor}".

posterior

prior_label

pvalues

Two-sided p-values against zero, keyed identically to params.

resid

sigma_ml

sigma_u

trend

tvalues

Normal test statistics against zero, keyed identically to params.

Methods#

arch_test(variable[, lags])

Engle's LM test for conditional heteroskedasticity in one equation.

compare(*others[, criterion])

Rank this result against others by an information criterion.

conf_int(*[, alpha])

Confidence bounds for every coefficient.

equation(name)

The coefficients of one equation, keyed by regressor.

fevd([horizon])

Forecast-error variance decomposition.

forecast([steps, exog_high_future])

Point forecasts conditional on a future high-frequency path.

generalized_fevd([horizon])

Variance shares from the generalized responses, normalized to sum to one.

generalized_irf([horizon, cumulative])

Pesaran-Shin impulse responses, which do not depend on variable order.

granger_causality(cause, effect)

Wald test that one variable's lags are jointly zero in another equation.

historical_decomposition()

Attribute each observation to the shocks that produced it.

identify(strategy)

Declare an identification scheme and return the structural view.

irf([horizon, orthogonalized, cumulative])

Impulse responses to a one-standard-deviation shock.

joint_stderr()

Standard errors that also account for estimating the lag polynomial.

likelihood_ratio_test(unrestricted)

Test this result as the restricted model against a nesting one.

ma_representation([horizon])

Moving-average matrices Psi_0, ..., Psi_horizon.

normality_test(variable)

Jarque-Bera test on one equation's residuals.

portmanteau_test([lags])

Multivariate Ljung-Box test for residual autocorrelation.

residual_diagnostics(*[, portmanteau_lags, ...])

Run every residual test and collect them into one table.

simulate([n, seed, burn])

A fresh sample path from the fitted system.

stability_check()

Eigenvalue verdict for the companion matrix.

structural_shocks()

Orthogonalized innovations P^{-1} u_t, shape (nobs, k).

summary()

The estimation summary, renderable as text, HTML, or a dataframe.