Staggered-Combination MIDAS
Mixed-frequency nowcasting and short-horizon forecasting of quarterly targets (e.g. GDP) from monthly indicators, with forecast combination.
Experimental Python implementation of Moreira (2025)
Read the user manual for the full guide.
Features
- MIDAS regression with Almon, exponential-Almon, Beta and unrestricted lag polynomials.
- Quarterly OLS counterpart (
OLS/OLSSpec) for hard quarterly indicators, sharing the same forecasting and dummy interface. - Direct multi-horizon forecasting: one model per horizon
h, fit and stored together. - Outlier dummies on the target (
dummy_periods) absorbed at the target frequency. - End-to-end combination pipeline
MidasCombo:- Average, inverse-error (
mae,mse,rmse) and regression weights across indicators. - Rolling-window and discounted-error variants.
- Combinations of combinations (a
ComboSpeccan reference otherComboSpecs as sources).
- Average, inverse-error (
- NLS estimation of non-linear weight schemes (Almon-exp, Beta).
Project Structure
├── src/nowcast_midas/ # Source code
├── docs/ # Zensical documentation site
├── examples/ # Example scripts
├── tests/midas/ # Unit tests
└── ...
Installation
pip install -e . # runtime
pip install -e ".[dev]" # + test / lint tooling
pip install -e ".[docs]" # + Zensical docs build
Python ≥ 3.10.
Quick start
from nowcast_midas import MidasCombo, MidasSpec, OLSSpec, ComboSpec
from nowcast_midas.utils import sample_combo_data
# Simulated data: three monthly series, one quarterly regressor, and a quarterly target.
target, regressors, info = sample_combo_data(n_quarters=60, seed=42)
outlier = info["outlier_date"]
# Two monthly MIDAS indicators and one quarterly OLS indicator.
midas_monthly_1 = MidasSpec(
"monthly_1", method="almon", n_lags=6, dummy_periods=[outlier]
)
midas_monthly_2 = MidasSpec(
"monthly_2", method="almon", n_lags=6, dummy_periods=[outlier]
)
ols_quarterly_1 = OLSSpec("quarterly_1", n_lags=1, dummy_periods=[outlier])
# Two MIDAS models combined via inverse-MSE weights ...
soft_combo = ComboSpec(
name="soft_combo",
sources=[midas_monthly_1, midas_monthly_2],
method="mse",
window=8,
discount_rate=0.95,
)
# ... then merged with a quarterly OLS model via constrained regression.
final_combo = ComboSpec(
name="final_combo",
sources=[soft_combo, ols_quarterly_1],
method="regression",
)
model = MidasCombo(combo_specs=final_combo, horizons=3)
model.fit(target=target, regressors=regressors)
oos = model.forecast() # wide table: one column per (variable, horizon)
print(model.summary(horizon=0))
Selected documentation
Selected examples
Contributing
- See CONTRIBUTING.md for details on how to contribute to the code.
- Open an issue with questions or ideas.
Main references
Data Classification
Bank of England Data Classification: OFFICIAL BLUE
Release files for nowcast-midas 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nowcast_midas-0.0.1.tar.gz | 55.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nowcast_midas-0.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 115.8 kB
Release files / nowcast_midas-0.0.1.tar.gz
| Download URL | nowcast_midas-0.0.1.tar.gz |
|---|---|
| Size | 55.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ed7efc622bfe5aa8d03dbdedfe1c50eaf82e078fb9759721d1ce7b2532016404
|
|
BLAKE2b-256 checksum How to use checksums |
53b858179d66a4384eadb6465be098bea3a9f52032c5ed56fa6210e0f037bb16
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.
Transparency logRelease files / nowcast_midas-0.0.1-py3-none-any.whl
| Download URL | nowcast_midas-0.0.1-py3-none-any.whl |
|---|---|
| Size | 60.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9d7548f53f932558691c8b77b6eedf0fda72edd52ab3a9aa97c2af515a495182
|
|
BLAKE2b-256 checksum How to use checksums |
47dd56821e5a3729f80230c4b6ef55bfc3e47124c7316282ea83ef99b879b73e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 28, 2026.
Transparency log