% --------------------------------------------------------------
%                         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 Professor: \textit{Benjamin Griffy}\\ Due: \textit{May 8th, 2025}\\ AECO 701}

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

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

\noindent \textbf{Problem 1: Solving the McCall Model}
Consider a McCall model of labor market dynamics. Agents can be in one of two states: employed or unemployed. When unemployed, agents receive a job offer at rate $\lambda$ and enjoy $b$ units of leisure utility. Any job offer they receive is a wage $w$ drawn from a known distribution $F(\cdot)$ with support $[\underline{w},\bar{w}]$. Once employed, workers receive $w$ income as utility (agents are risk neutral), and separate from their employer at rate $\delta$. They discount the future at rate $\beta$ and time is discrete. The Bellman Equation of an unemployed worker is given by

\begin{align}
  U = b + \beta[\lambda\int_{\underline{w}}^{\bar{w}}\max\{V(w),U\}dF(w) + (1 - \lambda)U]
\end{align}

The Bellman Equation of an employed worker is given by

\begin{align}
  V(w) = w + \beta[(1 - \delta)V(w) + \delta U]
\end{align}

\begin{enumerate}[label=\textbf{\alph*})]
\item Define the equilibrium in this model.

\item Solve for an analytical expression that characterizes the reservation wage. This will be an implicit function. Recall that the reservation wage is defined as $V(w_{R}) = U$.

\item Assume the following values and functional forms (from Hornstein, Krussell, Violante, 2011): $\lambda = 0.43$, $b = 0.4$, $\delta = 0.03$, $\beta = 0.99$, and $F(\cdot)$ is distributed log-normally with $\mu = 0.5, \sigma = 2.5$. Solve for the numerical value of the reservation wage in this context (use fsolve on your expression for $w_{R} - f(w_{R}) = 0$).

\item Now, instead of solving the reservation wage equation directly, use value function iteration on the two Bellman equations. To do this, set up a grid of wages over the wage distribution and iterate to convergence. Compare your solutions. Choose $V(w)_{0} = 0$ and $U = 0$ as your initial points (you could also choose $V(w)_{0} = \frac{b}{1 - \beta}$ and $U = \frac{b}{1 - \beta}$. Why?)

\end{enumerate}
% \newpage

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

\end{document}
