EconForge / dolo.py

Economic modelling in python
BSD 2-Clause "Simplified" License
98 stars 72 forks source link

Age varying magnitudes #208

Open sbenthall opened 4 years ago

sbenthall commented 4 years ago

@llorracc :

Finite Horizons specification of the SolvingMicroDSOPs life cycle model that has age-varying magnitudes of transitory and permanent shocks, income growth, and other inputs

A key question here is whether or not age can be considered an endogenous state. If implemented in a naive way, this is impractical, as it creates an expanded, sparse state space:

If we want to solve a life cycle problem where the maximum span of life is 120 years (when you reach age 120, probability of death becomes 100 percent), then a symmetric matrix would require the specification of a matrix of size 120 by 120 (for the annual version) to capture the probability that a person who is age 1 transitions to age 119. Of course that probability is zero -- and indeed the matrix is entirely empty except for a single entry in each row, which determines that the probability of transitioning to the next age is 1.

As per @albop's note here, this can be accomplished with minimal changes to the existing dolo syntax by specifying age as an exogenous process.

https://github.com/EconForge/dolark/issues/13#issuecomment-661252726