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

\documentclass[11pt]{article}

\usepackage{amsmath,amsthm,amssymb}
\usepackage{cancel}
\usepackage[margin=1in]{geometry}
\usepackage{graphicx}
\usepackage{hyperref}
% \usepackage{listings}
\usepackage{xcolor}
\usepackage{enumitem}
\usepackage[procnames]{listings}

\lstset{language=Python,
        basicstyle=\ttfamily\small,
        keywordstyle=\color{keywords},
        commentstyle=\color{green},
        stringstyle=\color{red},
        showstringspaces=false,
        identifierstyle=\color{black},
        procnamekeys={def,class}}


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

\begin{document}

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

{\noindent Instructor: \textit{Benjamin Griffy}\\ Due: \textit{Feb., 3rd 2022}\\ AECO 701}

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

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

\noindent \textbf{Problem 1: Getting Intuition for Grid Search}
Consider the following stylized consumption-savings model. Agents live for two periods. During period 1, they earn income $m$, and must choose to allocate their resources between consumption today $c_{1}$ and savings, $a$. During period 2, they earn interest on their savings and consume all of their budget, $c_{2} = (1 + r)a$. After period 2, they exit the model. Their dynamic problem is given by the following:

\begin{align}
  \max_{c_{1},c_{2},a}\; &u(c_{1}) + \beta u(c_{2})\\
  \text{s.t. }\;& c_{1} + a \leq m\\
  &c_{2} \leq (1 + r)a
\end{align}


\begin{enumerate}[label=\textbf{\alph*})]
\item Characterize the optimal policies ($c_{1}, c_{2}, a$) analytically (by hand) for any $\beta$, $r$, $u(c)$.


\item Assume that utility is power utility, $u(c) = \frac{c^{1 - \sigma}}{1 - \sigma}$, with $\sigma = 2$, and that $r = 0.04$ and $\beta = \frac{1}{1 + r}$. Set up an income grid from 1 to 10 with 10 grid points (like we did in class). Set up an asset grid with 10 points and solve for the optimal consumption decisions in periods 1 and 2.


\item Plot the period 1 and 2 consumption decisions as well as the savings (the residual of income minus period 1 consumption) decisions.


\item Now, using the analytical solutions that you found from part (a), find the ``true'' consumption and savings decisions. Use the parameter assumptions and values in part (b), and then plug in the income grid specified in part (b). This is the exact solution of the model. Compare the values that you find here to the approximate solution you found in part (c) by plotting your exact solution and the approximate solution on the same graph for consumption (periods 1 and 2) and savings.

\item Why are the results different when you get an exact solution versus an approximate solution? What would improve the accuracy of the approximate solution?

\end{enumerate}
% \newpage

% \lstinputlisting[language=Python]{PS1_Solution.py}
% --------------------------------------------------------------
%                         End here
% --------------------------------------------------------------

\end{document}
