This project contains solutions to several QuantEcon lectures using the
DiscreteDP class from the quantecon
Python package. DiscreteDP solves finite-state, finite-action Markov
decision processes via value iteration, policy iteration, or modified policy
iteration, which makes it a natural fit for the dynamic programming problems
covered in these lectures.
- McCall Model — a worker's optimal search/stopping problem: whether to accept or reject a wage offer each period, given a fixed distribution of offers and the option to keep searching.
- Cake Eating — an infinite-horizon consumption/savings problem: how much of a fixed resource ("cake") to consume each period versus save for the future.
- Income Fluctuation Problem — a consumption-savings problem under income uncertainty and a borrowing constraint, where the agent chooses consumption and asset holdings each period.
Each lecture is worked through as a Jupyter notebook in notebooks/, where
the problem is formulated as a discrete dynamic program (states, actions,
rewards, and transition probabilities) and then solved with DiscreteDP.
pip install -r requirements.txt
jupyter notebook notebooks/.
├── notebooks/ # Jupyter notebooks, one per lecture/problem
├── requirements.txt # Python dependencies
└── README.md