Skip to content

Releases: QuantEcon/lecture-python-intro

publish2026-jun02

02 Jun 08:18
6c511da

Choose a tag to compare

Add Maximum Sustainable Yield and Fishery Collapse lecture (#763)

* Add Maximum Sustainable Yield and Fishery Collapse lecture (#755)

New lecture lectures/msy_fishery.md, slotted under Nonlinear Dynamics
after solow. Builds the deterministic Schaefer MSY model (logistic
growth, 45-degree diagrams, sustainable yield, MSY via grid search and
optional calculus), then adds environmental randomness to show why a
constant MSY quota sits on a knife-edge and collapses, versus a
self-correcting constant-effort policy. Includes the Peruvian anchovy
and Atlantic cod collapses, plus exercises on precautionary quotas and
large-r logistic chaos.

Adds schaefer1954, gordon1954, may1976, clark1990 to quant-econ.bib.

Closes #755

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Revise MSY lecture: rename effort to e, yield to y*(e), add early graphic

- Rename effort symbol E -> e and sustainable yield Y(E) -> y*(e)
  throughout prose, math, and code, matching the x*(e) notation.
- Introduce y*(e) graphically with a growth-vs-harvest figure right
  where it is defined, marking x*(e) and y*(e) at effort e=20.
- Shrink the two 45-degree diagrams by 10% (figsize 5.5 -> 4.95).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Implement TODOs in revised first half of MSY lecture

- Add a figure showing the shape of the logistic growth curve G(x);
  move the G definition above it.
- Refactor plot_45 to take the one-year map as a function argument, so
  the no-fishing 45-degree diagram works before fishing/effort and the
  update() function are introduced; update both call sites to pass
  lambdas.
- Add the two-effort 45-degree diagram (staircases omitted) showing
  x*(e) falling with effort.
- Fix the multi-effort growth-vs-harvest figure: use explicit efforts
  [12.5, 25, 37.5] and G(K/2) for the y-limit (e_msy/MSY are not yet
  defined there), and fix the label typo.
- Restore the grid-search computation of e_msy, MSY, x_msy in the MSY
  section.
- Drop the under/over-fishing framing from the yield-effort curve per
  review note, since under randomness no constant policy is fully safe.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Align MSY lecture with QuantEcon style guide; fix two typos

Following manual/styleguide (figures.md, math.md, references.md):

- Remove all embedded matplotlib titles (ax.set_title / fig.suptitle)
  and add mystnb figure captions + names to every figure cell.
- Keep the figure box: drop all ax.spines[...].set_visible(False).
- Standardize data-line widths to lw=2; drop figsize from standard
  single-panel charts (keep square figsize on the cobweb diagrams and
  the stacked stochastic panel as justified exceptions).
- Label the two policy panels with in-axes text rather than titles.
- Use {cite:t} for in-sentence citations (Schaefer/Gordon/Clark,
  Following Schaefer, analyzed by May); keep {cite} for parenthetical.
- Fix typos: "according the" -> "according to the"; "called
  intrinsic" -> "called the intrinsic".

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Reflow msy-policies figure caption

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Fix LaTeX PDF build: drop figure floats inside solution blocks

The mystnb figure captions on the two code-cells inside the
{solution-start}/{solution-end} dropdowns produced LaTeX figure floats
nested in a directive, triggering "! LaTeX Error: Not in outer par
mode." Per the admonitions style guide (use image, not figure floats,
inside exercise/solution directives for PDF builds), remove the caption
metadata from those two solution cells; the top-level captioned figures
are unaffected. Verified with a local pdflatex build (24-page PDF, no
error).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Restructure MSY lecture around quotas; fix yield-effort build break

Reframe as "Fishery Management: Quotas and MSY": compute the MSY after
introducing the yield-effort dome, add Dynamics and Adding randomness
subsections, list x/r/K under the growth equation, and credit the
"Maths from the past" discussion.

Fix the reorder regression: the yield-effort figure referenced MSY in
set_ylim before MSY is computed (NameError); use y_grid.max() instead.
Also fix two typos ("sevaral" -> "several"; missing question mark).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Add MSY success story: Pacific Coast lingcod recovery

Insert a new section before "Randomness, risk and collapse" so the
lecture shows MSY-based management working before discussing its
failures. Uses RAM Legacy Stock Assessment Database series for U.S.
Pacific Coast lingcod (B/B_MSY and F/F_MSY, 1928-2009): sustained
overfishing drives biomass to ~0.27 B_MSY, then an MSY-anchored
rebuilding plan (overfished 1999, rebuilt 2005) pulls F below F_MSY and
biomass recovers and overshoots -- the model's negative feedback in real
data. Includes honest caveats that tee up the randomness section.

Vendor the small series as datasets/lingcod_msy_recovery.csv (read
locally, no build-time download); add pandas import and the ricard2012
bib entry.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Use default color cycle for data series; minor prose/tense fixes

Per QuantEcon convention, let matplotlib pick data-series colors (C0/C1
standard pair) instead of hard-coding C0/C3; reserve explicit color for
reference elements only (black 45-degree line/cobweb/markers/guides,
grey milestone lines). Markers now follow their line via get_color().
Lingcod overfishing band switched from red to neutral grey.

Also fold in the user's prose edits (overview rewording, G(x)
definition, hide-input on plot_45, simplified update equation, tightened
lingcod narrative) and fix a past/present tense slip in that narrative.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

publish2026-may31

30 May 21:21
5d81eaa

Choose a tag to compare

Polish Bayesian lecture and rename prob_dist title (#760)

- Add an overview flowchart (prior belief + data -> updated belief),
  drawn inline with matplotlib in a hide-input cell
- Tighten prose around the prior and normalizing constant; define c(y)
  explicitly and present the trapezoidal rule as a numbered list
- Fix a missing period and trailing whitespace
- Rename "Distributions and Probabilities" to "Common Distributions"

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

publish-may-30

29 May 22:17
f0bd029

Choose a tag to compare

Add Introduction to Bayesian Methods lecture (#751) (#758)

* Add Introduction to Bayesian Methods lecture (#751)

New lecture introducing Bayesian updating through a microloan default
example. Builds from conditional probability and Bayes' law to a
Bernoulli/beta conjugate model, covering:

- numerical grid-based posterior updating via the trapezoidal rule
- the beta closed form and conjugacy
- iterative (sequential) updating and the equivalent batch binomial update
- loan pricing: expected loss and the break-even interest rate r = θ/(1-θ)
- two exercises (prior sensitivity, credible interval)

Slotted under the Estimation part of the table of contents after mle.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Fix code bugs, add trapezoid figure and conditional-independence note

- Fix variable-name mismatches (y_outcomes/outcomes, current/current_vals)
  and define prior_vals at module scope
- Normalize each iterated posterior against the running density rather
  than the original prior
- Fix two prose typos
- Add a note explaining that sequential updating also relies on
  conditional independence, just implicitly
- Add a hidden-input figure visualizing the trapezoidal rule
- Rename the conditional-probability example label to bayes_ex_cond

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

publish-2026may24

24 May 08:20
ae928c8

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: publish-2026feb24...publish-2026may24

publish-2026feb24

24 Feb 04:50
b86a744

Choose a tag to compare

What's Changed

  • ⬆️ Bump dawidd6/action-download-artifact from 12 to 15 by @dependabot[bot] in #705
  • ⬆️ Bump quantecon-book-theme from 0.15.1 to 0.17.1 by @dependabot[bot] in #704
  • ⬆️ Bump sphinx-proof from 0.3.0 to 0.4.0 by @dependabot[bot] in #698

Full Changelog: publish-2025dec29...publish-2026feb24

publish-2025dec29

29 Dec 04:52
21bd3b6

Choose a tag to compare

What's Changed

  • ⬆️ Bump dawidd6/action-download-artifact from 11 to 12 by @dependabot[bot] in #690
  • Fix grammar and spelling errors across lecture files by @jstac in #688

Full Changelog: publish-2025dec27...publish-2025dec29

publish-2025dec27

27 Dec 09:18
6ecd22c

Choose a tag to compare

What's Changed

  • ⬆️ Configure dependabot to ignore Python version updates by @mmcky in #686
  • Bump sphinx-tojupyter from 0.3.1 to 0.6.0 by @dependabot[bot] in #681
  • Bump sphinx-exercise from 1.0.1 to 1.2.1 by @dependabot[bot] in #682
  • Bump sphinx-reredirects from 1.0.0 to 1.1.0 by @dependabot[bot] in #684
  • Bump sympy from 1.13.3 to 1.14.0 by @dependabot[bot] in #683
  • Fix SymPy OverflowError in solow.md by using Rational by @mmcky in #687
  • Add fetch-depth: 0 to checkout actions for changelog support by @mmcky in #689

Full Changelog: publish-2025dec20...publish-2025dec27

publish-2025dec20

20 Dec 06:05
9ca0dca

Choose a tag to compare

What's Changed

  • ⬆️ Bump softprops/action-gh-release from 1 to 2 by @dependabot[bot] in #662
  • ⬆️ Bump actions/checkout from 5 to 6 by @dependabot[bot] in #666
  • Bump quantecon-book-theme from 0.9.2 to 0.15.0 by @dependabot[bot] in #669
  • Bump sphinxext-rediraffe from 0.2.7 to 0.3.0 by @dependabot[bot] in #670
  • Bump sphinx-proof from 0.2.1 to 0.3.0 by @dependabot[bot] in #672
  • ⬆️ Bump actions/upload-artifact from 5 to 6 by @dependabot[bot] in #675
  • Update _config.yml for quantecon-book-theme upgrade by @mmcky in #678
  • Bump anaconda from 2025.06 to 2025.12 by @dependabot[bot] in #673

Full Changelog: publish-2025oct30...publish-2025dec20

publish-2025oct30

30 Oct 03:30
535a384

Choose a tag to compare

What's Changed

  • MAINT: run link checker weekly by @mmcky in #640
  • ⬆️ Bump actions/checkout from 4 to 5 by @dependabot[bot] in #643
  • MAINT: enable dependabot checking of conda environment by @mmcky in #650
  • MAINT: enable beta for dependabot support for anaconda by @mmcky in #651
  • ⬆️ Bump actions/upload-artifact from 4 to 5 by @dependabot[bot] in #658
  • ⬆️ Bump peter-evans/create-issue-from-file from 5 to 6 by @dependabot[bot] in #654
  • MAINT: Phase 1 - Add HTML archives to GitHub release assets by @mmcky in #659

Full Changelog: publish-2025aug01...publish-2025oct30

publish-2025aug01

01 Aug 04:48
1ed3d4f

Choose a tag to compare

What's Changed

  • ENH: update linkchecker by @mmcky in #589
  • Fix definition of primitive matrix and clarify Hamilton matrix reference by @Nanakjoth in #584
  • FIX: links i#590 by @mmcky in #591
  • ⬆️ Bump dawidd6/action-download-artifact from 9 to 10 by @dependabot[bot] in #588
  • MAINT: update anaconda=2025.06 and python=3.13 by @mmcky in #637

New Contributors

Full Changelog: publish-2025apr24...publish-2025aug01