phillips_two_stories#
Series: lecture-python.myst
File:
lectures/phillips_two_stories.mdAudit date: 2026-08-26
Corpus snapshot:
e25fdf2345Categories 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 |
|
Math |
10/10 |
no mechanical violations detected. |
Code |
8.5/10 |
|
JAX |
out of scope |
JAX rules target |
Figures |
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-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_volatilitiesrow is wrong:phillips_drifts_volatilitiescontains 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. Thegovernment'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 insideset_titlestrings - ‘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 amystnbname:(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=79reports nothing else: spacing, naming and operator style are clean throughout, and single-letter names (u187,bk221) 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
mystnbcaption 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.
Recommended actions#
Convert the figure references before deleting the embedded titles: the eight prose pointers at 194, 249 (twice), 280, 487, 523, 637 and 638 name ‘Figure 1.1’ to ‘Figure 1.5’, and those numbers exist only inside the
set_titlestrings at 167, 210, 239, 266 and 272 that qe-fig-003 asks to be removed. Point them at themystnblabels with{numref}instead - and split the two-panel cell at 251-276, since ‘Figure 1.4’ and ‘Figure 1.5’ are two panels of one MyST figure and cannot both be numbered.Fix the notation table’s two wrong rows (84-98) before the suite is read in order:
phillips_drifts_volatilitieshas no discount factor, and its \(\beta\) is the triangular-factor parameter vector and the Taylor-rule coefficients; its \(\theta\) is an econometrician’s posterior, not a government’s belief. Add the two extra meanings of \(\lambda\) in that lecture to the list at 111-114.Make 469 true or change it: it promises ‘the latest available month’ and 472 pins
datetime.datetime(2026, 7, 1). Derive the endpoint from the downloaded series and print it, then remove ‘1948-2026’ (512), ‘1990-2026’ (542) and ‘2008-2026’ (573), and stop hard-coding the four annotation positions at 503-506.Do NOT lower-case the eleven flagged capitalisations: eight of the nine qe-writing-004 hits are ‘Critique’ in ‘the Lucas Critique’ or its shorthand (60, 333, 335, 355, 366, 378, 406, 432), the ninth is the italic book title The Conquest of American Inflation (42), and both qe-writing-006 hits are the same proper name in a heading (331, 337). Of the four qe-ref-001 hits, three are real and want
{cite:t}(402 ‘the recursive methods of’, 430 ‘the adaptive expectations hypothesis of’, 463 sentence-initial) - but 301 is a false positive: ‘Paul Samuelson and Robert Solow{cite}`SamuelsonSolow1960`found’ already names the authors in the prose, so the parenthetical form is correct there.Show the Phillips loops the lecture claims at 280: order or colour the points in the scatter at 251-276 by date, or connect them, so the counter-clockwise motion is visible rather than asserted.
Split the six sentences of 49 words or more (370, 416, 452, 489, 609, 623) at the semicolons and em-dashes they already contain, then the seven of 40-48 (295, 327, 329, 400, 432, 448, 454).
Thin the italics - 59 spans is enough that none of them signals anything - and settle on one shape for the two stories’ labels: they are bold list items at 56-57, real
###headings at 297 and 315, and bold run-in paragraph labels again at 599 and 606. Italicised drifting beliefs (289, 593) should match bolded drifting coefficients (335).Sweep the mechanical items: the seven
figsizeoverrides (162, 203, 232, 260, 498, 536, 575), the six over-long captions (155, 196, 225, 251, 491), the eightset_titlecalls once their numbers have been rehomed (167, 210, 239, 266, 272, 511, 542, 581), the three lines over 79 characters (187, 475, 537), and thefontsize=10andfontsize=9overrides at 581 and 507.