Skip to content

Add unemployment dynamics lectures (linear + nonlinear)#928

Open
jstac wants to merge 3 commits into
mainfrom
unemployment-bayes
Open

Add unemployment dynamics lectures (linear + nonlinear)#928
jstac wants to merge 3 commits into
mainfrom
unemployment-bayes

Conversation

@jstac

@jstac jstac commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

Implements #910 as a self-contained pair of lectures in the Data and Empirics section, on Bayesian time-series modeling of US unemployment (NUTS in NumPyro). Per discussion, this drops the original draft's fisheries throughline and sinh cautionary tale, and refocuses on the dynamics of a one-dimensional model plus an honest account of what the data can and cannot support.

Lectures

unemployment_linear.md — A Linear Model of Unemployment

  • Random walk (probability mass escapes every bounded interval) → linear AR(1) with mean reversion.
  • The "is it a random walk?" question: monthly $\phi$ crowds against 1 (~9-yr half-life), annual $\phi\approx0.81$; stationary spread and half-life made explicit.
  • An honest section on what's wrong with the linear model: near-unit-root at high frequency, unbounded restoring force, single reversion speed.
  • Exercises tie into ar1_turningpts: plug-in vs. posterior-integrated predictive fan charts (the conditional-vs-extended distinction), and a Wecker-style path statistic (max unemployment over the next 8 years; P(reaches 7%) ≈ 0.32 from the end-2019 low).
  • Deliberately distinct from ar1_bayes: real data, and the random-walk question rather than the initial-condition focus.

unemployment_nonlinear.md — A Nonlinear Model of Unemployment

  • Motivated by the linear model's weaknesses; a saturating tanh restoring force with a bounded pull: $u_{t+1}=u_t+\beta\tanh(\lambda(u_t-\bar u))+\varepsilon$.
  • Dynamics: 45°/cobweb stability, the separate roles of $\beta$ and $\lambda$, an iso-$\beta\lambda$ figure that draws the identification ridge before estimation, and the stationary distribution.
  • Identification contrast: monthly ($\lambda\to0$, $\beta$–$\lambda$ ridge, ≈ random walk) vs. annual ($\lambda$ identified, ridge dissolves) — information comes from the large-gap recessions.
  • An honest linear-vs-nonlinear verdict: the fitted restoring forces coincide in the data-rich center and diverge only at recession extremes, where the bounded force is more defensible.

Verification

Both lectures convert (jupytext→py) and run end-to-end on a GPU (NUTS, 4 chains, chain_method="vectorized", R̂=1.0, 0 divergences); every figure was inspected. Added to _toc.yml under Data and Empirics.

Notes for reviewers

  • The CI preview build is the first full render of the MyST directives, exercise/solution dropdowns, and cross-references ({doc} links among these lectures and to ar1_bayes, bayes_nonconj, ar1_turningpts).
  • Data are pulled live from FRED (UNRATE) via pandas_datareader, consistent with existing lectures.
  • A constant natural rate $\bar u$ over the full post-war sample is a deliberate simplification, flagged in the text and left to the extensions/literature.

🤖 Generated with Claude Code

Implements issue #910 as a self-contained pair of "Data and Empirics"
lectures on Bayesian time-series modeling of US unemployment, estimated
with NUTS in NumPyro. Drops the fisheries throughline and the sinh
cautionary tale from the original draft.

unemployment_linear.md — A Linear Model of Unemployment
- Random walk (mass escapes every bounded interval) -> linear AR(1).
- The "is it a random walk?" question: monthly phi crowds against 1
  (~9yr half-life), annual phi ~0.81; stationary spread and half-life.
- Honest account of what's wrong with the linear model: near unit root,
  unbounded pull, constant reversion speed.
- Exercises tie to ar1_turningpts: plug-in vs posterior-integrated
  predictive fan charts, and a Wecker-style path statistic (max
  unemployment over the next 8 years).
- Distinct from ar1_bayes by design: real data, the random-walk question.

unemployment_nonlinear.md — A Nonlinear Model of Unemployment
- Motivated by the linear model's weaknesses; saturating tanh restoring
  force with a bounded pull, canonical form u_{t+1}=u_t+b*tanh(l(u_t-ubar))+e.
- Dynamics: 45-degree/cobweb, the separate roles of beta and lambda,
  iso-(beta*lambda) "ridge before estimation", stationary distribution.
- Identification contrast: monthly (lambda->0, beta-lambda ridge,
  ~random walk) vs annual (lambda identified, ridge dissolves).
- Honest linear-vs-nonlinear verdict: fitted restoring forces coincide in
  the data-rich center and diverge only at recession extremes.

Both verified end-to-end (NUTS, 4 chains, R-hat=1.0); added to _toc.yml
under Data and Empirics.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 22, 2026

Copy link
Copy Markdown

📖 Netlify Preview Ready!

Preview URL: https://pr-928--sunny-cactus-210e3e.netlify.app

Commit: ade5fc0

📚 Changed Lectures


Build Info

jstac and others added 2 commits June 22, 2026 11:51
Connect the "is unemployment a random walk?" discussion to the
natural-rate vs hysteresis debate of the 1980s-90s:
- Overview now flags the debate (Friedman's natural rate vs
  Blanchard-Summers hysteresis), with the Nelson-Plosser irony that
  unemployment was their one stationary series.
- A note in the phi-section explains why near-unit-root phi makes the
  debate hard to settle (low test power) and points to the nonlinear
  resolution pursued in unemployment_nonlinear.
- Adds 5 references to _static/quant-econ.bib (Friedman 1968,
  Nelson-Plosser 1982, Blanchard-Summers 1986, Røed 1997,
  Kapetanios-Shin-Snell 2003).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…currence

Replace the "linear pull is unbounded, which is bad" argument with a
safer, positive observation: viewed linearly the data look like a random
walk, yet unemployment stays in a band for decades. The linear model can
reconcile these only on a knife-edge (phi just below 1); nonlinearity
reconciles them structurally -- random-walk-like in normal times, with a
firmer restoring force far from the natural rate that guarantees
recurrence.

- unemployment_linear: rename "What's unsatisfying..." to "Random walk,
  yet recurrent" and rewrite around the reconciliation; update the bridge
  prose under the scatter. Also incorporates John's Overview edits plus
  minor grammar fixes.
- unemployment_nonlinear: reframe the Overview and conclusion to match.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant