\documentclass[./BufferStockTheory.tex]{subfiles}

\begin{document}

%\begin{verbatimwrite}{\ApndxDir/ApndxSolnMethTermFunc.tex}
\section{The Terminal/Limiting Consumption Function}

  For any set of parameter values that satisfy the conditions required
  for convergence, the problem can be solved by setting the terminal
  consumption function to $\cFunc_{T}(\mRat) = \mRat$ and constructing
  $\{\cFunc_{T-1}, \cFunc_{T-2}, ... \}$ by time iteration (a method
  that will converge to $\cFunc(m)$ by standard theorems).  But $\cFunc_{T}(\mRat)=\mRat$ is very far from
  the final converged consumption rule $\cFunc(\mRat)$,\footnote{Unless $\Discount \approx +0.$} and thus many
  periods of iteration will likely be required to obtain a candidate rule
  that even remotely resembles the converged function.

A natural alternative choice for the terminal consumption rule is the solution to the perfect foresight liquidity constrained problem, to which the model's solution converges (under specified parametric restrictions) as all forms of uncertainty approach zero (as discussed in the main text).  But a difficulty with this idea is that the perfect foresight liquidity constrained solution is `kinked:' The slope of the consumption function changes discretely at the points $\{\mRat^{1}_{\#},\mRat^{2}_{\#},...\}$.  This is a practical problem because it rules out the use of derivatives of the consumption function in the approximate representation of $\cFunc(\mRat)$, thereby preventing the enormous increase in efficiency obtainable from a higher-order approximation.

Our solution is simple: The formulae in appendix
\ref{sec:ApndxLiqConstr} that identify kink points on
$\mathring{\cFunc}(\mRat)$ for integer values of $n$ (e.g.,
$\cRat_{\#}^{n} = \PatPGro^{-n}$) are continuous functions of $n$; the
conclusion that $\mathring{\cFunc}(\mRat)$ is piecewise linear
between the kink points does not require that the {\it terminal
  consumption rule} (from which time iteration proceeds) also be
piecewise linear.  Thus, for values $n \geq 0$ we can construct a
smooth function $\breve{\cFunc}(m)$ that matches the true perfect foresight
liquidity constrained consumption function at the set of points
corresponding to integer periods in the future, but satisfies the
(continuous, and greater at non-kink points) consumption rule defined from the
appendix's formulas by noninteger values of $n$ at other
points.\footnote{In practice, we calculate the first and second
  derivatives of $\mathring{\cFunc}$ and use piecewise polynomial
  approximation methods that match the function at these points.}


This strategy generates a smooth limiting consumption function --
except at the remaining kink point defined by
$\{\mRat_{\#}^{0},\cRat_{\#}^{0}\}$.  Below this point, the solution
must match $\cFunc(\mRat)=\mRat$ because the constraint is binding.
At $\mRat=\mRat_{\#}^{0}$ the MPC discretely drops (that is,
$\lim_{\mRat \uparrow \mRat^{0}_{\#}} \cFunc^{\prime}(\mRat)= 1$ while
$\lim_{\mRat \downarrow \mRat^{0}_{\#}}\cFunc^{\prime}(\mRat) =
\kappa_{\#}^{0} < 1$).

Such a kink point causes substantial problems for numerical solution methods (like the one we use, described below) that rely upon the smoothness of the limiting consumption function.

Our solution is to use, as the terminal consumption rule, a function
that is identical to the (smooth) continuous consumption rule
$\breve{\cFunc}(\mRat)$ above some $n \geq \underline{n}$, but to
replace $\breve{\cFunc}(\mRat)$ between $\mRat_{\#}^{0}$ and
$\mRat_{\#}^{\underline{n}}$ with the unique polynomial function
$\hat{\cFunc}(\mRat)$ that satisfies the following criteria:
\begin{enumerate}
\item $\hat{\cFunc}(\mRat_{\#}^{0})  = \cRat_{\#}^{0}$
\item $\hat{\cFunc}^{\prime}(\mRat_{\#}^{0}) = 1$
\item $\hat{\cFunc}^{\prime}(\mRat_{\#}^{\underline{n}}) = (d \cFunc_{\#}^{n}/d n)(d \mFunc_{\#}^{n}/d n)^{-1}|_{n=\underline{n}}$
\item $\hat{\cFunc}^{\prime\prime}(\mRat_{\#}^{\underline{n}}) = (d^{2} \cFunc_{\#}^{n}/d n^{2})(d^{2} \mFunc_{\#}^{n}/d n^{2})^{-1}|_{n=\underline{n}}$
\end{enumerate}
where $\underline{n}$ is chosen judgmentally in a way calculated to
generate a good compromise between smoothness of the limiting
consumption function $\breve{\cFunc}(\mRat)$ and fidelity of that
function to the $\mathring{\cFunc}(\mRat)$ (see the actual code for
details).

We thus define the terminal function as\footnote{For further details see the archive file \texttt{./CoreCode/Documentation/cTerminal.nb}.}
\begin{equation}
\cFunc_{T}(\mRat) =
\begin{cases}
 0 < \mRat \leq \mRat_{\#}^{0} & \mRat \\
 \mRat_{\#}^{0} < \mRat < \mRat_{\#}^{\underline{n}}      & \breve{\cFunc}(m) \\
 \mRat_{\#}^{\underline{n}} < \mRat  & \mathring{\cFunc}(m)
\end{cases}
\end{equation}

Since the precautionary motive implies that in the presence of
uncertainty the optimal level of consumption is below the level that is
optimal without uncertainty, and since $\breve{\cFunc}(\mRat) \geq \mathring{\cFunc}(\mRat)$,
implicitly defining $\mRat = e^{\mu}$ (so that $\mu = \log m$), we can construct
\begin{eqnarray}
 \chi_{t}(\mu) & = & \log (1-\cFunc_{t}(e^{\mu})/\cFunc_{T}(e^{\mu}))  \label{eq:ChiDef}
\end{eqnarray}
which must be a number between $-\infty$ and $+\infty$ (since $0 < \cFunc_{t}(\mRat) < \breve{\cFunc}(\mRat)$ for $\mRat > 0$).  This function turns out to be much better behaved (as
a numerical observation; no formal proof is offered) than the level of the optimal consumption rule $\cFunc_{t}(m)$.  In particular, $\chi_{t}(\mu)$ is well approximated by linear functions both as $\mRat \downarrow 0$ and as $\mRat \uparrow \infty$.

Differentiating with respect to $\mu$ and dropping consumption function arguments
yields
\begin{eqnarray}
 \chi^{\prime}_{t}(\mu) & = & \left(\frac{-\left(\frac{\cFunc^{\prime}_{t}\cFunc_{T}-\cFunc_{t}\cFunc_{T}^{\prime}}{\cFunc_{T}^{2}}e^{\mu}\right)}{1-\cFunc_{t}/\cFunc_{T}}\right) \label{eq:ChiPDef}
\end{eqnarray}
which can be solved for
\begin{eqnarray}
% \chi^{\prime}(\mu) \cFunc_{T}^{2} (1-\cFunc_{t}/\cFunc_{T})e^{-\mu} & = & (\cFunc_{t}\cFunc_{T}^{\prime}-\cFunc^{\prime}_{t}\cFunc_{T})
%\\ \cFunc^{\prime}_{t}\cFunc_{T} & = & \cFunc_{t}\cFunc_{T}^{\prime}-\chi^{\prime}(\mu) \cFunc_{T}^{2} (1-\cFunc_{t}/\cFunc_{T})e^{-\mu} \\
 \cFunc^{\prime}_{t} & = & (\cFunc_{t}\cFunc_{T}^{\prime}/\cFunc_{T})-((\cFunc_{T}-\cFunc_{t})/\mRat)\chi^{\prime}_{t} \label{eq:cFuncPFromChi}.
\end{eqnarray}

\begin{comment} % The derivation below shows basically that $\chi^{\prime}$ is undefined at $\mu_{t}=-\infinity$ (where $\cFunc(m) \rightarrow \cFunc^{\prime}m$ and similarly for $\cFunc_{T}(m)$; this demonstrates the necessity of using L'Hopital's rule to obtain a limit
\begin{eqnarray}
 \lim_{\mu \downarrow -\infty} \chi^{\prime}(\mu) & = & \left(\frac{-\left(\frac{\cFunc^{\prime}_{t}\cFunc_{T}^{\prime}\mRat-\cFunc_{t}^{\prime}\mRat\cFunc_{T}^{\prime}}{(\cFunc_{T}^{\prime}\mRat)^{2}}\mRat\right)}{(\cFunc_{T}^{\prime}\mRat-\cFunc_{t}^{\prime}\mRat)/\cFunc_{T}^{\prime}\mRat}\right)
\\ & = & \left(\frac{-\left(\frac{\cFunc^{\prime}_{t}\cFunc_{T}^{\prime}-\cFunc_{t}^{\prime}\cFunc_{T}^{\prime}}{(\cFunc_{T}^{\prime})^{2}}\right)}{(\cFunc_{T}^{\prime}-\cFunc_{t}^{\prime})/\cFunc_{T}^{\prime}}\right)
\\ & = & \left(\frac{-\left(\cFunc^{\prime}_{t}\cFunc_{T}^{\prime}-\cFunc_{t}^{\prime}\cFunc_{T}^{\prime}\right)}{(\cFunc_{T}^{\prime}-\cFunc_{t}^{\prime})\cFunc_{T}^{\prime}}\right)
\end{eqnarray}
\end{comment}

Similarly, we can solve \eqref{eq:ChiDef} for
\begin{eqnarray}
    \cFunc_{t}(\mRat) & = & \left(1-e^{\chi_{t}(\log \mRat)}\right)\cFunc_{T}(\mRat) \label{eq:cFuncFromChi}.
%\\ \cFunc_{t}^{\prime}(e^{\mu})e^{\mu} & = & -e^{\chi(\mu)}\chi^{\prime}\cFunc_{T}(e^{\mu})+\left(1-e^{\chi(\mu)}\right)\cFunc_{T}(e^{\mu})
\end{eqnarray}

Thus, having approximated $\chi_{t}$, we can recover from it
the level and derivative(s) of $\cFunc_{t}$.\footnote{See
\texttt{./CoreCode/Documentation/Derivations.nb} for implementation
details and further derivations.}

%\end{verbatimwrite}%\input {\ApndxDir/ApndxSolnMethTermFunc.tex}

\end{document}
