def __init__(
     self,
     solution_next,
     IncShkDstn,
     PrefShkDstn,
     LivPrb,
     DiscFac,
     CRRA,
     Rboro,
     Rsave,
     PermGroFac,
     BoroCnstArt,
     aXtraGrid,
     vFuncBool,
     CubicBool,
 ):
     ConsKinkedRsolver.__init__(
         self,
         solution_next,
         IncShkDstn,
         LivPrb,
         DiscFac,
         CRRA,
         Rboro,
         Rsave,
         PermGroFac,
         BoroCnstArt,
         aXtraGrid,
         vFuncBool,
         CubicBool,
     )
     self.PrefShkPrbs = PrefShkDstn.pmf
     self.PrefShkVals = PrefShkDstn.X
Пример #2
0
    def __init__(self, solution_next, IncomeDstn, PrefShkDstn, LivPrb, DiscFac,
                 CRRA, Rboro, Rsave, PermGroFac, BoroCnstArt, aXtraGrid,
                 vFuncBool, CubicBool):
        '''
        Constructor for a new solver for problems with risky income, a different
        interest rate on borrowing and saving, and multiplicative shocks to utility.

        Parameters
        ----------
        solution_next : ConsumerSolution
            The solution to the succeeding one period problem.
        IncomeDstn : [np.array]
            A list containing three arrays of floats, representing a discrete
            approximation to the income process between the period being solved
            and the one immediately following (in solution_next). Order: event
            probabilities, permanent shocks, transitory shocks.
        PrefShkDstn : [np.array]
            Discrete distribution of the multiplicative utility shifter.  Order:
            probabilities, preference shocks.
        LivPrb : float
            Survival probability; likelihood of being alive at the beginning of
            the succeeding period.
        DiscFac : float
            Intertemporal discount factor for future utility.
        CRRA : float
            Coefficient of relative risk aversion.
        Rboro: float
            Interest factor on assets between this period and the succeeding
            period when assets are negative.
        Rsave: float
            Interest factor on assets between this period and the succeeding
            period when assets are positive.
        PermGroGac : float
            Expected permanent income growth factor at the end of this period.
        BoroCnstArt: float or None
            Borrowing constraint for the minimum allowable assets to end the
            period with.  If it is less than the natural borrowing constraint,
            then it is irrelevant; BoroCnstArt=None indicates no artificial bor-
            rowing constraint.
        aXtraGrid: np.array
            Array of "extra" end-of-period asset values-- assets above the
            absolute minimum acceptable level.
        vFuncBool: boolean
            An indicator for whether the value function should be computed and
            included in the reported solution.
        CubicBool: boolean
            An indicator for whether the solver should use cubic or linear inter-
            polation.

        Returns
        -------
        None
        '''
        ConsKinkedRsolver.__init__(self, solution_next, IncomeDstn, LivPrb,
                                   DiscFac, CRRA, Rboro, Rsave, PermGroFac,
                                   BoroCnstArt, aXtraGrid, vFuncBool,
                                   CubicBool)
        self.PrefShkPrbs = PrefShkDstn[0]
        self.PrefShkVals = PrefShkDstn[1]