Coverage for HARK / ConsumptionSaving / ConsSequentialPortfolioModel.py: 0%

10 statements  

« prev     ^ index     » next       coverage.py v7.12.0, created at 2025-12-07 05:16 +0000

1""" 

2This file has one agent type that solves the portfolio choice problem in a slightly 

3different way. It imports from legacy OO solver code as well as the portfolio model. 

4""" 

5 

6from HARK import make_one_period_oo_solver 

7from HARK.ConsumptionSaving.ConsPortfolioModel import ( 

8 PortfolioConsumerType, 

9 init_portfolio, 

10) 

11from HARK.ConsumptionSaving.LegacyOOsolvers import ConsSequentialPortfolioSolver 

12 

13 

14class SequentialPortfolioConsumerType(PortfolioConsumerType): 

15 def __init__(self, verbose=False, quiet=False, **kwds): 

16 params = init_portfolio.copy() 

17 params.update(kwds) 

18 kwds = params 

19 

20 # Initialize a basic consumer type 

21 PortfolioConsumerType.__init__(self, verbose=verbose, quiet=quiet, **kwds) 

22 

23 # Set the solver for the portfolio model, and update various constructed attributes 

24 self.solve_one_period = make_one_period_oo_solver(ConsSequentialPortfolioSolver)