cons_news#

  • Series: lecture-dp

  • File: lectures/cons_news.md

  • Audit date: 2026-08-26

  • Corpus snapshot: c30490a2f4

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

  • Overall score: 6.6 / 10

  • Priority: HIGH

Score breakdown#

Category

Score

One-line note

Writing

3/10

qe-writing-005 ×23; qe-writing-004 ×8; qe-writing-002 ×5, +4 more.

Math

4.5/10

qe-math-003 ×17; qe-math-010 (proposed) ×4.

Code

8.5/10

qe-code-001 ×2.

JAX

out of scope

JAX rules target lecture-jax.

Figures

6/10

qe-fig-003 ×4; qe-fig-005 ×4; qe-fig-008 ×11.

References

10/10

no mechanical violations detected.

Links

7.5/10

qe-link-002 ×7.

Admonitions

N/A

no admonitions, exercises or solutions.

Issues#

Critical#

None found.

High severity#

  • [qe-fig-008] — Use lw=2 for line charts. Count: 11. Lines: 748, 749, 768, 769, 770, 798, 799, 800, 807, 808, …. Example: plot() without lw=.

  • [qe-link-002] — Use doc links for cross-series references. Count: 7. Lines: 36, 56, 86, 412, 486, 498, 501. Example: raw link to python-intro.quantecon.org.

  • [qe-math-003] — Use square brackets for matrix notation. Count: 17. Lines: 549, 553, 557, 561, 565, 566, 576, 580, 584, 588, …. Example: array used as matrix.

  • [qe-math-010 (proposed)] — Blackboard \mathbb{P}, \mathbb{E}, \mathbb{V} with braces. Count: 4. Lines: 234, 380, 383, 405. Example: bare expectation E [.

  • [qe-writing-002] (reviewer) — Keep writing clear, concise, and valuable. Count: 5. Lines: 93, 227, 439, 441, 525. Example: lines 93-97 are a single 52-word bullet holding four nested clauses (a tax cut, a foreseen permanent tax rise, interest payments, bonds issued to finance the cut); lines 441-447 are one 68-word sentence carrying the whole better-informed-consumer result. Line 227 reads ‘we can also use the the Kalman filter’; line 439 runs two words together - ‘exactly the same histories of nonfinancial incomethe two consumers behave differently’ - and is also missing a comma; line 525 says ‘We formulae the problem’ for ‘formulate’. Two more of the same kind sit at 361 (‘reprentation’) and 486 (‘in thid [quantecon lecture]’).

  • [qe-writing-004] — Avoid unnecessary capitalization in narrative text. Count: 8. Lines: 485, 486, 680, 711. Example: mid-sentence ‘Difference’.

  • [qe-writing-005] (reviewer) — Use bold for definitions, italic for emphasis. Count: 23. Lines: 42, 62, 63, 80, 140, 275, 285, 292, 313, 316, …. Example: bold is the lecture’s emphasis marker throughout, which leaves it unable to signal definitions. Single words stressed in bold: regardless (42), today’s (62), future (63, 80), same (140, 275, 497), past (285), not fundamental (292), increases (313), all (316), decreases all (320), increase (351), exactly (383), saving (443, 452), permanent (451), decreases (760), permanently (777), single (816), evaluate / simulate (842), identical / different (847-848). All of these want italic. Lines 415 and 425 use bold as a pseudo-heading (‘for a consumer having the information assumed in the news representation’). The file does use bold correctly for real definitions - discount factor (39), covariance generating function (196), innovations representation (158), backcasting (376) - so the reader has no way to tell the two uses apart.

  • [qe-writing-008] — Remove excessive whitespace between words. Count: 52. Lines: 40, 45, 49, 58, 62, 65, 66, 67, 82, 87, …. Example: 3 spaces.

Medium severity#

  • [qe-code-001] (reviewer) — Follow PEP8 unless closer to mathematical notation. Count: 2. Lines: 618, 731. Example: line 618 writes [0, 0, 1e-12]]) # put penalty on debt and line 731 writes J = 5 # Number of coefficients that we want - both inline comments need two spaces before the # (pycodestyle E261). The multi-space alignment inside the matrix literals at 655 and 624-626 is a different case and should stay: it lines the matrix columns up, which is the ‘closer to mathematical notation’ latitude the rule allows.

  • [qe-fig-003] — No matplotlib embedded titles. Count: 4. Lines: 747, 767, 801, 810. Example: plt.title.

  • [qe-fig-005] — Descriptive figure names for cross-referencing. Count: 4. Lines: 746, 766, 796, 805. Example: code-cell figure without mystnb figure metadata.

  • [qe-writing-003] (reviewer) — Maintain logical flow. Count: 2. Lines: 820, 869. Example: the last three sections describe computations the lecture never performs. Section ‘Simulating income process and two associated shock processes’ (814-848) lays out a precise four-step procedure - draw \(\{\epsilon_t\}\) with \(y_0 = 100\), build \(\{a_t\}\) from the given formula, discard the first \(S\) observations, then ‘evaluate and simulate the decision rules for \(c_t, b_t\) that Python has computed for us above’ - and no code follows: the file’s last code cell ends at line 812. Section ‘Calculating innovations in another way’ (850-870) then says ‘Here we use formula {eq}`eqn_3` above to compute \(a_{t+1}\)’ and closes with ‘We can verify that we recover the same \(\{a_t\}\) sequence computed earlier’ (869-870) - but nothing is computed and nothing is verified. A reader following the lecture reaches the experiment it was built to run and finds it missing.

  • [qe-writing-009 (proposed)] — Write “IID” — not “i.i.d.” or “iid”. Count: 4. Lines: 127, 146, 149, 481. Example: i.i.d…

Low severity#

  • [qe-writing-007] (reviewer) — Use visual elements to enhance understanding. Count: 1. Lines: 309. Example: the pivot of the lecture is a sign flip in one impulse response - under representation {eq}`eqn_1` the sequence is \(1, 1-\beta^{-1}, 1-\beta^{-1}, \ldots\) with \(1 - \beta^{-1} < 0\) (309-321), and under {eq}`eqn_2` it is \(1, 1-\beta, 1-\beta, \ldots\) with \(1 - \beta > 0\) (346-352). That contrast is carried entirely by prose across 40 lines. The two figures the lecture does draw (747-751, 767-772) are the responses of \(c\) and \(b\), not of \(y\), so the reader never sees the one picture - two step responses of nonfinancial income, one settling below the axis and one above - that would make the rest of the argument obvious.

Strengths#

  • The paper-and-pencil results are put to the test rather than left as claims: the decision rules derived by hand at 418-433 are re-derived by the LQ solver at 631-637 and 660-665, printed as -F1 and -F2, and the text at 784-785 closes the loop - ‘The preceding computations confirm what we had derived earlier using paper and pencil’.

  • The variance of the innovation is established twice by independent routes - through the covariance generating function at 195-215, and directly from {eq}`eqn_3` at 217-222 - and line 217 says exactly who the second derivation is for: ‘if you are uncomfortable with covariance generating functions’.

  • The abstract impulse response is turned into a five-step fiscal story at 323-336 (transfer received, one-period bond issued, bond rolled over forever, lump-sum tax levied at exactly the interest) - which is what makes the Ricardian-equivalence reading at 455-456 something the reader can see rather than take on trust.

  • The matrix blocks in the transition displays at 553-597 are labelled in place with \underset{\equiv A_{1}}{\underbrace{\ldots}}, and those labels are exactly the names the code uses (ALQ1, BLQ1, CLQ1 at 624-628; ALQ2, BLQ2, CLQ2 at 654-658), so the reader can match every matrix in the algebra to a line of Python.

  • The five labelled equations (eqn_1, eqn_2, eqn_3, eqstsp1, eqstsp2) are referenced by {eq} more than twenty times across the file, and the two representations are always named by reference rather than by ‘the first equation above’ - no orphan labels and no manual equation numbers anywhere.

  • Cross-series links to the advanced series use the correct intersphinx {doc} form with descriptive text at 88, 99, 195, 265 and 874 ({doc}this lecture advanced:classical_filtering``), which shows the raw-URL links elsewhere in the file are an inconsistency to be cleaned up rather than an unfamiliar idiom.