def makeTargetMfig(Rfree, DiscFac, CRRA, PermShkStd, TranShkStd):
    inf_hor = IndShockConsumerType(quietly=True, **base_params)
    inf_hor.Rfree = Rfree
    inf_hor.DiscFac = DiscFac
    inf_hor.CRRA = CRRA
    inf_hor.PermShkStd = [PermShkStd]
    inf_hor.TranShkStd = [TranShkStd]
    inf_hor.update_income_process()
    mPlotMin = 0
    mPlotMax = 250
    inf_hor.aXtraMax = mPlotMax
    inf_hor.solve(quietly=True, messaging_level=logging.CRITICAL)
    soln = inf_hor.solution[0]
    Bilt, cFunc = soln.Bilt, soln.cFunc
    cPlotMin = 0, cFunc(mPlotMax)

    if Bilt.GICMod:  # tattle
        soln.check_GICMod(soln, quietly=False, messaging_level=logging.WARNING)

    mBelwStE = np.linspace(mPlotMin, mPlotMax, 1000)
    EPermGroFac = inf_hor.PermGroFac[0]

    def EmDelEq0(mVec):
        return (EPermGroFac / Rfree) + (1.0 - EPermGroFac / Rfree) * mVec

    cBelwStE_Best = cFunc(mBelwStE)  # "best" = optimal c
    cBelwStE_Sstn = EmDelEq0(mBelwStE)  # "sustainable" c
    mBalLvl = Bilt.mBalLvl

    plt.figure(figsize=(12, 8))
    plt.plot(mBelwStE, cBelwStE_Best, label="$c(m_{t})$")
    plt.plot(mBelwStE,
             cBelwStE_Sstn,
             label="$\mathsf{E}_{t}[\Delta m_{t+1}] = 0$")
    plt.xlim(mPlotMin, mPlotMax)
    plt.ylim(cPlotMin, cFunc(mPlotMax))
    plt.plot(
        [mBalLvl, mBalLvl],
        [0, 2.5],
        color="black",
        linestyle="--",
    )
    plt.tick_params(
        #        labelbottom=False,
        #        labelleft=False,
        #        left="off",
        right="off",
        #        bottom="off",
        top="off",
    )
    plt.text(0, 1.47, r"$c$", fontsize=26)
    plt.text(3.02, 0, r"$m$", fontsize=26)
    plt.text(mBalLvl - 0.05, -0.1, "m̌", fontsize=26)
    plt.legend(fontsize='x-large')
    plt.show()
    return None
def makeTargetMfig(Rfree, DiscFac, CRRA, PermShkStd, TranShkStd):
    baseAgent_Inf = IndShockConsumerType(verbose=0, cycles=0, **base_params)
    baseAgent_Inf.Rfree = Rfree
    baseAgent_Inf.DiscFac = DiscFac
    baseAgent_Inf.CRRA = CRRA
    baseAgent_Inf.PermShkStd = [PermShkStd]
    baseAgent_Inf.TranShkStd = [TranShkStd]
    baseAgent_Inf.updateIncomeProcess()
    baseAgent_Inf.checkConditions()
    mPlotMin = 0
    mPlotMax = 250
    baseAgent_Inf.aXtraMax = mPlotMax
    baseAgent_Inf.solve()
    baseAgent_Inf.unpack('cFunc')
    cPlotMin = 0
    cPlotMax = baseAgent_Inf.cFunc[0](mPlotMax)

    if (baseAgent_Inf.GPFInd >= 1):
        baseAgent_Inf.checkGICInd(verbose=3)

    mBelwTrg = np.linspace(mPlotMin, mPlotMax, 1000)
    EPermGroFac = baseAgent_Inf.PermGroFac[0]
    EmDelEq0 = lambda m: (EPermGroFac / Rfree) + (1.0 - EPermGroFac / Rfree
                                                  ) * m
    cBelwTrg_Best = baseAgent_Inf.cFunc[0](mBelwTrg)  # "best" = optimal c
    cBelwTrg_Sstn = EmDelEq0(mBelwTrg)  # "sustainable" c
    mNrmTrg = baseAgent_Inf.solution[0].mNrmSS

    plt.figure(figsize=(12, 8))
    plt.plot(mBelwTrg, cBelwTrg_Best, label="$c(m_{t})$")
    plt.plot(mBelwTrg,
             cBelwTrg_Sstn,
             label="$\mathsf{E}_{t}[\Delta m_{t+1}] = 0$")
    plt.xlim(mPlotMin, mPlotMax)
    plt.ylim(cPlotMin, cPlotMax)
    plt.plot(
        [mNrmTrg, mNrmTrg],
        [0, 2.5],
        color="black",
        linestyle="--",
    )
    plt.tick_params(
        #        labelbottom=False,
        #        labelleft=False,
        #        left="off",
        right="off",
        #        bottom="off",
        top="off",
    )
    plt.text(0, 1.47, r"$c$", fontsize=26)
    plt.text(3.02, 0, r"$m$", fontsize=26)
    plt.text(mNrmTrg - 0.05, -0.1, "m̌", fontsize=26)
    plt.legend(fontsize='x-large')
    plt.show()
    return None
def makeConvergencePlot(DiscFac, CRRA, Rfree, permShkStd):
    # Construct finite horizon agent with baseline parameters
    baseAgent_Fin = IndShockConsumerType(quietly=True,
                                         messaging_level=logging.CRITICAL,
                                         **base_params)
    baseAgent_Fin.DiscFac = DiscFac
    baseAgent_Fin.CRRA = CRRA
    baseAgent_Fin.Rfree = Rfree
    baseAgent_Fin.permShkStd = [permShkStd]
    baseAgent_Fin.cycles = 100
    baseAgent_Fin.solve(quietly=True, messaging_level=logging.CRITICAL)
    baseAgent_Fin.unpack('cFunc')

    # figure plot limits
    mMin, mMax, cPlotMin, cPlotMax = 0, 7, 0, 7

    mPlotMin = 0
    mLocCLabels = 5.6  # Defines horizontal limit of figure
    mPlotTop = 6.5  # 3.5 # 6.5    # Defines maximum m value where functions are plotted
    mPts = 100  # Number of points at which functions are evaluated

    plt.figure(figsize=(12, 8))
    plt.ylim([cPlotMin, cPlotMax])
    plt.xlim([mMin, mMax])

    mBelwLabels = np.linspace(mPlotMin, mLocCLabels - 0.1,
                              mPts)  # Range of m below loc of labels
    m_FullRange = np.linspace(mPlotMin, mPlotTop, mPts)  # Full plot range
    # c_Tm0  defines the last period consumption rule (c=m)
    c_Tm0 = m_FullRange
    # c_Tm1 defines the second-to-last period consumption rule
    c_Tm1 = baseAgent_Fin.cFunc[-2](mBelwLabels)
    c_Tm5 = baseAgent_Fin.cFunc[-6](
        mBelwLabels)  # c_Tm5 defines the T-5 period consumption rule
    # c_Tm10 defines the T-10 period consumption rule
    c_Tm10 = baseAgent_Fin.cFunc[-11](mBelwLabels)
    # c_Limt defines limiting infinite-horizon consumption rule
    c_Limt = baseAgent_Fin.cFunc[0](mBelwLabels)

    plt.plot(mBelwLabels, c_Limt, label="$c(m)$")
    plt.plot(mBelwLabels, c_Tm1, label="$c_{T-1}(m)$")
    plt.plot(mBelwLabels, c_Tm5, label="$c_{T-5}(m)$")
    plt.plot(mBelwLabels, c_Tm10, label="$c_{T-10}(m)$")
    plt.plot(m_FullRange, c_Tm0, label="$c_{T}(m) = 45$ degree line")
    plt.legend(fontsize='x-large')
    plt.tick_params(labelbottom=False,
                    labelleft=False,
                    left="off",
                    right="off",
                    bottom="off",
                    top="off")

    plt.show()
    return None
Exemple #4
0
def makeBoundsFigure(UnempPrb, PermShkStd, TranShkStd, DiscFac, CRRA):
    baseAgent_Inf = IndShockConsumerType(verbose=0, cycles=0, **base_params)
    baseAgent_Inf.UnempPrb = UnempPrb
    baseAgent_Inf.PermShkStd = [PermShkStd]
    baseAgent_Inf.TranShkStd = [TranShkStd]
    baseAgent_Inf.DiscFac = DiscFac
    baseAgent_Inf.CRRA = CRRA
    baseAgent_Inf.updateIncomeProcess()
    baseAgent_Inf.checkConditions()
    baseAgent_Inf.solve()
    baseAgent_Inf.unpack('cFunc')
    # Retrieve parameters (makes code readable)
    Rfree = baseAgent_Inf.Rfree
    CRRA = baseAgent_Inf.CRRA
    EPermGroFac = baseAgent_Inf.PermGroFac[0]
    mNrmTrg = baseAgent_Inf.solution[0].mNrmSS
    UnempPrb = baseAgent_Inf.UnempPrb

    κ_Min = 1.0 - (Rfree**(-1.0)) * (Rfree * DiscFac)**(1.0 / CRRA)
    h_inf = (1.0 / (1.0 - EPermGroFac / Rfree))
    cFunc_Uncnst = lambda m: (h_inf - 1) * κ_Min + κ_Min * m
    cFunc_TopBnd = lambda m: (1 - UnempPrb**(1.0 / CRRA) *
                              (Rfree * DiscFac)**(1.0 / CRRA) / Rfree) * m
    cFunc_BotBnd = lambda m: (1 - (Rfree * DiscFac)**(1.0 / CRRA) / Rfree) * m

    # Plot the consumption function and its bounds
    cMaxLabel = r"c̅$(m) = (m-1+h)κ̲$"  # Use unicode kludge
    cMinLabel = r"c̲$(m)= (1-\Phi_{R})m = κ̲ m$"

    mPlotMax = 25
    mPlotMin = 0
    # mKnk is point where the two upper bounds meet
    mKnk = ((h_inf - 1) * κ_Min) / (
        (1 - UnempPrb**(1.0 / CRRA) *
         (Rfree * DiscFac)**(1.0 / CRRA) / Rfree) - κ_Min)
    mBelwKnkPts = 300
    mAbveKnkPts = 700
    mBelwKnk = np.linspace(mPlotMin, mKnk, mBelwKnkPts)
    mAbveKnk = np.linspace(mKnk, mPlotMax, mAbveKnkPts)
    mFullPts = np.linspace(mPlotMin, mPlotMax, mBelwKnkPts + mAbveKnkPts)

    plt.figure(figsize=(12, 8))
    plt.plot(mFullPts, baseAgent_Inf.cFunc[0](mFullPts), label=r'$c(m)$')
    plt.plot(mBelwKnk, cFunc_Uncnst(mBelwKnk), label=cMaxLabel, linestyle="--")
    plt.plot(
        mAbveKnk,
        cFunc_Uncnst(mAbveKnk),
        label=
        r'Upper Bound $ = $ Min $[\overline{\overline{c}}(m),\overline{c}(m)]$',
        linewidth=2.5,
        color='black')
    plt.plot(mBelwKnk, cFunc_TopBnd(mBelwKnk), linewidth=2.5, color='black')
    plt.plot(mAbveKnk,
             cFunc_TopBnd(mAbveKnk),
             linestyle="--",
             label=r"$\overline{\overline{c}}(m) = κ̅m = (1 - ℘^{1/ρ}Φᵣ)m$")
    plt.plot(mBelwKnk, cFunc_BotBnd(mBelwKnk), color='red', linewidth=2.5)
    plt.plot(mAbveKnk,
             cFunc_BotBnd(mAbveKnk),
             color='red',
             label=cMinLabel,
             linewidth=2.5)
    plt.tick_params(labelbottom=False,
                    labelleft=False,
                    left='off',
                    right='off',
                    bottom='off',
                    top='off')
    plt.xlim(mPlotMin, mPlotMax)
    plt.ylim(mPlotMin, 1.12 * cFunc_Uncnst(mPlotMax))
    plt.text(mPlotMin,
             1.12 * cFunc_Uncnst(mPlotMax) + 0.05,
             "$c$",
             fontsize=22)
    plt.text(mPlotMax + 0.1, mPlotMin, "$m$", fontsize=22)
    plt.legend(fontsize='x-large')
    plt.show()
    return None
Exemple #5
0
def makeGrowthplot(PermGroFac, DiscFac):
    # cycles=0 tells the solver to find the infinite horizon solution
    baseAgent_Inf = IndShockConsumerType(verbose=0, cycles=0, **base_params)
    baseAgent_Inf.PermGroFac = [PermGroFac]
    baseAgent_Inf.DiscFac = DiscFac
    baseAgent_Inf.updateIncomeProcess()
    baseAgent_Inf.checkConditions()
    baseAgent_Inf.solve()
    baseAgent_Inf.unpack('cFunc')
    if (baseAgent_Inf.GPFInd >= 1):
        baseAgent_Inf.checkGICInd(verbose=3)
    elif baseAgent_Inf.solution[0].mNrmSS > 3.5:
        print('Solution exists but is outside the plot range.')
    else:

        def EcLev_tp1_Over_p_t(a):
            '''
            Taking end-of-period assets a as input, return ratio of expectation 
            of next period's consumption to this period's permanent income 

            Inputs:
               a: end-of-period assets
            Returns:
               EcLev_tp1_Over_p_{t}: next period's expected c level / current p
            '''
            # Extract parameter values to make code more readable
            permShkVals = baseAgent_Inf.PermShkDstn[0].X
            tranShkVals = baseAgent_Inf.TranShkDstn[0].X
            permShkPrbs = baseAgent_Inf.PermShkDstn[0].pmf
            tranShkPrbs = baseAgent_Inf.TranShkDstn[0].pmf
            Rfree = baseAgent_Inf.Rfree
            EPermGroFac = baseAgent_Inf.PermGroFac[0]

            PermGrowFac_tp1 = EPermGroFac * permShkVals  # Nonstochastic growth times idiosyncratic permShk
            RNrmFac_tp1 = Rfree / PermGrowFac_tp1  # Growth-normalized interest factor
            # 'bank balances' b = end-of-last-period assets times normalized return factor
            b_tp1 = RNrmFac_tp1 * a
            # expand dims of b_tp1 and use broadcasted sum of a column and a row vector
            # to obtain a matrix of possible market resources next period
            # because matrix mult is much much faster than looping to calc E
            m_tp1_GivenTranAndPermShks = np.expand_dims(b_tp1,
                                                        axis=1) + tranShkVals
            # List of possible values of $\mathbf{c}_{t+1}$ (Transposed by .T)
            cRat_tp1_GivenTranAndPermShks = baseAgent_Inf.cFunc[0](
                m_tp1_GivenTranAndPermShks).T
            cLev_tp1_GivenTranAndPermShks = cRat_tp1_GivenTranAndPermShks * PermGrowFac_tp1
            # compute expectation over perm shocks by right multiplying with probs
            EOverPShks_cLev_tp1_GivenTranShkShks = np.dot(
                cLev_tp1_GivenTranAndPermShks, permShkPrbs)
            # finish expectation over trans shocks by right multiplying with probs
            EcLev_tp1_Over_p_t = np.dot(EOverPShks_cLev_tp1_GivenTranShkShks,
                                        tranShkPrbs)
            # return expected consumption
            return EcLev_tp1_Over_p_t

        # Calculate the expected consumption growth factor
        # mBelwTrg defines the plot range on the left of target m value (e.g. m <= target m)
        mNrmTrg = baseAgent_Inf.solution[0].mNrmSS
        mBelwTrg = np.linspace(1, mNrmTrg, 50)
        c_For_mBelwTrg = baseAgent_Inf.cFunc[0](mBelwTrg)
        a_For_mBelwTrg = mBelwTrg - c_For_mBelwTrg
        EcLev_tp1_Over_p_t_For_mBelwTrg = [
            EcLev_tp1_Over_p_t(i) for i in a_For_mBelwTrg
        ]

        # mAbveTrg defines the plot range on the right of target m value (e.g. m >= target m)
        mAbveTrg = np.linspace(mNrmTrg, 3.5, 50)

        # EcGro_For_mAbveTrg: E [consumption growth factor] when m_{t} is below target m
        EcGro_For_mBelwTrg = np.array(
            EcLev_tp1_Over_p_t_For_mBelwTrg) / c_For_mBelwTrg

        c_For_mAbveTrg = baseAgent_Inf.cFunc[0](mAbveTrg)
        a_For_mAbveTrg = mAbveTrg - c_For_mAbveTrg
        EcLev_tp1_Over_p_t_For_mAbveTrg = [
            EcLev_tp1_Over_p_t(i) for i in a_For_mAbveTrg
        ]

        # EcGro_For_mAbveTrg: E [consumption growth factor] when m_{t} is bigger than target m_{t}
        EcGro_For_mAbveTrg = np.array(
            EcLev_tp1_Over_p_t_For_mAbveTrg) / c_For_mAbveTrg

        Rfree = 1.0
        EPermGroFac = 1.0
        mNrmTrg = baseAgent_Inf.solution[0].mNrmSS

        # Calculate Absolute Patience Factor Phi = lower bound of consumption growth factor
        APF = (Rfree * DiscFac)**(1.0 / CRRA)

        plt.figure(figsize=(12, 8))
        # Plot the Absolute Patience Factor line
        plt.plot([0, 3.5], [APF, APF],
                 label="\u03A6 = [(\u03B2 R)^(1/ \u03C1)]/R")

        # Plot the Permanent Income Growth Factor line
        plt.plot([0, 3.5], [EPermGroFac, EPermGroFac], label="\u0393")

        # Plot the expected consumption growth factor on the left side of target m
        plt.plot(mBelwTrg, EcGro_For_mBelwTrg, color="black")

        # Plot the expected consumption growth factor on the right side of target m
        plt.plot(mAbveTrg,
                 EcGro_For_mAbveTrg,
                 color="black",
                 label="$\mathsf{E}_{t}[c_{t+1}/c_{t}]$")

        # Plot the target m
        plt.plot(
            [mNrmTrg, mNrmTrg],
            [0, 3.5],
            color="black",
            linestyle="--",
            label="",
        )
        plt.xlim(1, 3.5)
        plt.ylim(0.94, 1.10)
        plt.text(2.105, 0.930, "$m_{t}$", fontsize=26, fontweight="bold")
        plt.text(
            mNrmTrg - 0.02,
            0.930,
            "m̌",
            fontsize=26,
            fontweight="bold",
        )
        plt.tick_params(
            labelbottom=False,
            labelleft=False,
            left="off",
            right="off",
            bottom="off",
            top="off",
        )
        plt.legend(fontsize='x-large')
        plt.show()
        return None
Exemple #6
0
def makeGICFailExample(DiscFac, PermShkStd, UnempPrb):

    # Construct the "GIC fails" example.

    GIC_fails_dictionary = dict(base_params)
    GIC_fails_dictionary['Rfree'] = 1.04
    GIC_fails_dictionary['PermGroFac'] = [1.00]
    GICFailsExample = IndShockConsumerType(
        verbose=0,
        cycles=0,  # cycles=0 makes this an infinite horizon consumer
        **GIC_fails_dictionary)
    GICFailsExample.DiscFac = DiscFac
    GICFailsExample.PermShkStd = [PermShkStd]
    GICFailsExample.UnempPrb = UnempPrb
    GICFailsExample.updateIncomeProcess()
    GICFailsExample.checkConditions()

    # Get calibrated parameters to make code more readable
    LivPrb = GICFailsExample.LivPrb[0]
    Rfree = GICFailsExample.Rfree
    DiscFac = GICFailsExample.DiscFac
    CRRA = GICFailsExample.CRRA

    permShkPrbs = GICFailsExample.PermShkDstn[0].pmf
    permShkVals = GICFailsExample.PermShkDstn[0].X
    EPermGroFac = GICFailsExample.PermGroFac[0]

    # np.dot multiplies vectors; probability times value for each outcome is expectation
    EpermShkInv = np.dot(permShkPrbs,
                         permShkVals**(-1))  # $   \Ex[\permShk^{-1}]      $
    InvEpermShkInv = (EpermShkInv)**(-1)  # $  (\Ex[\permShk^{-1}])^{-1}$
    PermGroFac = EPermGroFac * InvEpermShkInv  # Uncertainty-adjusted permanent growth factor
    ERNrmFac = Rfree / PermGroFac  # Interest factor normalized by uncertainty-adjusted growth
    ErNrmRte = ERNrmFac - 1  # Interest rate is interest factor - 1
    # "sustainable" C = P + (discounted) interest income
    # "sustainable" c = 1 + (discounted, normalized) interest income
    EmDelEq0 = lambda m: 1 + (m - 1) * (ErNrmRte / ERNrmFac
                                        )  # "sustainable" c where E[Δ m] = 0

    GICFailsExample.solve(
    )  # Above, we set up the problem but did not solve it
    GICFailsExample.unpack(
        'cFunc'
    )  # Make the consumption function easily accessible for plotting

    mPlotMin = 0
    mPts = 1000
    m = np.linspace(mPlotMin, 5, mPts)
    c_Limt = GICFailsExample.cFunc[0](m)
    c_Sstn = EmDelEq0(m)  # "sustainable" consumption

    plt.figure(figsize=(12, 8))
    plt.plot(m, c_Limt, label="$c(m_{t})$")
    plt.plot(m, c_Sstn, label="$\mathsf{E}_{t}[\Delta m_{t+1}] = 0$")
    plt.xlim(0, 5.5)
    plt.ylim(0, 1.6)
    plt.tick_params(
        labelbottom=False,
        labelleft=False,
        left="off",
        right="off",
        bottom="off",
        top="off",
    )
    plt.legend(fontsize='x-large')
    plt.show()
    print(f'Current Growth Impatience Factor is {GICFailsExample.GPFInd}')
    return None
Exemple #7
0
#
# To see all the parameters used in the model, along with their default values, see $\texttt{ConsumerParameters.py}$
#
# Parameter values are stored as attributes of the $\texttt{ConsumerType}$ the values are used for. For example, the risk-free interest rate $\texttt{Rfree}$ is stored as $\texttt{BaselineExample.Rfree}$. Because we created $\texttt{BaselineExample}$ using the default parameters values at the moment $\texttt{BaselineExample.Rfree}$ is set to the default value of $\texttt{Rfree}$ (which, at the time this demo was written, was 1.03).  Therefore, to change the risk-free interest rate used in $\texttt{BaselineExample}$ to (say) 1.02, all we need to do is:
#
# -

# Change the Default Riskfree Interest Rate
BaselineExample.Rfree = 1.02

# +
## Change some parameter values
BaselineExample.Rfree       = 1.02 #change the risk-free interest rate
BaselineExample.CRRA        = 2.   # change  the coefficient of relative risk aversion
BaselineExample.BoroCnstArt = -.3  # change the artificial borrowing constraint
BaselineExample.DiscFac     = .5   #chosen so that target debt-to-permanent-income_ratio is about .1
                                   # i.e. BaselineExample.solution[0].cFunc(.9) ROUGHLY = 1.

## There is one more parameter value we need to change.  This one is more complicated than the rest.
## We could solve the problem for a consumer with an infinite horizon of periods that (ex-ante)
## are all identical.  We could also solve the problem for a consumer with a fininite lifecycle,
## or for a consumer who faces an infinite horizon of periods that cycle (e.g., a ski instructor
## facing an infinite series of winters, with lots of income, and summers, with very little income.)
## The way to differentiate is through the "cycles" attribute, which indicates how often the
## sequence of periods needs to be solved.  The default value is 1, for a consumer with a finite
## lifecycle that is only experienced 1 time.  A consumer who lived that life twice in a row, and
## then died, would have cycles = 2.  But neither is what we want.  Here, we need to set cycles = 0,
## to tell HARK that we are solving the model for an infinite horizon consumer.


## Note that another complication with the cycles attribute is that it does not come from
def makeBoundsFigure(UnempPrb, permShkStd, TranShkStd, DiscFac, CRRA):
    inf_hor = IndShockConsumerType(quietly=True,
                                   messaging_level=logging.CRITICAL,
                                   **base_params)
    inf_hor.UnempPrb = UnempPrb
    inf_hor.permShkStd = [permShkStd]
    inf_hor.TranShkStd = [TranShkStd]
    inf_hor.DiscFac = DiscFac
    inf_hor.CRRA = CRRA
    inf_hor.update_income_process()

    inf_hor.solve(quietly=True, messaging_level=logging.CRITICAL)
    soln = inf_hor.solution[0]
    Bilt, Pars = soln.Bilt, soln.Pars

    cFunc = soln.cFunc
    mPlotMin, mPlotMax = 0, 25
    inf_hor.aXtraMax = mPlotMax

    # Retrieve parameters (makes code more readable)
    Rfree, EPermGroFac = Pars.Rfree, Pars.PermGroFac

    κ_Min = 1.0 - (Rfree**(-1.0)) * (Rfree * DiscFac)**(1.0 / CRRA)
    h_inf = (1.0 / (1.0 - EPermGroFac / Rfree))

    def cFunc_Uncnst(mVec):
        return (h_inf - 1) * κ_Min + κ_Min * mVec

    def cFunc_TopBnd(mVec):
        return (1 - UnempPrb**(1.0 / CRRA) *
                (Rfree * DiscFac)**(1.0 / CRRA) / Rfree) * mVec

    def cFunc_BotBnd(mVec):
        return (1 - (Rfree * DiscFac)**(1.0 / CRRA) / Rfree) * mVec

    # Plot the consumption function and its bounds
    cPlotMaxLabel = r"c̅$(m) = (m-1+h)κ̲$"  # Use unicode kludge
    cPlotMinLabel = r"c̲$(m)= (1-\Phi_{R})m = κ̲ m$"

    # mKnk is point where the two upper bounds meet
    mKnk = ((h_inf - 1) * κ_Min) / (
        (1 - UnempPrb**(1.0 / CRRA) *
         (Rfree * DiscFac)**(1.0 / CRRA) / Rfree) - κ_Min)
    mBelwKnkPts, mAbveKnkPts = 50, 100
    mBelwKnk = np.linspace(mPlotMin, mKnk, mBelwKnkPts)
    mAbveKnk = np.linspace(mKnk, mPlotMax, mAbveKnkPts)
    mFullPts = np.linspace(mPlotMin, mPlotMax, mBelwKnkPts + mAbveKnkPts)

    plt.figure(figsize=(12, 8))
    plt.plot(mFullPts, cFunc(mFullPts), label=r'$c(m)$')
    plt.plot(mBelwKnk,
             cFunc_Uncnst(mBelwKnk),
             label=cPlotMaxLabel,
             linestyle="--")
    plt.plot(
        mAbveKnk,
        cFunc_Uncnst(mAbveKnk),
        label=
        r'Upper Bound $ = $ Min $[\overline{\overline{c}}(m),\overline{c}(m)]$',
        linewidth=2.5,
        color='black')
    plt.plot(mBelwKnk, cFunc_TopBnd(mBelwKnk), linewidth=2.5, color='black')
    plt.plot(mAbveKnk,
             cFunc_TopBnd(mAbveKnk),
             linestyle="--",
             label=r"$\overline{\overline{c}}(m) = κ̅m = (1 - ℘^{1/ρ}Φᵣ)m$")
    plt.plot(mBelwKnk, cFunc_BotBnd(mBelwKnk), color='red', linewidth=2.5)
    plt.plot(mAbveKnk,
             cFunc_BotBnd(mAbveKnk),
             color='red',
             label=cPlotMinLabel,
             linewidth=2.5)
    plt.tick_params(labelbottom=False,
                    labelleft=False,
                    left='off',
                    right='off',
                    bottom='off',
                    top='off')
    plt.xlim(mPlotMin, mPlotMax)
    plt.ylim(mPlotMin, 1.12 * cFunc_Uncnst(mPlotMax))
    plt.text(mPlotMin,
             1.12 * cFunc_Uncnst(mPlotMax) + 0.05,
             "$c$",
             fontsize=22)
    plt.text(mPlotMax + 0.1, mPlotMin, "$m$", fontsize=22)
    plt.legend(fontsize='x-large')
    plt.show()
    return None