hs_recursive_models#

  • Series: lecture-python-advanced.myst

  • File: lectures/hs_recursive_models.md

  • Audit date: 2026-08-26

  • Corpus snapshot: b83d6da399

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

  • Overall score: 5.6 / 10

  • Priority: HIGH

Score breakdown#

Category

Score

One-line note

Writing

3/10

qe-writing-004 ×28; qe-writing-001 ×15; qe-writing-005 ×26, +4 more.

Math

3/10

qe-math-010 (proposed) ×76; qe-math-002 ×154; qe-math-011 (proposed) ×3, +1 more.

Code

N/A

no executable code cells.

JAX

out of scope

JAX rules target lecture-jax.

Figures

N/A

no figures or plotting code.

References

8.5/10

qe-ref-001 ×2.

Links

8/10

qe-link-002 ×2.

Admonitions

N/A

no admonitions, exercises or solutions.

Issues#

Critical#

None found.

High severity#

  • [qe-math-002] — Use \top for transpose notation. Count: 154. Lines: 220, 244, 271, 309, 310, 317, 318, 331, 335, 351, …. Example: \prime transpose.

  • [qe-math-010 (proposed)] — Blackboard \mathbb{P}, \mathbb{E}, \mathbb{V} with braces. Count: 76. Lines: 217, 220, 259, 265, 271, 296, 299, 304, 309, 351, …. Example: bare expectation E(.

  • [qe-writing-001] — Use one sentence per paragraph. Count: 15. Lines: 324, 358, 365, 963, 1734, 1759, 1879, 1937, 1944, 1956, …. Example: 2 sentences in one paragraph.

  • [qe-writing-003] (reviewer) — Maintain logical flow. Count: 6. Lines: 430, 788, 1495, 1702, 1743, 2408. Example: the same objects are restated many times over 2400 lines and the restatements have drifted apart. The household objective is written six times; 525, 802, 1197, 2208, 2301 and 2344 all carry the leading minus sign, but 430 and 788-789 drop it, so as printed the household maximises a quadratic loss, and 2425-2430 likewise asks the reader to “maximize the criterion” \(\sum \beta^t[\lambda(s_{1t}-b_{1t})\cdot(s_{1t}-b_{1t}) + \ldots]\) with no minus. Five further symbols are stale: 1702 calls \(\mu_0^2\) “the marginal utility of individual wealth” one clause before naming the same object \(\mu_0^w\); 1495 keeps the time subscript in \(K = A^o \Sigma_t G^\prime(G\Sigma G^\prime + R)^{-1}\) inside the limiting time-invariant representation, where every other \(\Sigma\) in the display has lost it; 1743 sums the denominator of \(\mu^w_t\) over \(t\) while its numerator sums over \(j\); 2387 writes \(\mu_{02}\Pi_2\Pi_2^{-1\prime}\) and 2408 writes \(\mu_{01}\Pi_1^{-1}\Pi_2^{-1\prime}\), where 2395-2400 pairs each \(\Pi_i^{-1}\) with its own transpose; and 2437 writes \(s_{jt} = \Delta_j h_{jt-1} + \Pi_j c_{jt}\) where 2307 has \(\Lambda_i\). A reader checking the mongrel-aggregation punchline at 2404-2410 against the derivation it follows cannot make them agree.

  • [qe-writing-004] — Avoid unnecessary capitalization in narrative text. Count: 28. Lines: 91, 598, 710, 901, 959, 1187, 1419, 1436, 1465, 1474, …. Example: mid-sentence ‘State’.

  • [qe-writing-005] (reviewer) — Use bold for definitions, italic for emphasis. Count: 26. Lines: 553, 758, 1419, 2149, 2340, 2412. Example: bold is used as a substitute for headings, for admonitions and for emphasis, and only occasionally for definitions. 26 lines consist of nothing but a bold span acting as a heading - the six preference examples (553, 560, 583, 598, 624, 665, 710), the four-part framework summary (758, 767, 776, 785), the econometrics labels (1419, 1436, 1457, 1474, 1489), and the permanent-income and mongrel-aggregation labels (2121, 2149, 2171, 2190, 2260, 2320, 2340, 2352, 2412) - and two of them carry a stray full stop after the closing asterisks (**Adjustment Costs**. 665, **Kalman Filter:**. 1457). Separately, structured claims are bolded where a directive belongs: **Definition:** (1270, 1620, 2039), **Assumption:** (401, 419, 541), **Key Insight:** (1563, 2377), **Key Property:** (1572), **Key invertibility property:** (1627), **Remark:** (2070), **Punchline:** (2254, 2404), **Secret Weapon:** (2454), **Verification:** (1317), **Step 1:**/**Step 2:** (1283, 1288). And bold is used for plain emphasis at 70 (**no frictions**), 84, 86-87, 213 (**and**), 959 (**let**), 1285-1286 (**quantities**, **are**) and 2458 (**are all alike**, **gives the same name to different things**), where the rule asks for italic - the lecture uses italic nowhere.

  • [qe-writing-008] — Remove excessive whitespace between words. Count: 50. Lines: 40, 43, 57, 77, 82, 91, 96, 116, 118, 123, …. Example: 2 spaces.

Medium severity#

  • [qe-link-002] — Use doc links for cross-series references. Count: 2. Lines: 91. Example: raw link to python-intro.quantecon.org.

  • [qe-math-009] (reviewer) — Choose simplicity in mathematical notation. Count: 4. Lines: 850, 1137, 1624, 2185. Example: the calligraphic multipliers are spelled three ways, sometimes inside a single line: 850 opens the Lagrangian with {\mathcal L} and 852-856 writes its multipliers {\cal M}; 1137 has {\mathcal M}_t^k and {\cal M}_t^h in the same equation; 2185 has {\mathcal M}_t^c = (\Phi_c)^\prime {\mathcal M}_t^d = \phi_c {\cal M}_t^e. Across the file {\cal appears on 42 lines and \mathcal on 14. The decoration also collides with the plain letters the lecture chooses for the very same quantities - 1137-1161 defines \(M_k, M_h, M_s, M_d, M_c, M_i\) as the matrices for which \({\cal M}_t^k = M_k x_t\), so a reader has two symbols one macro apart for a multiplier and its gradient matrix. Finally \(\color{blue}{\Pi}\) and \(\color{blue}{(\Delta_h - \Theta_h\Pi^{-1}\Lambda)}\) at 1624-1625 are the only coloured symbols in the lecture; the colour carries no information the surrounding definition does not already give.

  • [qe-math-011 (proposed)] — Distribution names in plain letters, not \mathcal / \mathbb. Count: 3. Lines: 233, 244, 1433. Example: decorated distribution {\mathcal N}.

  • [qe-ref-001] — Use correct citation style. Count: 2. Lines: 94, 158. Example: {cite} in narrative flow: ‘{cite}’.

  • [qe-writing-002] (reviewer) — Keep writing clear, concise, and valuable. Count: 4. Lines: 89, 2044, 2086, 2451. Example: 89-91 is a 58-word single sentence that names five model ingredients, two solution technologies and two other lectures before it ends; 2044-2046 mismatches its verbs - “We sweep the time-to-build structure and the demand for engineers into the household technology and putting the supply of new engineers into the technology for producing goods”; 2084-2087 runs two items of a four-item enumeration together with no break, “…and \(\epsilon_{1t}\) is a vector of demand shifters second, time-to-train specifications for skilled and unskilled labor, respectively:”; and 2451-2455 leaves a sentence unfinished, “please see {cite}`HS2013` where they deploy a”, with the object arriving only after a paragraph break as the bold label **Secret Weapon:** Another application of the spectral factorization identity. 1332 is a smaller instance of the same inattention: “To compute \(ao\) we proceed as follows”, for \(a_0\).

  • [qe-writing-007] (reviewer) — Use visual elements to enhance understanding. Count: 3. Lines: 1419, 1762, 2048. Example: 2469 lines, no figure, no diagram and no admonition, in a lecture whose whole purpose is to show that superficially different models share one architecture. Three places ask for a picture and get none: the “tale of two state-space representations” (1415-1455) compares an original and an innovations representation on shock count (\(n_w + n_y\) versus \(n_y\)) and spanned space (\(H(y^t) \subset H(w^t,v^t)\), \(H(y^t) = H(a^t)\)) - two boxes and two arrows would carry it; the time-to-build household technology at 2048-2057 is a \((k+1)\times(k+1)\) shift matrix whose only content is that a student entering at \(t\) becomes an engineer at \(t+k\), which is a chain diagram; and the three-agent competitive equilibrium built at 1189-1264 (household, type I firm, type II firm) is never drawn, so which agent faces which of \(p^0_t, w^0_t, \alpha^0_t, q^0_t, r^0_t, v_0\) has to be reassembled from six separate subsections. The enumeration at 1762-1777 also loses its layout: “the time \(t\) vector of demands for \(c_t\) is influenced by:” is followed by four bare paragraphs that are plainly list items but carry no markers, so the colon dangles and the four influences read as continuous prose.

Low severity#

None found.

Strengths#

  • The lecture is framed by a quotation and then earns it: the Poincare and Lucas epigraphs at 26-36 are picked up at 111-112 (“the diversity of these models conceals an essential unity”), and the closing epigraph at 2466-2467 supplies the second half of the Lucas sentence - “but each incomplete market economy is incomplete in its own individual way” - which is exactly what motivates the closing question at 2461.

  • The claim that many familiar models are one model is discharged six times in a row rather than asserted: time-separable preferences (553), consumer durables (560), habit persistence (583), seasonal habit persistence (624), adjustment costs (665) and multiple consumption goods (710) are each followed by the explicit setting of \((\Lambda, \Pi, \Delta_h, \Theta_h)\) that implements them (581, 622, 703-707, 713-714), so the reader sees the translation performed, not described.

  • The two solution routes are reconciled instead of being left as alternatives: 839-842 announces the Lagrangian and the dynamic-programming approach, 924-950 gives the shadow prices as discounted sums of multipliers, and 1131-1161 closes the loop by showing those multipliers are gradients of the planner’s value function (\(M_k = 2\beta[0\ I\ 0]PA^o\)) - which is precisely what makes the equilibrium price formulas at 1290-1315 computable from the Riccati solution.

  • The framework is collected in one place before it is used: the four-block summary at 756-790 restates information and shocks, production technology, household technology and preferences as exactly the matrices the DLE class takes as arguments, so the reader can see the whole input list on one screen after 700 lines of construction.

  • The econometrics section states its own plot in one line - “It is really just a tale of two state-space representations” (1415) - and then delivers it: the two representations (1419-1445), the shock-count and spanned-space comparison (1448-1455), the Kalman recursions that map one into the other (1457-1506), the spectral factorization identity that equates their covariance generating functions (1540-1561), and the Wold and VAR representations that follow (1589-1604).

  • Invertibility is given operational content rather than being invoked: the canonical household technology is defined by two checkable conditions (1620-1625), the inverse technology is written out (1635-1641), the eigenvalue restriction is explained as what keeps \(\{h_t\}\) in \(L_0^2\) (1643-1646), and 1779-1797 shows how to obtain a canonical representation from one that is not.

  • Each of the seven follow-on lectures listed at 47-53 is revisited at 1801-1811 after the general theory, and the intervening example sections (1861 equilibrium investment, 1892 Rosen-Topel housing, 1935 cattle cycles, 2005 market for engineers, 2130 permanent income) each say which matrices of the general framework they are setting, so the suite reads as instances rather than as a bibliography.