Josiah March
  • Home
  • Projects
  • Contact
  • Resume

Macroeconomic Forecasting and Machine Learning: Paper Replication

Research Assistant, Johns Hopkins University — Dr. Domenico Giannone’s Lab

View the code on GitHub →

The problem

Dr. Giannone and coauthors’ paper Macroeconomic Forecasting and Machine Learning proposes a recursive quantile forecasting framework that compares linear and deep-learning models for predicting macroeconomic indicators. To build real intuition for the framework — and to have working code I could extend — I independently replicated the paper’s methodology in Python.

My approach

  • Built the full FRED-MD data pipeline from scratch: official transformation codes, outlier detection/removal, and a one-month-ahead unemployment rate change forecasting target.
  • Implemented a recursive expanding-window forecast design, where predictors and targets are standardized using only information available at each forecast origin — avoiding any lookahead bias.
  • Built both a historical quantile benchmark and a linear quantile regression model as baselines, then implemented a deep neural network quantile regression model in PyTorch.
  • Ran a validation-based hyperparameter search over network depth, hidden layer width, Leaky ReLU activation parameter, and L2 regularization strength, selecting the final model using a complexity-index procedure before evaluating once, untouched, on a 2000–2024 holdout test sample.
  • Replicated the paper’s Figure 4 predictive interval visualization and built complexity-vs-performance tables for both validation and test samples.

Why this mattered to me

Replicating a paper end-to-end — data pipeline, baseline models, the harder neural network model, proper validation/test separation, and the exact figures — was the fastest way to actually understand the framework well enough to extend it, rather than just reading about it.

Skills used

Python · PyTorch · Recursive time-series forecasting · Quantile regression · Neural networks · Hyperparameter tuning · FRED-MD macroeconomic data · Pinball loss evaluation

Reference

Giannone, D., Lenza, M., Primiceri, G., and coauthors. Macroeconomic Forecasting and Machine Learning.