Repository navigation
Conversation
…vertibility New lecture placed after induced_priors. It adds a price-stabilizing tax rule to the supply_demand_var market and uses the extended market as a laboratory for McKay and Wolf (2023): - solves the market in sequence space and verifies McKay-Wolf Proposition 1 exactly, with comparisons to Sims-Zha and to Leeper-Zha's "modest policy interventions", and least-squares approximation with few policy shocks - shows that a price-stabilizing rule is observationally equivalent (for prices and quantities) to more flexible suppliers, and uses this to explain why invertibility of the supply shock depends on the policy rule - contrasts a structural modeler's induced prior over the counterfactual with McKay-Wolf sufficient statistics - sorts procedures by whether they need invertibility: external instruments recover the supply-shock response that VAR rotations cannot; the Wold-route counterfactual second moments are exact only under invertibility - relates McKay-Wolf to the dynamic programming squared lectures (calvo, calvo_abreu, dyn_stack, opt_tax_recur, dovis_accounting_mf) and states the credibility, belief-neutrality, linearity, and rules-versus-institutions assumptions behind their counterfactuals - exercises on optimal policy, time inconsistency, Wold-route errors, zeroing-out counterfactuals, and sign restrictions under different rules Also adds cross-references from supply_demand_var and induced_priors, a TOC entry, and bibliography entries for McKay-Wolf, Lucas (1976), Sims-Zha, Leeper-Zha, Stock-Watson, Plagborg-Moller-Wolf, Bernanke-Gertler-Watson, and Svensson. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
✅ Deploy Preview for lustrous-melomakarona-3ee73e ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
jstac
left a comment
There was a problem hiding this comment.
Review comments: explicit typos/wording and suggestions for matching the QuantEcon style manual (QuantEcon.manual/manual/styleguide/).
Already compliant: lecture title in title case and section headings in sentence case; one-sentence paragraphs; Unicode Greek in code; np.random.default_rng; standalone !pip install cell with the standard sentence; ^\top for transposes; {doc} cross-links.
Main style gaps (details inline):
- figures lack
mystnbcaptions/names; single-axis figures useax.set_title; several line plots lacklw=2 - bold-face vectors for stacked paths (McKay–Wolf notation) vs. the manual's "no bold vectors"
{cite}→{cite:t}where author names are part of the sentence- new bib entries lack DOIs
- length: the DP² comparison is stated three times
I ran the lecture locally (it executes cleanly in about 13 s) and checked the numerical claims in the text against the output. All match except the two flagged at lines 645 and 1298.
| plt.show() | ||
| ``` | ||
|
|
||
| The error in quantity rises steadily with $g_s$: the more slowly suppliers can adjust, the more their |
There was a problem hiding this comment.
Not quite accurate: the quantity error does not rise steadily over the whole grid. It falls from about 1.4% at
| | Cholesky or sign-restricted rotations of VAR innovations | yes | miss the supply-shock response | | ||
| | local projection on an external instrument | no | recovers the supply-shock response | | ||
| | McKay–Wolf counterfactual for a given shock (Proposition 1) | no, given the impulse responses | exact | | ||
| | Sims–Zha counterfactual for a given shock | no, given the impulse responses | not robust to the Lucas critique: errors of roughly 5 to 10 percent | |
There was a problem hiding this comment.
Clarity: "roughly 5 to 10 percent" here is error relative to the size of the response, while the bullet at line 1283 ("about 30 percent") is error relative to the policy effect. Both are right, but next to each other they read as inconsistent. Suggest naming the denominator in both places.
| / np.abs(split(x_true_g)[i]).max() for i in range(2)]) | ||
| sz_errors = np.array(sz_errors) | ||
|
|
||
| fig, ax = plt.subplots(figsize=(8, 4)) |
There was a problem hiding this comment.
Style manual (figures.md): single-axis figures should not carry an ax.set_title; move the title into a mystnb figure caption instead. Applies here and at lines 740/745 and 1002/1014. More generally, none of the figures outside the exercises have captions (mystnb: figure: caption/name metadata), while induced_priors does: worth adding captions + names to the figures at lines 395, 487, 579, 622, 665, 726, 769, 934, 1000, so they can be referenced with {numref}. (Figures inside the exercise/solution blocks must stay uncaptioned, since a caption breaks the PDF build there.) Multi-panel per-axis titles are fine.
| sz_errors = np.array(sz_errors) | ||
|
|
||
| fig, ax = plt.subplots(figsize=(8, 4)) | ||
| ax.semilogx(g_grid, sz_errors[:, 0], 'o-', label="quantity") |
There was a problem hiding this comment.
Style manual (figures.md): line charts should use lw=2. Missing here and at 636, 677–678, 682, 741–742 and 1009. The manual also asks not to set figsize without good reason; the wide multi-panel figures arguably justify it, but the single-panel ones (634, 740, 1002) could use the default.
| shock, each normalized to raise quantity by one unit on impact. | ||
|
|
||
| ```{code-cell} python3 | ||
| rng = np.random.default_rng(0) |
There was a problem hiding this comment.
Style manual (code.md): create the rng once and reuse it. A second generator is created here (default_rng(0)) after the one at line 777 (default_rng(1234)). Local generators inside the exercise solutions are fine.
| year = {2023}, | ||
| volume = {91}, | ||
| number = {5}, | ||
| pages = {1695--1725} |
There was a problem hiding this comment.
Style manual (references.md, bib rules 9 and 11): none of the eight new entries carries a doi; please add them from the publisher records (e.g. via curl -LH "Accept: application/x-bibtex" https://doi.org/<doi>). Also type Plagborg-Møller directly rather than Plagborg-M{\o}ller (PlagborgMollerWolf2021).
- figures: add mystnb captions/names to main-text figures; drop embedded
titles and explicit figsize on single-axis figures; lw=2 on line charts
- notation: plain letters for stacked time paths instead of bold, with the
convention stated once; \mathbb{E} for expectations (also in
supply_demand_var, for consistency between the two lectures)
- citations: {cite:t} where author names are part of the sentence
- bib: add DOIs to the eight new entries; type Plagborg-Møller directly
- overview: condense the "two responses to the Lucas critique" subsection
to a pointer to the full treatment in pc_dp2
- bold only for definitions
- reuse a single rng
- correct the description of how the Sims-Zha error varies with g_s, and
name the denominators of the Sims-Zha error figures in the summary table
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
bce58df addresses the unresolved review threads:
The lecture executes cleanly locally. Reusing the 🤖 Generated with Claude Code |
…jump_lq policy_regimes (new): a supply-demand market whose tax rule switches regimes by a Markov chain, solved as a Markov jump LQ planning problem with a correct linked-Riccati solver. Covers the two levels of the Lucas critique, reversible vs permanent reforms, McKay-Wolf counterfactuals from regime-switching data, and VARs fit to regime-switching data. policy_counterfactuals: rule-based scenario analysis section, a pointer to policy_regimes, corrections from fresh-eyes reviews (uniqueness assumption, cost-parameter equivalence, limited-shock errors, relative error scales), trimmed repetition, voice and style fixes, and citations for Romer-Romer, Gertler-Karadi, and Ben Zeev-Khan. markov_jump_lq: correct the Bellman equation and linked Riccati formula (conditional expectation of next-period value matrices inside the inverse), fix sign and transpose errors, note that quantecon.LQMarkov currently implements the averaged recursion, and combine looped figures into multi-panel figures. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds a new lecture,
policy_counterfactuals, that adds a price-stabilizing tax rule to the single-good market ofsupply_demand_var/induced_priorsand uses it to study McKay and Wolf (2023).Main message: in a linear economy where policy affects private behaviour only through the expected path of the instrument, impulse responses to contemporaneous and news policy shocks under the baseline rule deliver exact, Lucas-critique-robust counterfactuals under another rule, without a structural model of the private sector.
Contents:
Also adds forward links from
supply_demand_varandinduced_priors, and 8 new bib entries.The lecture executes cleanly locally (~13 s); numerical claims in the text were checked against the output.
🤖 Generated with Claude Code