QuantEcon / book-dp1-public-companion

Dynamic Programming Volume 1
https://quantecon.github.io/book-dp1-public-companion/
BSD 3-Clause "New" or "Revised" License
109 stars 23 forks source link

[!CAUTION]
ARCHIVED: 18th April 2024 The code for the textbook Dynamic Programming Volume 1 is available on the website dp.quantecon.org

Dynamic Programming Volume 1

Public repo for the textbook Dynamic Programming Volume 1 by Thomas J. Sargent and John Stachurski.

PDF

The textbook itself is nearly complete. The PDF is available as dp.pdf in the files listed above. Comments and feedback are very welcome. The easiest way to provide feedback is to open an issue above.

Code

The repo also contains all of the Julia and Python code found in the code snippets within the textbook, as well as Julia and Python code to reproduce all figures.

Codebooks

The repo contains a Jupyter Book with all code and figures used in the book. To build it locally,

  1. Clone the repo
  2. Create an environment using environment.yml
  3. You will have to install Julia 1.9 if you haven't already (Note: There is no Julia version on Conda for Windows systems).
  4. Run python3 create_code_book.py from the root directory of the repo. This should take a few minutes to finish running.

Figures generated by the Julia code can be found in the ./code-book/figures/ folder.

To contribute to the codebook,

  1. Edit the scripts in source_code_jl/ and source_code_py/.
  2. Edit the chapter_meta dictionaries in create_code_book.py to
    • include or remove scripts
    • change the order of the scripts
    • change function calls
  3. Run create_code_book.py to generate the codebook.