SPB Git

spb/wp29_uqo

Public
5.3 KB · 45 lines markdown
1# F3-conf-01 — Forecasting Canadian monthly GDP growth under publication lags23## Scientific question4At the end of each month, how well can the year-over-year growth of Canadian monthly real GDP one and three months ahead be forecast from the information that is actually published at that time, and does a model that also uses the (more timely) Labour Force Survey employment growth beat the naive forecast? The estimands are the out-of-sample RMSE and MAE, over a fixed set of 48 rolling (expanding-window) origins and horizons h ∈ {1, 3}, of (a) the naive forecast and (b) one model of your choice, and the relative improvement 1 − RMSE_model / RMSE_naive per horizon.56## Inputs7- `data/canada_gdp_employment.csv` — observed data (Statistics Canada, current vintage, retrieved 2026-10-30 UTC via the Web Data Service; see `data/README.md` for vectors, URL, SHA-256 and licence). Columns: `month` (YYYY-MM-01), `gdp_level` (monthly real GDP at basic prices, chained 2017 dollars, SA, millions), `gdp_yoy` (target: year-over-year growth of `gdp_level`, percent, 4 decimals), `emp_level` (LFS employment, SA, thousands), `emp_yoy` (predictor: year-over-year employment growth, percent, 4 decimals). 345 monthly rows, 1998-01 to 2026-09; GDP columns are empty after the last published GDP month (2026-07), employment runs to 2026-09.89## Information-availability rules10- Forecast origins: the 48 months t = 2022-05-01, 2022-06-01, …, 2026-04-01 (identified by their `month` value). The origin is the **end** of month t. Horizons h ∈ {1, 3}; the target of origin t at horizon h is `gdp_yoy` of month t + h.11- Publication lags (documented in `data/README.md`): monthly GDP for a reference month is published about two months after the end of that month; LFS employment for a reference month is published in the first/second week of the following month. Therefore, at origin t, **the GDP columns are available only for months ≤ t − 2 and the employment columns only for months ≤ t − 1**. A forecast made at origin t (its estimation sample, its model selection, its transformations and the values plugged into the forecast) may use only these observations. Training targets must also be observed at the origin.12- Naive baseline: for both horizons, the forecast is the most recent GDP growth value available at the origin, i.e. `gdp_yoy` of month t − 2.13- The errors are computed on the data as given (current vintage); the exercise simulates publication timing, not historical first-release values — do not claim real-time validity.1415## Required outputs16- `out/forecasts.csv` — the forecast ledger, one row per (origin, horizon, model), columns: `origin_date` (YYYY-MM-DD, the `month` of the origin), `target_date`, `horizon` (integer), `forecast`, `actual` (the `gdp_yoy` value of the target month), `model` (`naive` or the value of `model_name`), `last_target_date_used` (YYYY-MM-DD: the latest `gdp_yoy` month entering the forecast, estimation included), `last_predictor_date_used` (YYYY-MM-DD: the latest `emp_yoy` month used, or empty if the model does not use employment). Expected: 48 × 2 × 2 = 192 rows.17- `out/results.json` with the keys:1819| key | type | unit | meaning |20|---|---|---|---|21| `task_id` | string | — | "F3-conf-01" |22| `model_name` | string | — | short name of your model, used in the `model` column |23| `model_description` | string | — | one-sentence specification (lags, predictors, estimation sample, method) |24| `n_origins` | integer | — | 48 |25| `first_origin`, `last_origin` | string | date | first and last origin dates |26| `last_target_date_available` | string | date | latest `gdp_yoy` month available at the last origin (2026-04-01) under the rules |27| `last_predictor_date_available` | string | date | latest `emp_yoy` month available at the last origin under the rules |28| `rmse_naive_h1`, `mae_naive_h1`, `rmse_naive_h3`, `mae_naive_h3` | number | percentage points | naive errors per horizon |29| `rmse_model_h1`, `mae_model_h1`, `rmse_model_h3`, `mae_model_h3` | number | percentage points | your model's errors per horizon |30| `rel_improvement_rmse_h1`, `rel_improvement_rmse_h3` | number | fraction | 1 − rmse_model / rmse_naive |31| `feasibility` | string | — | "complete", "partial" or "infeasible" |32| `feasibility_reason` | string or null | — | explanation if not complete |33| `data_issues` | array of {"issue","handling"} | — | data problems detected and how handled (empty list if none) |34| `n_input_rows` | object | — | {"canada_gdp_employment.csv": number of data rows read, excluding the header} |35| `n_analysed` | integer | — | observations in the last estimation sample |36| `random_seed` | integer or null | — | seed used, if any |3738- `out/report.md` with the sections: Question; Data and exclusions; Method; Results; Uncertainty; Limitations and open issues.39- `out/analysis.py` — running `~/wp29/venv/bin/python out/analysis.py` from the workspace root must regenerate `out/results.json` and `out/forecasts.csv` from `data/` only, deterministically.40- `out/claims.json` — a list of the central claims of the report: [{"id": "C1", "text": "...", "results_keys": ["..."], "status": "supported"|"unsupported"|"not_evaluated", "caveat": "..."}].4142## Constraints43- No network access. Python: `~/wp29/venv/bin/python` (numpy, pandas, scipy, statsmodels available). Do not modify `data/`.44- This task is designed to be completed in well under 20 minutes of work.45
Files · 452964ee0fbbaa40fbbed2c87a54ca798ffd6a85
Menu

Theme