EXAMPLES: Add Santos (1999) Section 7.3 stochastic growth example notebook with analytical benchmark solution#63
Open
mnshkw wants to merge 23 commits intoQuantEcon:mainfrom
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new example notebook implementing the multidimensional-state stochastic growth model with leisure from Santos (1999, Handbook of Macroeconomics), Section 7.3. The notebook demonstrates the use of ContinuousDPs.jl with an analytical benchmark solution for validation and includes comprehensive accuracy checks.
Changes:
- Adds
examples/cdp_ex_santos1999_s73_jl.ipynbimplementing Santos (1999) Section 7.3 stochastic growth model with leisure - Updates README.md to include link to the new notebook in the "Demo Notebooks" list
- Implements both VFI and PFI algorithms with multiple basis types (Chebyshev, Spline, Linear)
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/cdp_ex_santos1999_s73_jl.ipynb | New example notebook with 2D state space model, analytical benchmark (delta=1 case), shock discretization via Gauss-Hermite quadrature, and comparisons using multiple interpolation methods |
| README.md | Adds link to new Santos (1999) Section 7.3 example notebook |
| " const_term = params.lambda * (log(1 - ab) + log(params.A) + (1 - params.alpha) * log(1 - l_star)) + (1 - params.lambda) * log(l_star) + params.beta * C * (log(ab) + log(params.A) + (1-params.alpha) * log(1 - l_star))\n", | ||
| " B = const_term / (1 - params.beta)\n", | ||
| "\n", | ||
| " # Policy function (consant fraction of production)\n", |
There was a problem hiding this comment.
Spelling error in comment: "consant" should be "constant"
Suggested change
| " # Policy function (consant fraction of production)\n", | |
| " # Policy function (constant fraction of production)\n", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new example notebook implementing the multidimensional-state stochastic growth model with leisure from Santos (1999, Handbook of Macroeconomics), Section 7.3, solved using
ContinuousDPs.jl.The notebook includes analytical benchmark for delta = 1 case and accuracy checks for the policy and value functions.
In addition, the README “Demo Notebooks” list is updated to include a link to the new notebook.
Motivation
Santos (1999) Sec. 7.3 provides a benchmark for continuous-state DP with:
This PR intends to provide a useful example for
ContinuousDPs.jl.Changes
Add
examples/cdp_ex_santos1999_s73_jl.ipynb:qnwnorm)BasisMatrices.jlfor interpolationUpdate README:
How to Run
Open the notebook and run all the cells. The notebook includes a short “How to run” section at the top.
References
Future Works
This PR focuses on Santos (1999) Section 7.3 (stochastic case). Follow-up PRs will:
Notes for Reviewers