phillips_two_stories#

  • Series: lecture-python.myst

  • File: lectures/phillips_two_stories.md

  • Audit date: 2026-08-26

  • Corpus snapshot: e25fdf2345

  • Categories audited: writing, math, code, figures, references, links, admonitions (JAX out of scope)

  • Overall score: 7.7 / 10

  • Priority: HIGH

Score breakdown#

Category

Score

One-line note

Writing

3/10

qe-writing-002 ×13; qe-writing-006 ×2; qe-writing-004 ×9, +3 more.

Math

10/10

no mechanical violations detected.

Code

8.5/10

qe-code-001 ×3.

JAX

out of scope

JAX rules target lecture-jax.

Figures

5/10

qe-fig-003 ×8; qe-fig-004 ×6; qe-fig-001 ×7.

References

7.5/10

qe-ref-001 ×5.

Links

10/10

no mechanical violations detected.

Admonitions

10/10

no mechanical violations detected.

Issues#

Critical#

None found.

High severity#

  • [qe-fig-001] — Do not set figure size unless necessary. Count: 7. Lines: 162, 203, 232, 260, 498, 536, 575. Example: figsize=.

  • [qe-fig-003] — No matplotlib embedded titles. Count: 8. Lines: 167, 210, 239, 266, 272, 511, 542, 581. Example: .set_title.

  • [qe-fig-004] — Caption formatting conventions. Count: 6. Lines: 155, 196, 225, 251, 491. Example: caption of 7 words.

  • [qe-ref-001] — Use correct citation style. Count: 5. Lines: 301, 402, 418, 430, 463. Example: {cite} in author position: ‘{cite}`SamuelsonSolow1960` found’.

  • [qe-writing-002] (reviewer) — Keep writing clear, concise, and valuable. Count: 13. Lines: 295, 327, 329, 370, 400, 416, 432, 448, 452, 454, …. Example: thirteen sentences run to 40 words or more and six of them to 49 or more, in a lecture that is otherwise disciplined about one sentence per paragraph (qe-writing-001 measures zero). The worst are the ones carrying the argument: 416 is 57 words with three semicolon-separated clauses and a parenthetical em-dash aside (“They carry no free parameters governing expectations; period by period they impose the same cross-equation restrictions as a rational expectations model; and - because a self-confirming equilibrium is the attractor of their mean dynamics - under tranquil conditions they converge back to it, and hence, on the equilibrium path, to rational expectations, satisfying a desideratum of {cite}`Kreps1998`”); 370 is 55 words and is the lecture’s answer to the objection it raised at 333; 623 is 55 words and asks the lecture’s closing question; 489 is 55 words listing “three chapters the book could not see”; 609 is 52 words with two quoted phrases and four date ranges. Then 452 (49), 454 (46), 295 (45), 432 (44), 448 (44), 400 (42), 327 (41) and 329 (41). Several would split cleanly at their existing semicolons or em-dashes, which is what the rule asks for.

  • [qe-writing-003] (reviewer) — Maintain logical flow. Count: 5. Lines: 98, 167, 396, 469, 128. Example: this lecture is where the ten-lecture Phillips suite establishes its conventions, and three of them do not survive contact with the last lecture in the suite. (1) The notation table at 84-98 promises to “record the translations” for the whole suite, and its discount factor | $\beta$ | phillips_lost_conquest, phillips_drifts_volatilities row is wrong: phillips_drifts_volatilities contains no discount factor at all (zero occurrences of the word “discount”), and \(\beta\) there is the vector of free elements of the triangular factor \(B\) (phillips_drifts_volatilities.md:293-303, 510) and the coefficients \(\beta_0,\dots,\beta_3\) of the Taylor rule (phillips_drifts_volatilities.md:1916-1919) - so a reader carrying the table forward reads \(\beta_1\) in that lecture’s policy rule as a discount factor. The government's beliefs | $\theta$ row points at the same lecture, where \(\theta_t\) is an econometrician’s posterior over VAR coefficients, a distinction that lecture makes itself at its lines 213-216. And 111-114 says \(\lambda\) “works four shifts” and lists them, missing the two in the suite’s own last lecture (\(\lambda=(Q,H^T,\beta,\sigma)\) at phillips_drifts_volatilities.md:878 and \(\max(\lambda)\) for an eigenvalue of \(Q\) at its 1309-1316). (2) Figures are cross-referenced by the book’s numbers, hard-coded inside set_title strings - ‘Figure 1.1:’ at 167, ‘Figure 1.2:’ at 210, ‘Figure 1.3:’ at 239, ‘Figure 1.4:’ at 266, ‘Figure 1.5:’ at 272 - and eight prose sentences depend on those strings (194, 249 twice, 280, 487, 523, 637, 638), even though every cell already carries a mystnb name: (fig-ts-inflation, fig-ts-raw-series, fig-ts-bandpass, fig-ts-scatter-6082) and the lecture never uses {numref} once. Worse, “Figure 1.4” and “Figure 1.5” are the two panels of a single MyST figure (251-276), so the book’s numbering cannot be reproduced by {numref} without splitting that cell. (3) 469 says “Let’s extend the sample to the latest available month” and the code immediately pins it instead: end_recent = datetime.datetime(2026, 7, 1) at 472, with ‘1948-2026’ and ‘1990-2026’ typed into two figure titles (512, 542) and ‘2008-2026’ into an era label (573). Also, the {note} at 127-137 says the figures “reproduce the ones in chapters 1 and 2”, but the chapter-2 material (331-378) has no figure at all; and the roadmap is given three times - as a nine-item list at 62-73, again as prose at 396-436, and a third time at 623-625.

  • [qe-writing-004] — Avoid unnecessary capitalization in narrative text. Count: 9. Lines: 42, 60, 333, 335, 355, 366, 378, 406, 432. Example: mid-sentence ‘Inflation’.

  • [qe-writing-006] — Capitalize lecture titles properly. Count: 2. Lines: 331, 337. Example: H2 Title Case: ‘Ignoring the Lucas Critique’ (Critique).

Medium severity#

  • [qe-code-001] (reviewer) — Follow PEP8 unless closer to mathematical notation. Count: 3. Lines: 187, 475, 537. Example: three lines exceed 79 characters - 187 at 85, 537 at 83 and 475 at 80 - and 187 could lose the trailing # white men 20+ comment, which the prose at 182 already says. flake8 over every code cell with --select=E1,E2,E5,E7,W2,W3,W6 --max-line-length=79 reports nothing else: spacing, naming and operator style are clean throughout, and single-letter names (u 187, bk 221) track the economics.

  • [qe-writing-005] (reviewer) — Use bold for definitions, italic for emphasis. Count: 4. Lines: 56, 289, 335, 599. Example: there are 59 italicised spans in roughly 250 lines of prose, which is past the point where italics mark anything; whole clauses are set in italic (and precisely those missing parameters would be needed-style asides at 370, 416, 424) alongside single words (temporary 309, fixed 341, unstable 557). Against that, bold is used sparingly and correctly for four definitions - Phillips loops (280), drifting coefficients (335), self-confirming equilibrium (366), induction hypothesis (428) - but the same concept is italicised elsewhere: drifting beliefs at 289 and 593 for what 335 bolds, and escape routes at 327 for what the suite treats as a defined term. Bold also does duty as a heading in three different shapes within one lecture: list labels at 56-57 (The triumph of natural-rate theory., The vindication of econometric policy evaluation.), which are then repeated verbatim as real ### headings at 297 and 315, and run-in paragraph labels at 599 and 606 (For the triumph of natural-rate theory.).

  • [qe-writing-007] (reviewer) — Use visual elements to enhance understanding. Count: 3. Lines: 280, 293, 420. Example: 280 states the finding the section exists for - “Figure 1.5 reveals Phillips loops: inflation and unemployment trace out counter-clockwise loops rather than a single stable curve” - but the figure it points at (251-276) is drawn as an undirected point cloud, ax.scatter(..., s=8, alpha=0.6), with no time ordering at all: a loop is a statement about the order of the points, and a scatter cannot show it. Colouring by date, or connecting the monthly points with a thin line, would make the counter-clockwise motion visible and costs one keyword. Second, “Two interpretations” (293-329) is the lecture’s core and carries no visual: each story is a causal chain the prose walks through in order (Samuelson-Solow, exploitable curve, policy raises inflation, adverse shift, natural-rate theory, low inflation - against re-estimate, read mechanically, led to lower inflation), and the two chains side by side are exactly the two-column figure this lecture needs; the notation table at 84-98 shows the author already reaches for tabular layout when it helps. Third, the escape mechanism at 420-424 and the reservation at 448 - mean dynamics pointing toward a self-confirming equilibrium, then away from it once beliefs approach the induction hypothesis - is a phase diagram described in words in a lecture with no equations to fall back on.

Low severity#

None found.

Strengths#

  • The notation table at 84-98 is the most useful thing in the lecture and does not exist in most lecture suites: it maps six objects onto the symbols each source uses, and 100-114 then names the three collisions (\(x\) changing sides between the public and the government, \(\theta\) moving from a scalar slope to a whole belief vector, \(\lambda\) working four shifts) with the reason for keeping them - 81-82, staying faithful to the papers a reader may want to consult.

  • The three {note} admonitions each carry a caveat the argument would be weaker without: 127-137 says the reproduced figures use late-1990s data and points forward to the section that updates them, 282-291 explains why a single demographic unemployment series is used and where the unit root in the essay actually comes from, and 611-621 states the assumption the whole book rests on (stable fundamentals) and names the 2021-2022 episode as the case that violates it.

  • The data work follows the book’s recipe explicitly rather than approximately, and says so at each step: the single demographic series with its FRED code (182, 187), the Baxter-King band of 24 to 84 months with a truncation of 84 (215-221) attributed to {cite}`BaxterKing1999`, and the 13-month centered moving average (143, 152) - so every figure can be checked against chapter 1.

  • The post-1999 section (460-625) is organised as a one-for-one extension of the book’s figures and then, at 595-609, splits the new evidence between the two stories instead of declaring a winner - the Great Moderation and the fast 2021-2022 disinflation for triumph, the falsified ‘transitory’ model and the flat 2010s curve for vindication.

  • ‘The reservation’ (438-458) states the case against the reading the lecture has just made attractive: 444 distinguishes positive from normative, 446-448 points out that the same mean dynamics that permit a stabilization guarantee it is temporary, and 452 gives the commitment-mechanism objection with its citations - then 454-456 closes on a hope rather than a verdict.

  • The exercise (629-643) turns the lecture’s one qualitative claim - 278, that filtering sharpens the apparent Phillips curve - into a two-line computation on data the lecture already has in memory (data, bk, sub), and the solution at 657-659 explains why the raw correlation is near zero rather than just reporting it.

  • Every figure cell carries mystnb caption and name metadata (155-160, 196-201, 225-230, 251-256, 491-496, 527-532, 561-566) - qe-fig-005 measures zero - and every cross-lecture pointer in the lecture is a {doc} link (64-73, 363, 366, 378, 398, 402, 410-412, 625) rather than a URL.