Open sbenthall opened 3 weeks ago
This PR builds on #1414, which should be merged first
this is really work towards #1374
TODO: Allow nested RBlocks
TODO: Demo in a test the way that the consumption DBlock can be used with or without the RBlock
I believe this PR is ready. Requesting final review from @alanlujan91 or @mnwhite
This PR now supports recursively defined models, and demonstrates how a model can be composed of pre-made blocks.
Specifically, it shows how the portfolio consumption model can be built from the basic consumer model by adding one more block. This block makes the R
rate of return an endogenous state that's a function of the risky return and stigma
, overriding the default calibration of this value.
Added normalized version of consumption block
This PR:
The model in
consumer.py
is an attempt to demonstrate how a value, such asR
, can be either calibrated directly or set by a dynamic block (in this case, the portfolio block) while reusing the same consumption block data.It also shows the use of a
tick
block to set $k_{t+1} = a_t$