phillips_lost_conquest#
Series: lecture-python.myst
File:
lectures/phillips_lost_conquest.mdAudit date: 2026-08-26
Corpus snapshot:
e25fdf2345Categories audited: writing, math, code, figures, references, links, admonitions (JAX out of scope)
Overall score: 7.0 / 10
Priority: HIGH
Score breakdown#
Category |
Score |
One-line note |
|---|---|---|
Writing |
3.5/10 |
|
Math |
6/10 |
|
Code |
7.5/10 |
|
JAX |
out of scope |
JAX rules target |
Figures |
4.5/10 |
|
References |
7.5/10 |
|
Links |
10/10 |
no mechanical violations detected. |
Admonitions |
10/10 |
no mechanical violations detected. |
Issues#
Critical#
None found.
High severity#
[qe-code-001] (reviewer) — Follow PEP8 unless closer to mathematical notation. Count: 5. Lines: 139, 157, 238, 259, 269. Example: the constant-gain RLS loop is written out three times - inside
estimate_beliefs(162-168), again at module level to capture\u03b8_2000(263-272), and a third time insiderecommend(456-460) - so the same six lines have to be kept in step in three places, and only the first is a function with arguments. Assignments are padded to align at 140-142 (gdp = ...,pot = ...,ff = ...), which PEP8 lists under extraneous whitespace. Four one-line docstrings use single quotes rather than triple (157, 239, 380, 453).phelps_rateis declareddef phelps_rate(\u03b8, state, \u03b7=\u03b7)at 238, whose default argument reads the module global of the same name - it works, and the exercise at 461-462 depends on it, but it makes\u03b7the one loss parameter that is settable while\u03b2,\u03c0_star,\u03bb_x,b0,b1andgare all read from globals inside the same function. 259-262 then re-initialises\u03b8andRat module level, duplicating 159-160, and packs two unrelated initialisations onto one line (opt, \u03b8_2000 = [], None). 269 re-readsdata.index[t].yearwhen 264 has already stored it inyr. Two names also clash with the mathematics:Ris the RLS second-moment matrix at 160 and 267 but the LQ control cost at 251, andgis the IS-curve interest sensitivity at 234 but the per-period RLS gain at 163 - and 504-506 prints “measured \u03c1” and names the variable\u03c1_measfor the quantity the display at 354 calls \(\lambda\).[qe-fig-001] — Do not set figure size unless necessary. Count: 5. Lines: 182, 284, 317, 390, 465. Example: figsize=.
[qe-fig-004] — Caption formatting conventions. Count: 5. Lines: 175, 277, 305, 372. Example: caption of 9 words.
[qe-fig-008] — Use lw=2 for line charts. Count: 5. Lines: 183, 188, 286, 319, 320. Example: plot() without lw=.
[qe-math-010 (proposed)] — Blackboard \mathbb{P}, \mathbb{E}, \mathbb{V} with braces. Count: 5. Lines: 221, 346, 347, 354. Example: missing braces:
\mathbb E.[qe-ref-001] — Use correct citation style. Count: 6. Lines: 54, 57, 87, 206, 420. Example:
{cite}in narrative flow: ‘{cite}’.[qe-writing-006] — Capitalize lecture titles properly. Count: 2. Lines: 301, 334. Example: H2 Title Case: ‘Why the Fed was slow: a counterfactual’ (Fed).
Medium severity#
[qe-fig-003] — No matplotlib embedded titles. Count: 2. Lines: 186, 192. Example: .set_title.
[qe-math-009] (reviewer) — Choose simplicity in mathematical notation. Count: 3. Lines: 132, 236, 352. Example: \(X_t\) names two different vectors seventy lines apart: 132 sets \(X_t = (1, \pi_{t-1}, x_t)^\top\), the three-element RLS regressor, and 208 sets \(X_t = (1, \pi_t, x_t, i_{t-1})^\top\), the four-element LQ state - and both are live in the same loop at 263-272, where the code has to call them
X(266) andstate(271) to keep them apart. \(\beta\) likewise carries two values: 236 sets\u03b2 = 0.95as the Fed’s LQ discount factor, and 346 and 379 use \(\beta\) for nature’s New Keynesian discount factor, defaulted to0.99, with nothing said about the change. And \(\kappa\) does double duty at exactly the point where the distinction is the argument: 119-122 makes \(\kappa_t\) the Fed’s perceived slope, 346-352 makes bare \(\kappa\) the structural slope, and 367-399 is entirely about how the two differ - a subscript is carrying the whole weight of the lecture’s main claim, where a separate letter would carry it for free.[qe-writing-002] (reviewer) — Keep writing clear, concise, and valuable. Count: 4. Lines: 44, 417, 490, 198. Example: 417 is a 69-word sentence with three clauses, two
{doc}links, an em-dash aside and a nested quotation - “This is a modern replay of the Conquest’s recurrent dynamics, one level up: the mechanism now works through the perceived slope and persistence of the Phillips curve and the policy-rate instrument, and the misspecification is not about expectations but about the policy endogeneity of the reduced-form Phillips curve that the Fed treats as structural - ignoring the Lucas Critique in just the way the “vindication” story of{doc}`phillips_two_stories`describes” - and it is the paragraph that states what the lecture is finally about. 44 opens the lecture with a 40-word sentence carrying a five-item em-dash list of terms the reader has not met yet (anticipated-utility, drifting-coefficients, constant-gain recursive least squares, self-confirming equilibrium) plus three cross-references. 490 is a 54-word single-sentence exercise instruction with four sequenced steps that would read better as a numbered list, aslc_ex1at 438-442 already does. And 198 is 48 words tracking \(\rho_t\) through four separate time periods in one breath.[qe-writing-003] (reviewer) — Maintain logical flow. Count: 4. Lines: 110, 297, 364, 385. Example: the third of the lecture’s three announced elements is never delivered. 61 says “Three drifting beliefs turn out to rationalize the slow response”, 65 names the third as Real-time output-gap mismeasurement, 104-108 sources it to
{cite}`Orphanides2001`and states the claim (“Through 2020-2023 the real-time gap was persistently below the later-revised measure”), and 110 then defers it: “We use current-vintage data below and return to the real-time distinction in the conclusion.” There is no conclusion - the headings run Overview, The three elements, The Fed’s drifting-coefficients beliefs, The Fed’s Phelps problem, Why the Fed was slow, A self-confirming equilibrium, ### The trap, Exercises - and 428-430, the only closing prose, is about the next lecture. Second,{prf:ref}`lc_prop2`(364-368) is stated as one of two propositions the paper proves, 370 says “Let’s reproduce{prf:ref}`lc_prop1`”, and prop2 is then never reproduced or mentioned again, although the cubic solver at 379-385 is most of what a population-OLS-slope version would need. Third, the numbers in the prose are hard-coded against data downloaded live from FRED: 297 says “correlation about 0.95” one line after 293-294 computes and prints the same correlation, 328 says the counterfactual rate goes “well above 4%”, and 397 says measured persistence “falls from near one toward one-half” - all three can drift out of agreement with the figure on any rebuild after a data revision. Fourth,{prf:ref}`lc_prop1`is explicitly conditioned on being “In the determinacy region” (361), butmeasured_persistence(379-385) filters roots to \(|\lambda| < 1\) and then returns the smallest-modulus one withstable[np.argmin(np.abs(stable))]- it neither checks that exactly one stable root exists nor warns when it does not, so the figure at 390-394 is drawn without the hypothesis the proposition needs being tested.[qe-writing-004] — Avoid unnecessary capitalization in narrative text. Count: 1. Lines: 417. Example: mid-sentence ‘Critique’.
[qe-writing-005] (reviewer) — Use bold for definitions, italic for emphasis. Count: 3. Lines: 198, 200, 409. Example: 198 and 200 bold words that are emphasis, not definitions - “Perceived persistence \(\rho_t\) is near one” and “Perceived slope \(\kappa_t\) trends toward zero” - and both terms were already introduced at 122, so this is emphasis on a re-mention where italic is what the rule asks for. 409 bolds self-confirming equilibrium a second time, having correctly bolded its definition at 338 seventy lines earlier. Separately, the same three elements are set in bold twice in forty lines and in two different shapes: as numbered-list labels at 63-65 (Declining inflation persistence, A flatter Phillips curve, Real-time output-gap mismeasurement) and again as run-in paragraph headings at 84, 90 and 104 (Declining persistence., A flatter Phillips curve., Real-time uncertainty.) - and the second set would be better as
###headings, since they are the structure of the section.[qe-writing-007] (reviewer) — Use visual elements to enhance understanding. Count: 3. Lines: 104, 364, 401. Example: “### The trap” (401-417) describes a closed loop in five paragraphs of prose - aggressive policy generates data in which inflation looks transitory and the curve looks flat, the Fed estimates that, the estimate counsels patience, patience is never tested because the Fed has no reason to experiment - and a four-node cycle diagram would carry it at a glance; this is the section the whole lecture builds to and it is the only substantive section with no figure of its own. Second,
{prf:ref}`lc_prop2`at 364-368 (“Aggressive policy flattens the measured slope”) is the twin of the proposition that does get a figure at 372-394, and the asymmetry is unexplained - the reader sees one comparative static plotted and the other only asserted. Third, the real-time claim at 104-108 is the one empirical statement in the lecture with no chart, in a lecture that already pulls series from FRED in code (136-150): the vintage-versus-revised output gap for 2020-2023 is precisely a two-line plot, and it is the evidence for the third of the three elements.
Low severity#
[qe-fig-005] — Descriptive figure names for cross-referencing. Count: 1. Lines: 451. Example: code-cell figure without mystnb figure metadata.
[qe-fig-006] — Lowercase axis labels. Count: 1. Lines: 392. Example: axis label
Taylor-rule aggressiveness $\phi_\pi$.
Strengths#
The lecture is built as claim, reproduction, counterfactual, mechanism, and each heading says which stage it is: the beliefs are estimated at 112-202, fed into the Fed’s own optimization at 204-299, isolated by freezing them at their year-2000 values at 301-332, and then explained structurally at 334-417 - so the reader always knows whether they are looking at a measurement, a simulation or a theory.
The counterfactual is the right experiment and is constructed so that only one thing changes: \(\theta_{2000}\) is captured inside the very loop that produces the baseline path (269-270), and the figure at 317-325 plots the frozen-belief recommendation, the drifting-belief recommendation and the actual funds rate on one set of axes, with the conclusion stated in three short sentences at 328-332.
The modelling choice most open to challenge is disclosed instead of buried: 153 says the gain is set to zero for 2020-2021 and gives the reason (“the pandemic observations are extreme outliers that would otherwise whipsaw the estimates”), and the code makes it a visible argument,
freeze=(2020, 2021)at 156, applied at 163.Attribution is specific and often in the original words: Yellen quoted directly at 96-98, Bernanke at 100-102,
{cite}`CogleySargentConquest2005`and{cite}`StockWatson2007`for declining persistence at 87-88,{cite}`Orphanides2001`for real-time mismeasurement at 104,{cite}`Kreps1998`for anticipated utility at 57 and 206, and{cite}`McLeayTenreyro2019`for the policy-endogeneity reading at 399.The
{note}at 419-426 states the two caveats a skeptical reader would raise - that the drifting-coefficients model is descriptive (“Kepler stage”) rather than structural, and that a fiscal account of the same policy path exists - rather than leaving the argument looking stronger than it is.The two propositions are proper
{prf:proposition}blocks with labels, 356 tells the reader there are exactly two, and both are cross-referenced later by{prf:ref}(370, 488, 511) rather than by name or number.Both exercises extend the lecture instead of rehearsing it:
lc_ex1varies the one parameter the paper singles out as “one of the most important” (438) and its solution reads the trade-off off the figure correctly (477-479);lc_ex2joins the two halves by feeding the measured persistence \(\lambda(\phi_\pi)\) from the New Keynesian section back into the Fed’s Phelps problem (490, 501-508), and 511-513 states the resulting thesis in two sentences.Four of the five figures carry
mystnbcaption and name metadata (175-180, 277-282, 305-310, 372-377), every cross-lecture pointer is a{doc}link (44, 59, 124, 206, 338, 409, 413, 417, 430) rather than a URL, andqe-link-001,qe-link-002,qe-code-003and all five admonition rules measure zero.
Recommended actions#
Write the conclusion that 110 promises, or move the real-time discussion into the body with a chart: the third of the three elements set out at 61-65 is sourced, stated and then dropped, which leaves the lecture delivering two of the three things its own overview says it will.
Separate the three colliding symbols: give the LQ state at 208 a different letter from the RLS regressor at 132, give nature’s discount factor at 346 and 379 a different letter from the Fed’s \(\beta\) at 236 (they also hold different values, 0.99 and 0.95), and give the structural slope at 352 a letter of its own rather than distinguishing it from the perceived slope by a subscript.
Replace the three hard-coded numbers describing live FRED data with values printed from the data itself: “correlation about 0.95” at 297 (already computed at 293-294), “well above 4%” at 328, and “from near one toward one-half” at 397.
Reproduce
{prf:ref}`lc_prop2`alongside{prf:ref}`lc_prop1`- the population OLS slope as a function of \(\phi_\pi\) - or say in the text why only one of the two comparative statics is plotted; and add a determinacy check tomeasured_persistence(379-385) so the figure is drawn only where 361’s hypothesis holds.Factor the constant-gain RLS recursion into one function and call it three times: 162-168, 263-272 and 456-460 are the same six lines, and only the first takes its inputs as arguments.
Split the 69-word sentence at 417 and the 40-word opening at 44, and turn the four-step instruction at 490 into a numbered list like the one at 438-442.
Add a cycle diagram for “### The trap” (401-417); switch the emphasis at 198 and 200 to italic, drop the second bolding of self-confirming equilibrium at 409, and promote the run-in bold headings at 84, 90 and 104 to
###.Sweep the mechanical items: the two Title-Case H2s (301, 334), the five long figure captions (175, 277, 305, 372), the five
figsizeoverrides, the two embedded titles at 186 and 192 (they duplicate the caption at 179) plus the one at 472,lw=2at 183, 188, 286, 319 and 320, the lower-case axis label at 392,mystnbmetadata for the solution figure at 451, the five\mathbb Esites needing braces (221, 346, 347, 354), and the six{cite}sites that want{cite:t}(54, 57, 87, 206, 420).