MIDASVAR#
- class cultivars.multivariate.reduced_form.mixed_frequency.MIDASVAR(endog, exog_high, *, order, period, midas_lags=None, trend='c', names=None, exog_names=None)[source]#
A low-frequency VAR reading high-frequency data through a lag polynomial.
The model is \(y_t = D d_t + A_1 y_{t-1} + \dots + A_p y_{t-p} + B\, x_t(\theta) + u_t\) at the low frequency, where \(x_t(\theta)\) compresses the last
midas_lagssub-period readings of each high-frequency series into one number with normalized exponential-Almon weights \(w_j \propto \exp(\theta_1 j + \theta_2 j^2)\). Two parameters per series buy the whole within-period history, which is the entire point of MIDAS: the unrestricted alternative spendsmidas_lagscoefficients per series per equation and eats the sample.This class estimates, unlike its state-space sibling, because nothing here is temporally aggregated: every regressor is observed, the model is linear conditional on the polynomial, and the likelihood identifies everything it touches. Estimation profiles the polynomial – an inner least-squares solve conditional on
theta, an outer derivative-free search over it, multi-started because the decay direction can be multi-modal. Lag-order selection holds the weights flat so that the candidates differ in the endogenous order and in nothing else.- Variables:
_endog – The validated
(nobs, k)low-frequency panel._names – Endogenous labels.
_order – Endogenous autoregressive order.
_trend – Deterministic terms.
_prior – The base slot for a shrinkage prior, unused by this family.
_exog_high – The validated
(nobs * period, m)high-frequency panel._exog_names – High-frequency labels.
_period – Sub-periods per low-frequency period.
_midas_lags – Sub-periods each weight curve spans.
See also
MIDASVARResult– the recordfit()returns.MFVAR– the high-frequency model, which infers a latent path from supplied parameters instead of estimating.VARX– the right model whenperiodwould be one.
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.
Example
>>> import numpy as np >>> rng = np.random.default_rng(0) >>> x = rng.standard_normal((120, 1)) >>> y = np.column_stack( ... [x[2::3, 0] + 0.1 * rng.standard_normal(40), rng.standard_normal(40)] ... ) >>> res = MIDASVAR(y, x, order=1, period=3).fit() >>> res.forecast(2, exog_high_future=np.zeros((6, 1))).shape (2, 2)
Attributes#
The validated sample. |
|
The validated high-frequency panel. |
|
High-frequency labels. |
|
Whether a prior contributes anything to this estimate. |
|
Number of endogenous variables. |
|
Number of high-frequency series. |
|
Sub-periods each weight curve spans. |
|
Regressors per equation, including the compressed block. |
|
Variable labels. |
|
Autoregressive order. |
|
Sub-periods per low-frequency period. |
|
The prior on the coefficients; |
|
Deterministic specification. |
Methods#
|
Estimate the system by profiled maximum likelihood. |
|
Score every order from zero to |