jessegrabowski / gEconpy

A collection of tools for working with DSGE models in python, inspired by the R package gEcon
https://geconpy.readthedocs.io/en/latest/index.html
GNU General Public License v3.0
21 stars 4 forks source link

Improve construction of Lagrangians #14

Open jessegrabowski opened 1 year ago

jessegrabowski commented 1 year ago

Currently, Lagrangians are required to be written as Bellman equations of the form:

U[] = u[] + beta * E[][U[1]];

The right-hand side can only include a discount factor and a single expectation, which must be of the left-hand side. Trying to include other variables, for example a stochastic discount factor Q[] = beta * E[][lambda[1]] / lambda[], will raise an exception. I forget why I did it this way, but this needs to be revisited.