Weighting Schemes¶
SC-MIDAS uses two kinds of weights: temporal weights within each MIDAS regression and combination weights across fitted sources. This page defines both kinds.
Each non-leaf ComboSpec node produces a time-varying weight vector over its
sources that sums to one. For inverse-error weighting the source weight is the
normalised inverse of a discounted error statistic, defined once under
'mae', 'mse', 'rmse' below and referenced from the
SC-MIDAS framework page.
Temporal weights¶
A MIDAS model is
with \(K\) = n_lags. The weights are normalised to sum to one for the
restricted schemes; unrestricted lifts that constraint.
method |
\(w(j;\theta)\) | parameters | estimator |
|---|---|---|---|
almon |
polynomial \(\sum_i \theta_i j^i\) | n_pars_weights coeffs |
OLS |
exp_almon |
normalised \(\exp(\sum_i \theta_i j^{i+1})\) | n_pars_weights shape |
NLS |
beta |
Beta density on \((0,1)\) grid | \(2\) (shape \(a, b\)) | NLS |
unrestricted |
one coefficient per lag (U-MIDAS) | n_lags |
OLS |
OLS-estimable schemes (almon, unrestricted) are linear in the
parameters and solved via numpy.linalg.lstsq. Non-linear schemes use
scipy.optimize.least_squares(method='lm') with analytic Jacobians
computed in closed form.
The Almon basis (Vandermonde):
This matches the EViews polynomial=p parameterisation exactly.
Combination weights¶
Choose a ComboSpec.method:
| Method | Weighting | Typical use |
|---|---|---|
average |
Equal weights | Baseline combination |
mae |
Inverse mean absolute error | Less emphasis on large errors than MSE |
mse |
Inverse mean squared error | Pooling monthly indicators |
rmse |
Inverse root mean squared error | Less concentrated weights than MSE |
regression |
Joint least-squares fit | Combining a pooled indicator with quarterly data |
Weights are non-negative and sum to one over available sources:
Error and regression weights are estimated separately for each horizon. Fitted values use weights based on earlier observations; forecasts use weights estimated through the final observation, subject to the chosen window.
'average'¶
Each available source receives weight \(1/n\), where \(n\) is the number of available sources.
'mae', 'mse', 'rmse'¶
Sources with smaller past errors receive more weight. Each source uses its
own prior residuals, excluding missing targets, missing fitted values, and
dummy_periods.
window=W: use the latest \(W\) usable residuals per source.window=None: use all usable prior residuals.discount_rate: set to1for equal treatment of past residuals, or between0and1to give older residuals less influence.
For selected dates \(s_1 < \dots < s_{N_m}\) and discount
\(\delta =\) discount_rate, the error statistic is:
Use \(p=1\) for mae and \(p=2\) for mse or rmse. Weights are proportional
to \(1/S\) for mae and mse, or \(1/\sqrt{S}\) for rmse.
With window=W, an available source with fewer than \(W\) usable prior
residuals receives \(1/n\). Sources with at least \(W\) residuals divide the
remaining weight in proportion to inverse error.
For example, with window=8 and three available sources, a source with only
five residuals receives \(1/3\). The other two share \(2/3\) according to their
errors, provided each has at least eight residuals.
Use a finite window when sources start at different dates: expanding error windows can produce missing combinations when a source has no prior residuals.
'regression'¶
Choose weights jointly to minimise the combined squared error:
The sample \(C_t\) contains prior rows with a finite target and fitted values
for every retained source, excluding dummy_periods. Set window=W for the
latest \(W\) common rows, or window=None for all common rows.
estimator="constrained_ls"(default): solve with non-negative weights that sum to one. Setminimum_sample_sizeand any finitewindowat least as large as the number of retained sources.estimator="clipped_ols": fit OLS, clip weights to \([0,1]\), then normalise.
Minimum sample size (minimum_sample_size)¶
On MidasSpec, OLSSpec, and MultiMidasSpec, this sets the required number
of fitted quarterly observations. The default, None, adds no threshold.
On ComboSpec, the default is 10. Sources with fewer finite fitted values
are excluded. Regression combinations also use equal weights until the prior
common history reaches this count, before applying window.