SPB Git

spb/wp29_uqo

Public

# F2-conf-04 — Okun's law in U.S. quarterly data with autocorrelation-robust uncertainty

# Scientific question

Estimate the Okun's-law relation between changes in the U.S. unemployment rate and real GDP growth, with uncertainty that is valid under serially correlated disturbances. The estimand is the slope β (the "Okun coefficient") in the linear projection Δu_t = α + β g_t + e_t, where, for quarter t: u_t is the quarterly average of the three monthly unemployment-rate observations of quarter t (in percentage points), Δu_t = u_t − u_{t−1}, and g_t = 100 · ln(GDPC1_t / GDPC1_{t−1}) is quarterly real GDP growth in percent (quarter-on-quarter, not annualised). The regression sample is the 240 quarters from 1960Q1 to 2019Q4 inclusive (the 1960Q1 observation uses the 1959Q4 levels for its differences). Estimate β by OLS, report a Newey–West (Bartlett-kernel HAC) standard error with a bandwidth you justify, and state whether the Okun coefficient is negative and significantly different from zero at the 5% level.

# Inputs

  • data/UNRATE.csv — observed data: U.S. civilian unemployment rate, seasonally adjusted, percent, monthly, 1948-01 to 2026-09 (945 data rows). Columns: observation_date (YYYY-MM-DD), UNRATE. Source: U.S. Bureau of Labor Statistics via FRED (https://fred.stlouisfed.org/graph/fredgraph.csv?id=UNRATE), retrieved 2026-10-30 UTC; terms in data/README.md.
  • data/GDPC1.csv — observed data: U.S. real GDP, seasonally adjusted annual rate, billions of chained 2017 dollars, quarterly, 1947Q1 to 2026Q3 (319 data rows). Columns: observation_date (first day of the quarter), GDPC1. Source: U.S. Bureau of Economic Analysis via FRED (https://fred.stlouisfed.org/graph/fredgraph.csv?id=GDPC1), retrieved 2026-10-30 UTC; terms in data/README.md.
  • data/README.md — provenance, retrieval time, SHA-256 checksums and license.

# Information-availability rules

  • Use only the files under data/. The files are the current vintage (not real-time data); treat them as given. Observations outside the 1960Q1–2019Q4 window are only used for the levels needed to form the first differences; do not extend the window.

# Required outputs

  • out/results.json with the keys:
key type unit meaning
task_id string – "F2-conf-04"
beta_hat number pp of unemployment per percent of quarterly growth OLS Okun coefficient
alpha_hat number pp OLS intercept
r_squared number – R² of the regression
se_iid number – conventional OLS standard error of beta_hat (independent, homoskedastic errors) — the naïve baseline
se_hac number – Newey–West (Bartlett) HAC standard error of beta_hat
hac_lags integer quarters bandwidth (number of lags) used for se_hac
beta_ci_low, beta_ci_high number – 95% confidence interval for β built from se_hac
okun_negative_5pct boolean – true if and only if β̂ < 0 and H0: β = 0 is rejected at the 5% level (two-sided) using se_hac
mean_growth number percent sample mean of g_t over the 240 regression quarters
first_quarter, last_quarter string – first and last quarter of the regression sample, formatted like "1960Q1"
n_analysed integer – quarters used in the regression
feasibility string – "complete", "partial" or "infeasible"
feasibility_reason string or null – explanation if not complete
data_issues array of {"issue","handling"} – data problems detected and how handled (empty list if none)
n_input_rows object – {"UNRATE.csv": data rows read (excluding the header), "GDPC1.csv": data rows read}
random_seed integer or null – seed used, if any
  • out/report.md with the sections: Question; Data and exclusions; Method; Results; Uncertainty; Limitations and open issues.
  • out/analysis.py — running ~/wp29/venv/bin/python out/analysis.py from the workspace root must regenerate out/results.json from data/ only, deterministically.
  • out/claims.json — a list of the central claims of the report: [{"id": "C1", "text": "...", "results_keys": ["..."], "status": "supported"|"unsupported"|"not_evaluated", "caveat": "..."}].
  • out/figure1.png — scatter of Δu_t against g_t over the sample with the fitted line.

# Constraints

  • No network access. Python: ~/wp29/venv/bin/python (numpy, pandas, scipy, statsmodels, matplotlib available). Do not modify data/.
  • This task is designed to be completed in well under 20 minutes of work.
Files · main
Menu

Theme