EconForge / dolark.py

2 stars 12 forks source link

"Cycles" in which the agents solve a different problem in each subperiod #12

Closed sbenthall closed 4 years ago

sbenthall commented 4 years ago

A feature request: a syntax for writing problems with "cycles" in which the agents solve a different problem in each subperiod.

In these problems:

From @llorracc

A simple example that could be used to develop a syntax for this is the portfolio problem:

  1. "end-of-period" problem: Given assets $a$, figure out how to invest them in risky vs safe assets. Which involves constructing a marginal end-of-period-value function $v^{'}{t,1}$
  2. "beginning-of-period" problem: Given end-of-period marginal value function, compute beginning-of-period optimal consumption. This yields $v^{'}{t,0}$

Further technical discussion here: https://www.econ2.jhu.edu/people/ccarroll/SolvingMicroDSOPs/

(originally discussed here: https://github.com/econ-ark/DARKolo/issues/14#issuecomment-659593929 )

albop commented 4 years ago

Like https://github.com/EconForge/dolark/issues/13, this is a dolo issue. An inelegant way to solve it would be to proceed in the same way as #13, ie define another exogenous shock with a sub period component and special case the equations based on it's value. But a core feature of subperiods problems is the fact that the set of variables that need to be solved for is different in each subperiod. You can emulate that by solving for all variables, always, sometimes trivially but that is not nice