Coverage for HARK/models/fisher.py: 0%

4 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2025-11-02 05:14 +0000

1""" 

2A model file for a Fisher 2-period consumption problem. 

3""" 

4 

5from HARK.model import Control, DBlock 

6 

7# This way of distributing parameters across the scope is clunky 

8# Can be handled better if parsed from a YAML file, probably 

9# But it would be better to have a more graceful Python version as well. 

10CRRA = (2.0,) 

11 

12calibration = { 

13 "DiscFac": 0.96, 

14 "CRRA": CRRA, 

15 "Rfree": 1.03, 

16 "y": [1.0, 1.0], 

17 "BoroCnstArt": None, 

18} 

19 

20block = DBlock( 

21 **{ 

22 "shocks": {}, 

23 "dynamics": { 

24 "m": lambda Rfree, a, y: Rfree * a + y, 

25 "c": Control(["m"]), 

26 "a": lambda m, c: m - c, 

27 }, 

28 "reward": {"u": lambda c: c ** (1 - CRRA) / (1 - CRRA)}, 

29 } 

30)