Recipe Gallery
Curated index of every recipe under
examples/recipes/
with one-line purpose, required extras, and smoke-test status.
38 recipes total — 32 run on a stock pip install macroforecast;
6 require optional extras.
How to read the table
Stock install =
pip install macroforecast(no extras). All recipes in this column run end-to-end on a fresh venv with only the baseline dependencies (pandas / numpy / scikit-learn / statsmodels / scipy / matplotlib / openpyxl / PyYAML).Extras required = pin the relevant extra. e.g.
pip install "macroforecast[xgboost,shap]".Smoke-tested = covered by
tests/test_examples_smoke.py. The smoke suite parses + canonical-schema-validates every recipe and end-to-end runs the curated runnable subset.
L0 / L1 / L2 layer fragments (5)
Recipes that exercise only one layer at a time. Useful for unit work; not standalone runnable (they expect upstream sinks).
Recipe |
Purpose |
Extras |
|---|---|---|
|
L0 study setup defaults |
— |
|
L1 with custom panel |
— |
|
L1 + NBER regime |
— |
|
L1 + Hamilton MS regime estimator |
— |
|
L2 transform + outlier + impute pass-through |
— |
|
L2 with FRED-SD frequency filter |
— |
L3 feature engineering DAG (5)
Recipe |
Purpose |
Extras |
|---|---|---|
|
Single lag step |
— |
|
McCracken-Ng PCA + lag baseline |
— |
|
Cascade β: PCA over MARX ( |
— |
|
Multi-pipeline DAG: factors + MARX combine |
— |
L4 forecasting model — runnable end-to-end (8)
Recipe |
Purpose |
Extras |
Smoke |
|---|---|---|---|
|
Quick start — minimal ridge on inline panel |
— |
✅ |
|
Bagging meta-estimator (Breiman 1996) |
— |
✅ |
|
QRF (Meinshausen 2006) with quantile bands |
— |
✅ |
|
Per-regime separate fit |
— |
— |
|
Coulombe (2024) MRF GTVP |
— |
— |
|
L4 + L4.5 generator diagnostics |
— |
— |
|
L4.5 full diagnostic battery |
— |
— |
|
Horse race: AR(1) bench vs ridge + xgb / lightgbm / catboost |
|
— |
L5 evaluation (3)
Recipe |
Purpose |
Extras |
|---|---|---|
|
MSE + RMSE + MAE table |
— |
|
Full reporting: ranking + decomposition + per-target/horizon |
— |
|
LaTeX table emit for paper appendix |
— |
L6 statistical tests (2)
Recipe |
Purpose |
Extras |
Smoke |
|---|---|---|---|
|
DM (HLN) + Clark-West + residual battery |
— |
✅ |
|
Full L6: DM/CW/GR/MCS/PT/residual; 3 L4 models |
|
✅ |
L7 interpretation (5)
Recipe |
Purpose |
Extras |
|---|---|---|
|
SHAP TreeExplainer on tree model |
|
|
SHAP + permutation + lasso_inclusion together |
|
|
McCracken-Ng group-aggregate SHAP |
|
|
Rolling SHAP for time-varying importance |
|
|
Real Shapley over (cell × pipeline) |
— |
L8 export (3)
Recipe |
Purpose |
Extras |
|---|---|---|
|
Single-cell artifact (no per-cell directory) |
— |
|
LaTeX table + figure export for paper appendix |
— |
|
Full provenance manifest + lockfiles |
— |
Diagnostics — L1.5 / L2.5 / L3.5 (6)
Recipe |
Purpose |
Extras |
|---|---|---|
|
L1.5 raw data summary, default views |
— |
|
L1.5 full battery (ADF/PP/KPSS + correlation pre-cleaning) |
— |
|
L2.5 pre-vs-post preprocessing comparison |
— |
|
L2.5 full distribution shift + cleaning effect |
— |
|
L3.5 feature comparison (cleaned vs features) |
— |
|
L3.5 factor block + lag block + selection diagnostics |
— |
Replications (1, more in replications/)
Recipe |
Purpose |
Extras |
Smoke |
|---|---|---|---|
Goulet-Coulombe (2021) “The Macroeconomy as a Random Forest” — ridge baseline (paper-ported from old 8-layer schema) |
— |
— |
See docs/replications/ for end-to-end walkthroughs and the maintainer’s research replications.
Run any recipe
# Stock install
pip install macroforecast
# Or with extras
pip install "macroforecast[xgboost,lightgbm,catboost,shap]"
# Run
macroforecast run examples/recipes/<recipe>.yaml -o out/
macroforecast replicate out/manifest.json
Or programmatic:
import macroforecast as mf
result = mf.run("examples/recipes/l4_minimal_ridge.yaml", output_directory="out/")
Browse by axis / option
To find recipes that exercise a specific axis or option, browse the encyclopedia and follow the “see also” cross-references back to example recipes.