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]
Bases:
_VectorResult,_SummaryMixin,_ComparisonMixin,_VectorInferenceMixin,_VectorPropagationMixinA 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.
exogis the compressed block at the estimated polynomial, so it is a function of the data and oftheta, not a supplied regressor; the inheriteddesigntreats 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 ofA_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 whosefit()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 atperiod == 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)
Private methods#
Short specification label for a ranking table. |
|
Build the structured summary. |
|
The compressed-regressor coefficients, in design order. |
|
Compressed-regressor column names. |