% --------------------------------------------------------------
%                         Preamble
% --------------------------------------------------------------

\documentclass[11pt]{article}
\usepackage{amsmath,amsthm,amssymb}
\usepackage{cancel}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{hyperref}
\usepackage{listings}
\usepackage{xcolor}
\usepackage{enumitem}

\newcommand{\E}{\mathbb{E}}
\newcommand{\argmin}{\operatornamewithlimits{argmin}}
\newcommand{\argmax}{\operatornamewithlimits{argmax}}

\begin{document}

% --------------------------------------------------------------
%                         Start here
% --------------------------------------------------------------

{\noindent Instructor: \textit{Professor Griffy}\\ Due: \textit{Mar., 21st 2023}\\ AECO 701}

\begin{center} \Large Problem Set 4 \end{center} \vspace{1em}


% --------------------------------------------------------------
% --------------------------------------------------------------

\noindent \textbf{Income Fluctuations with CARA Utility}
You're asked to study an optimal savings plan when households face fluctuating income. The exponential (or CARA) utility function is tractable and it allows for closed-form solutions using a guess-and-verify method. Consider an agent with the following utility maximization problem:
\begin{equation} \label{eq: 1}
\E \sum\limits_{t=1}^{\infty} \left(\frac{1}{1+\delta} \right)^t u(c_t)
\end{equation}
\begin{center} subject to \end{center}
\begin{equation} \label{eq: 2}
y_t = \phi_0 + \phi_1 y_{t-1} + \varepsilon_t, \: \: \: \varepsilon_t \sim N(0,\sigma)
\end{equation}
\begin{equation} \label{eq: 3}
\delta > 0, \qquad 0 < \phi < 1,
\end{equation}
where utility takes the CARA form $u(c) = -\frac{1}{\theta}e^{-\theta c}$.
\begin{itemize}
\item The recursive formulation of this problem is given by
\begin{equation} \label{eq: 4}
V(A,y) = \max\limits_c \left\{ u(c) + \beta \E[V(A', y')]\right\}
\end{equation}
\begin{equation} \label{eq: 5}
\text{s.t.} \qquad A' = (1+r)A + y - c. \\
\end{equation}
Take the first-order condition in consumption and solve for the within period relationship between assets and consumption. \\\\
\noindent
\textcolor{blue}{
We can construct:
$$\mathcal{L}(A, y) = -\frac{1}{\theta}e^{-\theta c} + \beta \E[V(A', y')] + \lambda [(1+r)A - A' + y - c].$$
And then taking the F.O.C. w.r.t. consumption:
$$\frac{\partial \mathcal{L}}{\partial c} = e^{-\theta c} - \lambda = 0 \Longrightarrow \lambda = e^{-\theta c}.$$
We also know the marginal value obtained from current assets:
$$\frac{\partial \mathcal{L}}{\partial A} = \lambda (1 + r).$$
Thus combining the two we obtain a relationship between assets and consumption within a period: \\
$$\boxed{\frac{\partial \mathcal{L}}{\partial A} = (1+r)e^{-\theta c}.}$$ \\\\
}

% --------------------------------------------------------------

\item Guess that the value function takes the form
\begin{equation} \label{eq: 6}
V(A,y) = - \frac{1}{\theta r}e^{-\theta r (A + ay + \overline{b})}.
\end{equation}
Using the relationship you derived in part (a), show that the candidate optimal consumption rule takes the form
\begin{equation} \label{eq: 7}
c^* = r(A + ay + a_0),
\end{equation}
where we define
\begin{equation} \label{eq: 8}
a_0 = \overline{b} + \frac{1}{\theta r}ln(1+r).
\end{equation}
Note that $a = \frac{1}{1+r- \phi_1}$, which means that $ay$ is the present value of human wealth given by
\begin{equation} \label{eq: 9}
h_t = \sum\limits_{t=0}^{\infty} \left(\frac{1}{1+r} \right)^t y_t = \frac{y_t}{1+r-\phi_1}.
\end{equation} \\
\noindent
\textcolor{blue}{
First, we can invoke the envelope theorem to say that $\frac{\partial \mathcal{L}}{\partial A} = \frac{\partial V}{\partial A}$. That is, using our guess in (6), we find that
$$\frac{\partial \mathcal{L}}{\partial A} = e^{-\theta r(A+ay+\overline{b})}.$$
We can then plug this into our answer in part (a) and do some algebra...
\begin{align*}
e^{-\theta r(A+ay+\overline{b})} & = (1+r)e^{-\theta c} \\
-\theta r(A+ay+\overline{b})&  = -\theta c + ln(1+r) && \text{(taking log of both sides)} \\
c^* & = r(A + ay + \overline{b}) + \frac{1}{\theta}ln(1+r) && \text{(solving for $c^*$)} \\
& = r(A + ay + \overline{b} + \frac{1}{\theta r}ln(1+r)) \\
& = \boxed{r(A + ay + a_0)} && \text{(plugging in for $a_0$)}
\end{align*} \\
}

% --------------------------------------------------------------

\item Using our guess of the value function, we can rewrite the Bellman Equation as
\begin{equation} \label{eq: 10}
V(A,y) = \frac{r}{1+r}V(A,y) - \left(\frac{1}{1+\delta} \right)\frac{1}{\theta r} \E\left[exp\left(-\theta r \left(A' + ay' + \overline{b}\right)\right)\right].
\end{equation}
Plug in the equation for the evolution of assets for $A'$ and the AR(1) process that determines income for $y'$, as well as your guess for $V$, and show that consumption is equal to
\begin{equation} \label{eq: 11}
c = r \left\{A + \frac{1-a+ a\phi_1}{r}y + \frac{a\phi_0}{r}+ \frac{1}{\theta r^2} \left[ln\left(\frac{1+\delta}{1+r} \right) - \ln\left(\E\left[exp\left(-\theta r a \varepsilon '\right)\right]\right)\right] \right\}.
\end{equation}
(Two hints: 1. Derivatives are not required!; 2. Remember that $exp(a+b) = exp(a) \times exp(b)$) \\\\
\noindent
\textcolor{blue}{
We start by subtracting the $V(A,y)$ term on the right over to get it to simplify \textit{slightly}.
\begin{align*}
\left(\frac{1}{1+r} \right)& \cancel{\left(\frac{-1}{\theta r} \right)} exp \{-\theta r (A+ay+\overline{b}) \} \\
& = \left(\frac{1}{1+\delta} \right) \cancel{\left(\frac{-1}{\theta r} \right)} \E \left[exp \left\{-\theta r \left[(1+r)A+y-c+a(\phi_0 + \phi_1 y + \varepsilon ') + \overline{b}\right] \right\} \right]
\end{align*}
Next, note that the expectation term simplifies. We can pull out things that are already determined (i.e. things without primes on them):
\begin{align*}
\Longrightarrow exp \left\{-\theta r\left[(1+r)A + y - c + a\phi_0 + a\phi_1 y + \overline{b}\right] \right\} \E\left[exp \left\{-\theta r a \varepsilon ' \right\}\right].
\end{align*}
Now we can take the $ln$ of both sides:
\begin{align*}
-\theta r (A+ay+\overline{b}) - \ln \left(\frac{1+ \delta}{1+ r} \right) = -\theta r [(1+r)A + y - c + a\phi_0 + a\phi_1 y + \overline{b}] + \ln (\E[exp\{-\theta r a \varepsilon ' \})].
\end{align*}
Isolating the $c$ term:
\begin{align*}
\theta r c = \theta r [(1+r)A + y + a\phi_0 + a \phi_1 y + \overline{b}] - \theta r (A+ay + \overline{b}) + \ln \left(\frac{1+\delta}{1+r} \right) - \ln (\E[exp\{-\theta r a \varepsilon ' \}]).
\end{align*}
Dividing by $\theta r$ and simplifying:
\begin{align*}
c = rA + (1 - a + a\phi_1)y + a\phi_0 + \frac{1}{\theta r}\left[ln \left(\frac{1+\delta}{1+r} \right) - \ln \left(\E\left[exp\left\{-\theta r a \varepsilon '\right\}\right]\right)\right].
\end{align*}
\begin{align*}
\Longrightarrow \boxed{c = r \left\{A + \frac{1-a+ a\phi_1}{r}y + \frac{a\phi_0}{r}+ \frac{1}{\theta r^2} \left[ln\left(\frac{1+\delta}{1+r} \right) - \ln\left(\E\left[exp\left(-\theta r a \varepsilon '\right)\right]\right)\right] \right\}.}
\end{align*} \\
}

% --------------------------------------------------------------

\item Using the method of undetermined coefficients (aka guess and verify - set your two solutions for consumption equal), solve for $\overline{b}$ using your solution obtained in part (b). \\\\
\textcolor{blue}{
First we take our first solution for $c$ given by (7) and plug in for $a_0$ given by (8). Then, setting this equal to our last solution for consumption:
\begin{align*}
\cancel{r(A} + & ay + \overline{b} + \frac{1}{\theta r}\ln(1+r)) \\
& = \cancel{r \{A} + \frac{1-a+ a\phi_1}{r}y + \frac{a\phi_0}{r}+ \frac{1}{\theta r^2} [\ln\left(\frac{1+\delta}{1+r} \right) - \ln(\E[exp(-\theta r a \varepsilon ')])] \}
\end{align*}
Grouping terms together:
\begin{align*}
\overline{b} & = \left(\frac{1- a + a\phi_1}{r} - a \right)y + \frac{a\phi_0}{r} + \frac{1}{\theta r^2}\left[\ln \left(\frac{1+\delta}{1+r} \right) - \ln(\E[exp(-\theta r a \varepsilon ')])- r\ln(1+r)\right] \\
& = \underbrace{\Big(\frac{1-a\overbrace{(1+r-\phi_1)}^{=1/a}}{r} \Big)y}_{\text{\normalsize{$= 0$}}} + \frac{a \phi_0}{r}+ \frac{1}{\theta r^2}\left[\ln\left(\frac{1+\delta}{1+r} \right) - \ln(\E[exp(-\theta r a \varepsilon ')]) - r\ln(1+r)\right] \\
\end{align*}
$$\Longrightarrow \boxed{\overline{b} = \frac{a\phi_0}{r} + \frac{1}{\theta r^2}\left[ln\left(\frac{1+\delta}{1+r} \right) - \ln(\E[exp(-\theta r a \varepsilon ')]) - rln(1+r)\right]}$$ \\\\
}

% --------------------------------------------------------------

\item Show that this solution for consumption can be written as
\begin{equation} \label{eq: 12}
c^* = r(A + h - \Gamma (r)),
\end{equation}
where $h = a(y+ \frac{\phi_0}{r})$ is human wealth and $\Gamma (r) = \frac{1}{\theta r^2}[ln(\E[exp(-\theta r a \varepsilon')]) - ln(\frac{1+\delta}{1+r})]$ is the difference between precautionary savings and impatience caused by a distaste for lower consumption. \\\\
\textcolor{blue}{
Recall that our expression for consumption was given by $c = r(A + ay + \overline{b} + \frac{1}{\theta r}ln(1+r))$ (plug (8) into (7)). Plugging what we found for $\overline{b}$ and simplifying:
\begin{align*}
c^* & = r \{ A + ay + \frac{a \phi_0}{r} + \frac{1}{\theta r^2} \Big[\ln \left(\frac{1+\delta}{1+r} \right) - \ln(\E[exp(-\theta r a \varepsilon ')]) - \cancel{r\ln(1+r)}\Big] + \cancel{\frac{1}{\theta r}\ln(1+r)} \} \\\\
& = r \Big\{ A + \underbrace{a\left(y + \frac{\phi_0}{r} \right)}_{\text{\normalsize{$h$}}} - \underbrace{\frac{1}{\theta r^2}\Big[\ln(\E[exp(-\theta r a \varepsilon')]) - \ln \left(\frac{1+\delta}{1+r} \right)\Big]}_{\text{\normalsize{$\Gamma (r)$}}} \Big\} \\
\end{align*}
$$\Longrightarrow \boxed{c^* = r(A + h - \Gamma (r))}$$ \\
}
\end{itemize}
% --------------------------------------------------------------
% --------------------------------------------------------------

% --------------------------------------------------------------
%                         End here
% --------------------------------------------------------------
\end{document}
