HARK icon indicating copy to clipboard operation
HARK copied to clipboard

Perfect foresight model with CRRA = 1

Open ghost opened this issue 8 years ago • 7 comments

Inspired by demo file, I am writing demos for each model in ConsIndShockModel. It is fun to play with parameters and helps me to understand consumption-saving dynamics model. In fact, I talked to other graduate students and realized only a few had experienced Python language. David's example is superb, and I think more demos would be instructive. Of course, I noticed David left homework assignment in the demo. For some people, I guess it is quite difficult.. Learning by doing would be ideal, but more guidelines also are useful. I just want to share struggles I faced earlier (even now:) ).

Anyway, I checked some variant versions of perfect foresight case.

from HARK.ConsumptionSaving.ConsIndShockModel import PerfForesightConsumerType
Example = PerfForesightConsumerType()
Example.CRRA = 1.0
Example.solve()

It throws out an error. This is because line 410 in ConsIndShockModel.py MPCnvrs = self.MPC**(-self.CRRA/(1.0-self.CRRA))

I guess we need to fix defValueFuncs function. Am I right?

p.s. CRRA=1.0 works for other types.

ghost avatar Aug 05 '16 03:08 ghost