This repository contains the python code for Dynamic Programming Squared Model of Marcroeconomy consisting of an agent and the principal. The principal offers a contract to the agent such that accepting the contract doesn't make the agent worse off. It is in prinicpal interest to make the agent accept the offer.
For more theory and computation of Dynamic Squared Models, please refer to jupyter notebook "dynamic programming squared model.ipynb". For full mathematical analysis, please refer to pdf titled "dynamic programming squared model (DRAFT).pdf" .
For seeing the beauty of bellman equation in two dimension(Two State and One Control Variable) i.e. convergence of value function surfaces in two dimension, see the jupyter notebook **"Two State and One Control Bellman Equation Model.ipynb" **
NOTE:
- As this is work in progress, so this repository will be periodically updated.
- For constrained optimization, scipy.minimize function has been used