Skip to content

[bounded_rationality] Correct, connect, and extend the Bounded Rationality lectures - #1101

Merged
mmcky merged 6 commits into
mainfrom
nov_penn
Nov 2, 2026
Merged

mmcky merged 6 commits into
mainfrom
nov_penn

Conversation

@mmcky

@mmcky mmcky commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

Review and revision of the seven lectures in the Bounded Rationality in Macroeconomics suite, checked against the 1993 book and Marimon, McGrattan and Sargent (1990).

Shared across the suite

  • One stochastic-approximation / E-stability thread, introduced in bounded_rationality ("One recursion, many learners") and used by the later lectures, with the history credited accurately (DeCanio, Evans, Marcet-Sargent, Woodford; Evans-Honkapohja as systematizers)
  • Consistent verdicts on selection: MMS economy A2 is convergence to a non-equilibrium; the two-currency exchange rate is history-dependent
  • Repaired hand-offs and cross-links, the book's four payoffs, the prompting gradient, a notation table, and de-duplicated quotes
  • Ten new bibliography entries

By lecture

  • bounded_rationality: Bray's learners, E-stability, the bubble linked to olg_adaptive_money, corrected quotes and attributions
  • olg_adaptive_money: remove the pi0 = 3 floating-point artifact, explain the stability reversal by E-stability, condense the Phillips section with corrected attributions, three new exercises
  • learning_approximation: simulate the same 201-state chain the benchmark is solved on, converge the kernel smoother, correct the recursive kernel formula, ODE comparison of batch and online learning
  • exchange_rate_learning: fix the tautological limits figure and a print bug, correct the kappa, election-operator, and time-series claims
  • genetic_classifier: common random numbers and a 20-seed sweep for the prisoner's dilemma, matching perceptron code, a bucket-brigade subsection
  • marimon_mcgrattan_sargent: correct the Kiyotaki-Wright condition, adopt the paper's encoding and a single paper-style genetic algorithm, report every economy across seeds, derive the bucket brigade's effective discount factor
  • prospects_bounded_rationality: correct the history (Bray, E-stability, Chung, SWZ), settle the four payoffs, qualify the identification argument, four new exercises

…ality lectures

Review and revision of the seven lectures in the Bounded Rationality in
Macroeconomics suite, checked against the 1993 book and Marimon, McGrattan
and Sargent (1990).

Shared across the suite
- One stochastic-approximation / E-stability thread, introduced in
  bounded_rationality ("One recursion, many learners") and used by the later
  lectures, with the history credited accurately (DeCanio, Evans,
  Marcet-Sargent, Woodford; Evans-Honkapohja as systematizers)
- Consistent verdicts on selection: MMS economy A2 is convergence to a
  non-equilibrium; the two-currency exchange rate is history-dependent
- Repaired hand-offs and cross-links, the book's four payoffs, the
  prompting gradient, a notation table, and de-duplicated quotes
- Ten new bibliography entries

By lecture
- bounded_rationality: Bray's learners, E-stability, the bubble linked to
  olg_adaptive_money, corrected quotes and attributions
- olg_adaptive_money: remove the pi0 = 3 floating-point artifact, explain the
  stability reversal by E-stability, condense the Phillips section with
  corrected attributions, three new exercises
- learning_approximation: simulate the same 201-state chain the benchmark is
  solved on, converge the kernel smoother, correct the recursive kernel
  formula, ODE comparison of batch and online learning
- exchange_rate_learning: fix the tautological limits figure and a print bug,
  correct the kappa, election-operator, and time-series claims
- genetic_classifier: common random numbers and a 20-seed sweep for the
  prisoner's dilemma, matching perceptron code, a bucket-brigade subsection
- marimon_mcgrattan_sargent: correct the Kiyotaki-Wright condition, adopt the
  paper's encoding and a single paper-style genetic algorithm, report every
  economy across seeds, derive the bucket brigade's effective discount factor
- prospects_bounded_rationality: correct the history (Bray, E-stability,
  Chung, SWZ), settle the four payoffs, qualify the identification argument,
  four new exercises

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copilot AI balanced review requested due to automatic review settings November 2, 2026 01:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Execution and output correctness of the substantial new notebook code across the large multi-file revision couldn't be validated in this environment, so confirmation of a clean CI build is needed before approval.

No open issues 🎉

What changed in this PR

This PR revises the seven-lecture "Bounded Rationality in Macroeconomics" suite (checked against Sargent 1993 and Marimon–McGrattan–Sargent 1990), of which five files appear here: four lecture files plus the shared bibliography. The changes tighten the economics narrative, repair hand-offs and cross-links between lectures, introduce a single stochastic-approximation / E-stability thread used across the series, correct quotes/attributions and a few numerical artifacts, add many new worked exercises with executable solutions, and register ten new bibliography entries.

Changes:

  • Introduce and reuse one E-stability / stochastic-approximation framing (new br_one_recursion, br_payoffs, br_notation sections in bounded_rationality), with consistent cross-lecture {ref}/{doc} links and a notation table.
  • Rework code and prose in learning_approximation (single 201-state chain for benchmark and learners, matrix-form T_map, converged kernel smoother, ODE batch-vs-online comparison) and exchange_rate_learning (ridge/κ stabilizer, limits figure fix, genetic-algorithm volatility diagnostics), plus many new exercises in all four files.
  • Add 10 new .bib entries (DeCanio1979, Evans1989, denHaanMarcet1990, Giannitsarou2005, MalmendierNagel2016, Arthur1991, BullardDuffy1993, Hopfield1982, Arifovic1994, KuanLiu1995), all referenced and unique.

Verification performed: all 65 {cite*} keys across the four lectures resolve to the bib; all {ref}/{numref}/{eq}/{doc} targets resolve; no duplicate figure names or labels; exercise/solution directives and code fences are balanced; removed symbols (brentq, market_prices, sigma_u) are fully unused; and the refactored helpers (e.g., the lfilter rewrite of smoothing_mse, rule/parameterized_expectations/online_pea, and exercise algebra such as the T-map fixed points and slopes) are internally consistent. Notebook execution could not be run in this environment, so output correctness should be confirmed by the CI build.

File Description
lectures/​bounded_rationality.md Adds the quest/payoffs/notation framing and the "One recursion, many learners" E-stability section; corrects quotes, attributions (muth1961, Friedman1957), and bubble/two-currency exposition; adds exercises br_ex4–ex5.
lectures/​prospects_bounded_rationality.md Rewrites the 1993 "ledger" and postscript (four payoffs, identification argument, constant-gain estimability), corrects history/attributions, adds exercises pbr_ex1–ex4.
lectures/​learning_approximation.md Unifies benchmark and learners on one 201-state chain, matrix-form T_map/PEA, converged recursive kernel smoother, batch-vs-online ODE/eigenvalue analysis; adds exercises lae_ex4–ex5.
lectures/​exchange_rate_learning.md Clarifies Newton–Raphson history-dependence, adds the κ ridge stabilizer, fixes the limits figure and spectrum/print bugs, adds genetic-population diagnostics and exercises xr_ex4–ex5.
lectures/​_static/​quant-econ.bib Adds ten new bibliography entries supporting the new citations across the suite.

Review effort: Balanced

…ty lectures

marimon_mcgrattan_sargent
- A larger bid fraction pulls a rule's stationary strength toward zero
  rather than always lowering it, so the critique of the paper's "favor
  specific rules" claim now turns on the sign of downstream payments
- A1.1 trade-flow prose matches the figure; the off-equilibrium arrows are
  not thin
- Economy C is compared with the paper's run correctly
- Seed count for Economy D; crossover and first-update wording match the
  code; Ex5 conclusions are scoped to its six runs

bounded_rationality
- The core of the E-stability theory predates the book; "may seem a weak
  reed"; Bray's b is distinguished from this lecture's demand slope

olg_adaptive_money
- Gain contrast with bounded_rationality, the positive-saving qualifier,
  and the first realized inflation rate in Ex5

learning_approximation
- The factor of four is the predicted rate, not the realized one; the Ex1
  reading matches its table; Ex4 notes the E-unstable second equilibrium

exchange_rate_learning
- The zero gap in the limits figure is near-automatic; the election
  operator is not the only source of learning

genetic_classifier
- Ex2, Ex3 and Ex4 claims are scoped to the seeds shown; spurious Hopfield
  states are fixed points, most of them local minima

prospects_bounded_rationality
- Identification "at the usual rate"; the E-stability limits paragraph;
  the Ex3 single-learner penalty is bounded, not small

The A2.1 and B.1 multi-seed claims are left for the author in #1102.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmcky

mmcky commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Review summary

I reviewed all seven lectures:

  • Execution: ran every code cell in a fresh kernel at the PR head and on main.
  • Corrections: reproduced each bug the description claims on main and confirmed the fix on this branch.
  • Maths: re-derived the new mathematics.
  • Numbers: checked the numbers quoted in the prose against the executed output, and reran stochastic claims on extra seeds wherever the prose says "every", "always" or quotes a specific value.
  • References: checked labels, cross-references and bibliography keys across the lecture set.

Bottom line: the corrections are real and the mathematics holds up. Every error named in the description reproduces on main and is fixed here. Nothing blocks the build.

One substantive error (the bid-fraction claim in marimon_mcgrattan_sargent) and a set of smaller prose issues are fixed in f596e5f, pushed to this branch. One multi-seed claim in marimon_mcgrattan_sargent needs an author decision and is raised with @thomassargent30 in #1102.

Line numbers below refer to 473d382.

Fixed in f596e5f

marimon_mcgrattan_sargent: bid fractions (L463–464, L555–556). The lecture said a larger bid fraction "lowers" a rule's stationary strength, and used that to correct the paper's claim that specificity-linked bids "favor specific rules". But its own rest-point equation gives S_e = E[b₂S_c]/(1+b₁). A larger b₁ therefore pulls S_e toward zero, raising it when downstream payments are negative. Among such rules, higher bids do favor specific rules, as the paper says. The text and the note now state both cases.

Prose that contradicted the output, or claimed more than the seeds support:

Lecture Where Change
marimon_mcgrattan_sargent L1215–1222 Said "the thick arrows are the fundamental triangle". In the seed-0 figure, type 3's payoff-neutral 1→2 trade (0.33 per period) is twice its equilibrium 1→3 trade (0.165), so the extra arrows are not thin.
marimon_mcgrattan_sargent L1966–1971 Fiat holdings were described as "close to" the paper's run. Its type 1 holds fiat 46% of the time against our 30%. The largest gap from the paper (0.158) is that, not type 2's good 1.
marimon_mcgrattan_sargent L1148, L1715, L1733, L2520–2529 Economy D uses 10 seeds, not 20. Crossover only wildcards positions where the parents carry different specific bits. A child's birth strength survives its first update through the bid it pays. Ex5's conclusions are now scoped to its six runs: on seeds 6–29 the accepting rule already wins 5 of 24 runs at u₁ = 12,000.
bounded_rationality L794 "None of this postdates the book" came right after citations from 1999–2019. Now: "The core of the theory predates the book".
bounded_rationality L1167 "Judges this 'a weak reed'" dropped the book's hedge. It now quotes "may seem a weak reed", as exchange_rate_learning and prospects do.
bounded_rationality L666 "Bray's feedback coefficient b is our h′": in this lecture b is the slope of demand, so the clash is now spelled out.
olg_adaptive_money L359 "There the gain was constant", but the Bray section of bounded_rationality uses a 1/t gain. Now contrasts with the relaxation algorithm.
olg_adaptive_money L1356 Restored the "with positive saving" qualifier that L909 and ex6 carry.
olg_adaptive_money L1845 (ex5) The first realized inflation rate from a belief near 6 is exactly 1 (T ≡ 1 at G = 0). The deep deflation is the second.
learning_approximation L761 "Cuts their error by a factor of about four": 4.1 is the printed asymptotic prediction 500^0.228. The lecture's own θ path gives 6.3 (4.6–6.3 over 8 seeds). Now "would cut".
learning_approximation L1044 (ex1) "Stay well above" the population errors: on history 0 the sup error is below the population value (0.0170 vs 0.0176 at degree 3). Now refers to the ergodic RMS, which stays above on every history.
learning_approximation L1320 (ex4) The high-inflation equilibrium, with saving about (1.19, 1.63), is also a fixed point of the linear-family map. It is E-unstable (eigenvalue 1.515), which is why the algorithm settles on the low one.
exchange_rate_learning L473 The zero gap from the λ∞ curve is close to automatic: e_t = (H₁/H₂)(1−λ)/λ at the young class's share holds at every date, transients included, to 3e-16. So it only confirms that the classes merged; the dashed curve carries the content.
exchange_rate_learning L879, L1180, L1194 The election operator is not the only source of learning. Without it, the spread of saving within the population is 1.31–1.37, against 3.15 for an unselected population, and mean λ moves more than pure averaging would allow. Softened.
genetic_classifier L1534 (ex3) "β = 32 is on average an improvement": over 400 seeds the mean share is 0.627 vs 0.599, a paired difference of +0.029 (se 0.024). Now says the gain is not robust.
genetic_classifier L1422 (ex2), L1666 (ex4) Scoped to the seeds shown. At the higher mutation rate, seeds 24–35 give crossover +0.029. At b = 0.7, 4 of 60 extra runs are still 0.3–1.25 from p* at t = 299.
genetic_classifier L1337, L1351 11 of the 33 distinct shallow spurious states have a lower-energy single flip, so they are fixed points, not all local minima.
prospects_bounded_rationality L1356 "Permanence is necessary for identification" is contradicted by part 2 of the same exercise: at b = 0.7 the penalty grows like T^0.4 without bound. Now "at the usual rate".
prospects_bounded_rationality L787 "A case in point" followed the paragraph on E-stability's limits. Now introduced as the condition working within those limits.
prospects_bounded_rationality L1466 (ex3) The single learner's penalty is bounded, but its expected value tends to about 6.4, above 3.84, so "stays small" became "stays bounded".

These are prose-only changes. A full jb build with execution off gives 133 warnings before and after; none come from these edits, and the only warnings this PR adds are the expected undefined labels for figure names that come from cell outputs.

Raised for the author: #1102

A2.1 lock-in. "So these runs are slow rather than stuck for good" (L1348) and "all of them reach the fundamental pattern by t = 6000" (L1363) hold for seeds 0–19 only. On seeds 20–39, 3 of the 16 runs that are off the pattern at t = 1000 are still off at t = 6000. Seeds 24 and 26 are unchanged at t = 24,000. The cause is a different lock-in from the one described: type 2's general consumption rule ##0 -> 1 eats every good 1 it trades for.

Economy B.1. The overview's "nearly every run" is 31 of 40 on seeds 20–59.

The main A2 verdict is unaffected: type 1 never speculates in any of 60 seeds. The issue sets out three ways to reword the claims.

Left for the author (optional, not changed)

  • Gain notation in prospects: pbr_ex1 writes the gain as λ (around L1094) and pbr_ex4 as g (L1492–1530), against the series convention γ (bounded_rationality L274, olg_adaptive_money L1032). g also clashes with the perfect-foresight map g(π) at L1091. pbr_ex1 also writes realized inflation as π_t where olg_adaptive_money calls the same object π_{t−1}; the dynamics are identical.
  • Bullard–Duffy: least squares "fails to converge" for n ≥ 4 (olg_adaptive_money L968–970) vs "can fail" (prospects L803–805).
  • Economy B as a selection credit: prospects (L576–578, L693, L709) counts it as one. marimon_mcgrattan_sargent (L1577–1580, L1689–1690) attributes B's outcome to the same bucket-brigade impatience that makes A2 a debit. This is interpretive.
  • genetic_classifier L120 says the recursion is "shared by every learner in this series", but bounded_rationality L735 says "most learners", and L789 puts population algorithms outside the theory.
  • olg_adaptive_money ex7 (L2056–2059), "most of it arrives during escapes" (uncertain): on seeds 1–3, the periods with fast falls in g carry 6–14% of the penalty, about their share of time. Low-inflation periods carry more, 51–63%.
  • marimon_mcgrattan_sargent crowding score (L1720, L1800): it adds 1 when the action differs, which reverses the usual similarity measure. Prose and code agree, and main had the same; worth checking against the paper.
  • Description: olg_adaptive_money gains four new exercises and drops one (the old Phillips-gain exercise), a net of three, not "three new".

Verified corrections (highlights)

  • marimon_mcgrattan_sargent
    • main's Kiyotaki–Wright condition could never fail, contradicting its own A2 verdict. The new π₃(1) − π₂(1) form matches independent value iteration exactly (114.11 / 137.75 at β = .999).
    • The derivation of β_eff checks out, and the lecture's own bucket_brigade reproduces it to four decimals.
    • The one-hot encoding gives the stated rule counts.
  • olg_adaptive_money
    • On main, convergence from π₀ = 3 to 2 was a rounding artifact. In exact arithmetic β stays at 3; in floats the 4.4e-16 error grows ×2.41 per period.
    • T′(2) = ½ and T′(3) = 2.
    • The off-by-one in main's β formula is fixed.
  • learning_approximation
    • On main, the learners converged to the fixed point of a clipped 21-state simulation, which is 0.20 (sup) from the benchmark. That mismatch, not sampling noise, produced Ex1's errors rising with degree.
    • The kernel smoother now converges (140 passes, against main's silent stop at 40).
    • The recursive kernel formula now carries h^{-d}: 0.3965 against a true density of 0.3989, where main's version decays toward 0.
  • exchange_rate_learning
    • main's limits figure was tautological: λ never moved (1.1e-16).
    • The κ = 0 step explodes rather than stalling.
    • φ = 0.874–0.908 over 14 seeds, so the "near unit root" claim on main was wrong.
  • genetic_classifier
    • main's perceptron code was the logistic-likelihood gradient, not the displayed NLS recursion.
    • main's PD champion fitness (2.672) exceeded the true ceiling (2.608).
    • The CRN implementation is exact: 60 copies of one gene give fitness sd 9e-16.
    • The 20-seed sweep reproduces exactly and holds over 60 seeds.
  • bounded_rationality and prospects_bounded_rationality: the SA/ODE and E-stability statements, Bray's convergence results, and the six new exercises re-derive.
  • Suite consistency: the A2 and two-currency verdicts, the four payoffs, and the hand-offs all match the toc. No long quotation is repeated across lectures.

Build and runtime

All seven lectures execute with zero cell errors. Locally, marimon_mcgrattan_sargent drops from 191 s to 89 s, and the suite's total is about the same as on main.

Not verified

Quotations and chapter or footnote locators for Sargent (1993) and Marimon, McGrattan and Sargent (1990), the Arifovic and Bullard–Duffy results as characterised, and the rendered figures.


🤖 Generated with Claude Code

…ity lectures

- olg_adaptive_money: fold the two-sentence parenthetical on the pi0 = 3
  rest point into one sentence (qe-writing-001)
- exchange_rate_learning: write "IID", as the rest of the suite does
  (qe-writing-009, proposed)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmcky

mmcky commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Style-guide pass

I checked the PR against the QuantEcon style guide (rules from action-style-guide at main).

  • Scanner: I ran the deterministic scanner from compliance-lecture-style on all seven lectures at main and at the PR head, kept only the issues on lines this PR adds, and checked each by hand.
  • Rules the scanner doesn't cover: citation style, heading case, exercise and solution format, and math notation, checked by hand.

The new material is in good shape. Commit f9a095d applies the two changes worth making.

Pushed in f9a095d

Change Rule Where
Fold the two-sentence parenthetical about starting at exactly π₀ = 3 into one sentence. qe-writing-001 olg_adaptive_money
"i.i.d." → "IID". This was the only non-"IID" form in the suite. qe-writing-009 (proposed) exchange_rate_learning (xr_ex5)

Both are prose-only. A rescan shows both issues cleared.

Checked and fine

  • Citations (qe-ref-001): every citation whose authors are the subject of the sentence already uses {cite:t}. This is the rule that needed 15 fixes in [stats_info] Correct the mathematics and add exercises across the Statistics and Information lectures #1099.
  • Headings (qe-writing-006): H1 is in Title Case and every new H2–H4 is in sentence case.
  • Exercises (qe-admon-001, -002, -005): all 36 exercises use the gated exercise-start form, and every solution is a dropdown linked to its exercise.
  • Math (qe-math-002, -004, -006, -007): no transposes written with ', no bold vectors, no align environments and no manual \tags. The primes are all derivatives.
  • Figures: axis labels are lowercase or math (qe-fig-006), and no spines are removed (qe-fig-007). New figsize settings are on multi-panel figures or follow each lecture's own convention (qe-fig-001). The one figure without mystnb metadata is in a solution (qe-fig-005).
  • Packages (qe-code-003): installs are at the top of the lecture.
  • Scanner false positives:
    • qe-writing-004 flags "Economy A2", "Economy B.1" and similar 30 times, but these are the names of economies. It also flags "Inflation" in The Conquest of American Inflation and "the Great Inflation".
    • qe-math-013 (proposed) flags "the paper's equation (6)" and similar, which refer to the paper's numbering, not the lecture's.

Left for the author (optional)

  • Exercise parts with several sentences (qe-writing-001): the scanner flags 39 numbered exercise parts and summary bullets that hold two to four sentences. The rule's examples are about paragraphs, and the scoring spec says the check should leave lists alone. Splitting them would mean restructuring most of the new exercises, so I left them.
  • Greek names in marimon_mcgrattan_sargent code (qe-code-002): the new code uses β, β_A, β_eff, π31 and π21, but ASCII eta (16 uses), tau (7) and sigma (5). Renaming them touches the numba functions, the Economy.eta field and the eta=0.5 arguments that the text of two exercises names, so it is a whole-lecture change.
  • Caption length (qe-fig-004, at most 5–6 words): three new captions run to 9–10 words, against 6–7 for the suite's existing captions:
    • "Relaxation algorithm paths: the cobweb and three smaller relaxation parameters"
    • "Belief errors in Bray's market under fixed and declining gains" (both bounded_rationality)
    • "Limiting exchange rate against the mean initial portfolio share" (exchange_rate_learning)
  • Line width (qe-fig-008): the speculation-threshold figure in marimon_mcgrattan_sargent and the olg_ex7 likelihood plot use the default line width rather than lw=2.
  • Panel titles (qe-fig-003): ax.set_title labels the panels of the relaxation figure in bounded_rationality and of one figure in learning_approximation. Both were already on main.
  • Probability notation (qe-math-010, proposed): \Pr appears in genetic_classifier (two places) and \operatorname{Prob} in olg_adaptive_money, rather than \mathbb{P}.

🤖 Generated with Claude Code

Per Tom's choice of option 2 in #1102:

- The first lock-in (a lucky refusal rule shutting out an untried trade
  rule) is slow rather than permanent, as before; the text now says so
  only of that mode
- A new seed-24 cell shows a second, permanent lock-in: type 2's general
  consumption rule `##0 -> 1`, kept strong by eating good 2, also eats
  the good 1 it should keep, and the specific rule `100 -> 0` never wins
  the argmax auction again; seeds 24 and 26 are unchanged at t = 24,000
- Overview and summary: "a few stay stuck for good" in A2; Economy B
  selects the fundamental equilibrium in most runs (31 of 40 on seeds
  20-59) and the speculative one in none

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mmcky

mmcky commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

Follow-up: A2.1 lock-in (#1102)

@thomassargent30 chose option 2 from #1102: describe the second lock-in as a failure mode in its own right. Done in 5a2bf5a, changing marimon_mcgrattan_sargent only.

  • First lock-in: a once-lucky refusal rule shuts out an untried trade rule. It is still described as slow rather than permanent, but now only for that mode.
  • Second lock-in: a new seed-24 cell shows it. Type 2's general consumption rule ##0 -> 1 is kept strong by eating good 2 (strength 146.86), so it also eats the good 1 it should keep for trade. The specific rule 100 -> 0 was tried 3 times, sits at 0.54, and never wins the argmax auction again. Seeds 24 and 26 are unchanged at t = 24,000.
  • Two failure modes compared: the new text calls this lock-in the cost of generality, against optimistic initialization. It also records that type 1 never speculates on seeds 20–59 (0 of 40 runs).
  • Overview and summary: in A2, "a few stay stuck for good". Economy B selects the fundamental equilibrium "in most runs and the speculative one in none": 18 of 20 on the lecture's seeds, 31 of 40 on seeds 20–59.

The lecture runs cleanly: 51 cells, 0 errors, 57 s locally.

#1102 stays open as the reminder to return to option 3 (more seeds and longer horizons, reporting frequencies) in about six months, as Tom suggested.

With this, all the review items are addressed. This is ready to merge once the preview build is green.

🤖 Generated with Claude Code

mmcky and others added 2 commits November 2, 2026 15:06
- Say the same fact once: the specific rule sits far below the general
  rule's strength, so it never wins the argmax auction
- Name the mechanism with the lecture's own term, an overgeneral
  consumption rule, instead of coining "the cost of generality"
- Add seed 24 to the third item of the three-mechanisms list so the new
  passage ties into the existing framework

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Five solution-block cells carried mystnb figure captions, which the
LaTeX builder renders as a figure environment inside the solution box
and rejects with "Not in outer par mode", failing the PDF build on every
push of this branch. No lecture on main has a captioned figure inside a
solution, and nothing cross-references these five names, so the plots
now render as plain outputs.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

@mmcky
mmcky merged commit 1719248 into main Nov 2, 2026
2 checks passed
@mmcky
mmcky deleted the nov_penn branch November 2, 2026 05:31
@mmcky

mmcky commented Nov 2, 2026

Copy link
Copy Markdown
Contributor Author

✅ Translation sync completed (zh-cn)

Target repo: QuantEcon/lecture-python.zh-cn
Translation PR: QuantEcon/lecture-python.zh-cn#311
Files synced (7):

  • lectures/bounded_rationality.md
  • lectures/exchange_rate_learning.md
  • lectures/genetic_classifier.md
  • lectures/learning_approximation.md
  • lectures/marimon_mcgrattan_sargent.md
  • lectures/olg_adaptive_money.md
  • lectures/prospects_bounded_rationality.md

mmcky added a commit that referenced this pull request Nov 3, 2026
Twenty solution-block cells across ten lectures carried mystnb figure
captions, which the LaTeX builder renders as a figure environment inside
the solution box and rejects with "Not in outer par mode", failing the
PDF step of the preview build. Nothing cross-references these names, so
the plots now render as plain outputs, as in the same change on #1101.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
mmcky added a commit that referenced this pull request Nov 3, 2026
…lectures (#1105)

* [phillips] Correct, connect, and extend the Phillips Curve Tradeoffs lectures

Review and revision of the Phillips Curve Tradeoffs suite, checked against
The Conquest of American Inflation and the papers it draws on (Cho, Williams
and Sargent 2002; Sargent and Williams 2005; Cogley and Sargent 2005;
Sargent and Williams 2025/26; Abreu, Pearce and Stacchetti 1990).

Structure
- New lecture phillips_policy_evaluation on Conquest chapter 9: maximum
  likelihood estimation of the classical and Keynesian adaptive models
- phillips_drifts_volatilities split; the post-2000 update is now
  phillips_drifts_volatilities_2
- phillips_lost_conquest moved to the end of the suite

Shared across the suite
- One escape story: Sims and Chung escape once and stay; Sargent (1999) and
  CWS recur; Sargent and Williams (2005) explain the difference by the prior;
  escapes are frequent at the gains the suite uses
- The E-stability eigenvalue -1/(1+theta^2) made explicit in 98, 102, 103, 105
- Links to the Bounded Rationality suite, ls_learning, kalman,
  rational_expectations, markov_perf, and the advanced series, with reverse
  links from ls_learning, kalman, and rational_expectations
- Rewritten notation and gain tables; MarcetSargent1989jet citation key;
  direct FRED CSV reads; 20 new bibliography entries

Corrections that change results
- Discounted Riccati cross term in phillips_learning and phillips_lost_conquest
- Kalman-filter normalization and the Sims replication in phillips_priors
- Both incentive constraints for Abreu's stick and carrot, the worst-value
  feasibility check, and the APS starting-set condition
- Better-than-Nash outcomes of optimal misspecified beliefs shown to vanish
  as the perceived root goes to one
- Vector field of phillips_escaping_nash (the moment matrix lags)
- Escape-route persistence prediction, an exact longer MCMC chain, and Monte
  Carlo error in phillips_drifts_volatilities
- Real-time data and the January 2026 propositions in phillips_lost_conquest
- Data statements, figures, and the October 2025 gap in phillips_two_stories

Exercises: about fifty, up from 21, many linking lectures

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [phillips] Fix two notebook execution failures

phillips_lost_conquest: real_time_gap capped vintage dates at the local
date. ALFRED silently drops a vintage date that is still in the future in
St. Louis, so whenever the run clock is ahead of US Central time (CI
between about 00:00 and 06:00 UTC, or any machine east of the US) and the
newest quarter is less than 45 days old, the lecture fails with
KeyError 'GDPC1_<today>'. Take today's date in America/Chicago instead.

phillips_drifts_volatilities: the nyblom_hansen solution solved a stack of
2x2 systems with a 2-D right-hand side, which NumPy 2 treats as a matrix
rather than a stack of vectors. Use the [..., None] / [..., 0] idiom the
suite already uses elsewhere. Exercise 3's output then matches the text
(critical value 0.731, power 0.10-0.43, size 0.032).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [phillips] Drop figure metadata from plots inside exercise solutions

Twenty solution-block cells across ten lectures carried mystnb figure
captions, which the LaTeX builder renders as a figure environment inside
the solution box and rejects with "Not in outer par mode", failing the
PDF step of the preview build. Nothing cross-references these names, so
the plots now render as plain outputs, as in the same change on #1101.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [phillips] Correct errors found in review

- credible_policies, cpol_ex4 solution: the one-period deviation payoff
  is v^R + G, not v^R + T.
- credible_policies, cpol_ex5 solution: as delta -> 0 both curves return
  to v^N, but the optimal punishment does not become "no harsher than
  Nash reversion". Measured from v^N it still sustains about twice the
  improvement (ratio 1.95 at delta = 0.02, 1.98 at 0.005, from the
  lecture's own solve_aps and nash_reversion_best); a short cell now
  prints the ratio.
- self_confirming, sc_ex3 solution: use the main text's N = 2**14 grid.
  With 2**12 the solution printed largest B(C)/C = 0.21 at delta = 0.97
  where the main text prints 0.311 for the same case; C and nu are
  unchanged.
- escaping_nash: epsilon = 0.0002 is not one of the SW2005 gains (their
  Table 1 stops at 0.001, as en_ex4 lists) and phillips_priors no longer
  uses it; say what it is instead.
- priors: define V* = sigma^2 M^{-1}, the epsilon-free RLS prior that the
  code (V_star) and ppr_ex3 (V = epsilon^2 V*) use.
- lost_conquest: drop "with the Riccati equation solved correctly", which
  refers to an earlier bug the reader never sees.
- two_stories: pin the Baxter-King comparison to 2008-2019. Its window
  currently ends in 2019-09, so the output is unchanged today, but once
  the data run past about 2027 it would take in the 2021-22 surge and
  contradict the sentence describing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [phillips_drifts_volatilities] Match the archive's interest-rate transform

The archived NEWQDATA y3 column is exactly i/(400 - i) for the TB3MS
first-month rate i (max error 2.3e-16 over all 211 quarters), the
quarterly return on a bill bought at a discount of i/400 of face value,
not log(1 + i/400) (max error 2.2e-3) as the text said.

- Part 1: describe the transform correctly, and recover i in the data
  figure as 400 y3/(1 + y3). The 400 expm1(y3) used before overstated
  rates by up to about 0.9 percentage points in the early 1980s. No
  estimate changes.
- Part 2: build the post-2000 extension with the same i/(400 - i), so
  the splice no longer changes definition at 2001Q1 (log1p understated
  the new quarters by up to about 2.5 basis points a quarter) and the
  text's "the transformations are unchanged" is true; plot it the same
  way. Because the effective sample size of tr(Q) is only about 9, this
  small data change moves the printed posterior summaries about as much
  as a new seed or a new quarter of FRED data does (posterior mean of
  tr(Q) 0.433 -> 0.318, 1970s peak of core inflation 16.6 -> 23.6
  percent). Every statement in the text still holds in the new run,
  since the text quotes only features that are stable across seeds.
- Both parts: integrated_autocorrelation_time fell over with an
  IndexError when no lag satisfies Sokal's window condition, which
  happens once the autocorrelation time exceeds about a fifth of the
  chain. Fall back to the last lag instead.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [phillips] Apply Copilot's suggestions and small style fixes

- policy_evaluation: use np.linalg.slogdet in the concentrated log
  likelihood (Copilot).
- prospects_bounded_rationality: "shrank ... by a factor of about fifty",
  with the broken line rejoined (Copilot).
- lost_conquest: pass sort=True to the pd.concat of the FRED series.
  Under pandas 3 the default emits a Pandas4Warning into the rendered
  output; sort=True keeps today's sorted union. It is the only concat in
  lost_conquest, two_stories or policy_evaluation that warns under
  pandas 3.1.
- lost_conquest: IID rather than i.i.d., as elsewhere in the suite.
- Split eight multi-sentence paragraphs (adaptive, drifts_volatilities_2,
  escaping_nash, lost_conquest, misspecified, priors) into one sentence
  per paragraph.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [phillips] Use {cite:t} for in-text citations

With bibtex_reference_style author_year, a bare {cite} renders as a
bracketed parenthetical, so in-text uses read as "[Phelps, 1967]
formulated a control problem" or "chapter 7 of [Sargent, 1999]" (as on
the live site today). Switch the 89 narrative uses across 13 lectures to
{cite:t}, which renders "Phelps [1967] formulated" and "chapter 7 of
Sargent [1999]" (qe-ref-001).

Kept as {cite}: end-of-clause citations and citations that follow an
author's name written out in the prose ("Robert Solow and James Tobin
{cite}`...`"). The parenthesized list of three separate citations in
escaping_nash is now one {cite} with three keys, so it no longer renders
nested brackets.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [quant-econ.bib] Protect proper nouns in titles cited by the Phillips suite

The bibliography style sentence-cases article titles, so capitals not
protected by braces are lowercased on the references page: today it
prints "The post-war U.S. phillips curve" and "Evolving post-world war
II U.S. inflation dynamics". Brace the proper nouns in the eleven titles
cited by the phillips lectures where this happens (Phillips, Great
Inflation, Great Moderation, World War II, French Revolution, American),
and brace the quoted paper titles inside the Sims, Stock and Taylor
comments so they keep their own capitalization.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [phillips] Drop embedded titles that repeat the figure caption

Six main-text figures printed the same text twice: once as a matplotlib
title or suptitle inside the image and again as the mystnb caption below
it (qe-fig-003). Remove the embedded title in two_stories, credible_policies
(two figures), escaping_nash (two) and learning. The one that also named
the book's figures moves that reference into its caption.

Kept on purpose: the two_stories titles that carry the book's figure
numbers ("Figure 1.1: ..."), because the prose refers to the plots by
those numbers, and panel titles in multi-panel figures, which label the
panels rather than repeat the caption.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [phillips] Greek identifiers in code, and the suite's blackboard operators

- lost_conquest: phi_pi, phi_pi_riccati and the phi_0/phi_pi/phi_x/phi_i
  rule columns become φ_π, φ_π_riccati and φ_0/φ_π/φ_x/φ_i, matching the
  ρ, κ, λ_x, β already in the same signatures (qe-code-002).
- policy_evaluation: gamma_of_beta becomes γ_of_β.
- \mathbb E -> \mathbb{E} (lost_conquest), and \operatorname{var}(.) ->
  \mathbb{V}[.] (credibility, drifts_volatilities_2, lost_conquest) and
  \operatorname{Prob} -> \mathbb{P} (escaping_nash, learning), the forms
  the rest of the suite already uses.

Outputs of lost_conquest and policy_evaluation are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* [phillips_lost_conquest] Ask ALFRED for vintages up to yesterday

For some hours after midnight in St. Louis, ALFRED still treats today's
date as in the future and returns its latest vintage under yesterday's
label, so looking up today's column raised a KeyError. The preview for
371f37a failed this way at 00:34 and 00:45 Central time. Capping the
latest vintage at yesterday requests the same data ALFRED is serving,
and the printed outputs are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: thomassargent30 <ts43@nyu.edu>
Co-authored-by: Claude Opus 5.5 <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.

3 participants