%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Beamer Presentation
% LaTeX Template
% Version 1.0 (10/11/12)
%
% This template has been downloaded from:
% http://www.LaTeXTemplates.com
%
% License:
% CC BY-NC-SA 3.0 (http://creativecommons.org/licenses/by-nc-sa/3.0/)
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% ----------------------------------------------------------------------------------------
%	PACKAGES AND THEMES
% ----------------------------------------------------------------------------------------

\documentclass[hyperref={colorlinks=true}]{beamer}

\mode<presentation> {

  % The Beamer class comes with a number of default slide themes
  % which change the colors and layouts of slides. Below this is a list
  % of all the themes, uncomment each in turn to see what they look like.

  \usetheme{default}
  % \usetheme{AnnArbor}
  % \usetheme{Antibes}
  % \usetheme{Bergen}
  % \usetheme{Berkeley}
  % \usetheme{Berlin}
  % \usetheme{Boadilla}
  % \usetheme{CambridgeUS}
  % \usetheme{Copenhagen}
  % \usetheme{Darmstadt}
  % \usetheme{Dresden}
  % \usetheme{Frankfurt}
  % \usetheme{Goettingen}
  % \usetheme{Hannover}
  % \usetheme{Ilmenau}
  % \usetheme{JuanLesPins}
  % \usetheme{Luebeck}
  % \usetheme{Madrid}
  % \usetheme{Malmoe}
  % \usetheme{Marburg}
  % \usetheme{Montpellier}
  % \usetheme{PaloAlto}
  % \usetheme{Pittsburgh}
  % \usetheme{Rochester}
  % \usetheme{Singapore}
  % \usetheme{Szeged}
  % \usetheme{Warsaw}

  % As well as themes, the Beamer class has a number of color themes
  % for any slide theme. Uncomment each of these in turn to see how it
  % changes the colors of your current slide theme.

  % \usecolortheme{albatross}
  % \usecolortheme{beaver}
  % \usecolortheme{beetle}
  % \usecolortheme{crane}
  % \usecolortheme{dolphin}
  % \usecolortheme{dove}
  % \usecolortheme{fly}
  % \usecolortheme{lily}
  % \usecolortheme{orchid}
  \usecolortheme{rose}
  % \usecolortheme{seagull}
  % \usecolortheme{seahorse}
  % \usecolortheme{whale}
  % \usecolortheme{wolverine}

  % \setbeamertemplate{footline} % To remove the footer line in all slides uncomment this line
  % \setbeamertemplate{footline}[page number] % To replace the footer line in all slides with a simple slide count uncomment this line

  % \setbeamertemplate{navigation symbols}{} % To remove the navigation symbols from the bottom of all slides uncomment this line
}

\usepackage{graphicx} % Allows including images
\usepackage{booktabs} % Allows the use of \toprule, \midrule and \bottomrule in tables
\usepackage{cancel}
\usepackage{amsmath}
\usepackage{amssymb}
% \usepackage{showframe}
\usepackage{caption}

%\usepackage{subcaption}
\usepackage{tcolorbox}
\usepackage{tikz}
\usepackage{tabularx}
\usepackage{array}
\usepackage{pgfplots}
\tcbuselibrary{skins}


\usepackage{subfig}
\beamertemplatenavigationsymbolsempty
\usepackage{color, colortbl}
\definecolor{LRed}{rgb}{1,.8,.8}
\definecolor{MRed}{rgb}{1,.6,.6}

\usepackage{tikz}
\usetikzlibrary{shapes,arrows,shapes.multipart,fit,shapes.misc,positioning}
\newcommand{\der}[2]{\frac{\partial #1}{\partial #2}}
%\usepackage[labelformat=empty]{caption}

\newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}}

\newcommand\marktopleft[1]{%
    \tikz[overlay,remember picture]
        \node (marker-#1-a) at (0,1.5ex) {};%
}
\newcommand\markbottomright[1]{%
    \tikz[overlay,remember picture]
        \node (marker-#1-b) at (7ex,0) {};%
    \tikz[overlay,remember picture,thick,dashed,inner sep=3pt]
        \node[draw=black,rounded corners=0pt,fill=red,opacity=.2,fit=(marker-#1-a.center) (marker-#1-b.center)] {};%
}


% ----------------------------------------------------------------------------------------
%	TITLE PAGE
% ----------------------------------------------------------------------------------------

\title[]{Macro II} % The short title appears at the bottom of every slide, the full
% title is only on the title page

\author{Professor Griffy} % Your name
\institute[University at Albany, SUNY] % Your institution as it will appear on the bottom of
% every slide, may be shorthand to save space
{
UAlbany  \ % Your institution for the title page
}
\date{Spring 2022} % Date, can be changed to a custom date

\begin{document}

\begin{frame}
  \titlepage % Print the title page as the first slide
\end{frame}



%----------------------------------------------------------------------------------------
%	PRESENTATION SLIDES
%----------------------------------------------------------------------------------------

% ------------------------------------------------
\section{Introduction} % Sections can be created in order to organize your presentation into discrete blocks, all sections and subsections are automatically printed in the table of contents as an overview of the talk
% ------------------------------------------------

\begin{frame}
  \frametitle{Announcements}
  \begin{itemize}
  \item Today: the Mortensen and Pissarides model (canonical equilibrium search)
  \item Homework on my website.
  \item Code for Aiyagari w/ labor-leisure choice on the cluster.
  \item Due Thursday
  \end{itemize}
\end{frame}

% ------------------------------------------------
\section{The Mortensen and Pissarides Model}
% ------------------------------------------------

\begin{frame}
  \frametitle{Arrival Rates of Job Offers}
  \begin{itemize}
  \item Last time: we assumed that the arrival rate of job offers is {\it exogenous}: regardless of equilibrium, the frequency with which you receive an offer is the same.
  \item Consider an example:
    \begin{enumerate}
    \item There is a productivity downturn:
    \item How does a firm respond?
    \item McCall model: the quality of the offer distribution deteriorates, but searchers receive offers at the same rate.
    \end{enumerate}
  \item Essentially, slackness in the labor market is due to worker selectivity, not due to decisions made by the firm.
  \item Obviously, firms do respond.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{The Beveridge Curve}
  \begin{itemize}
  \item Another implication: there is no relationship between unemployment and vacancy creation.
  \end{itemize}
\centering\includegraphics[width=0.9\textwidth]{Petrosky-NadeauZhang_1.png}
\end{frame}

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

% \begin{frame}
%   \frametitle{Hazard vs. Arrival Rate}
%   \begin{itemize}
%   \item Unmatched firm problem in Burdett-Mortensen:
%     \begin{align*}
%       \pi = \max_{w} (p - w)l(w|w_{R},F)
%     \end{align*}
%   \item The hazard rate is an equilibrium object; the arrival rate is not.
%   \item But what if firms can adjust along the extensive margin in addition to the intensive margin?
%   \item ``Vacant'' firm's problem:
%     \begin{align*}
%       \pi^{V}(w) = -\kappa + q(.)J(w)
%     \end{align*}
%   \item $q$ is the worker-finding rate. Now an equilibrium object.
%   \end{itemize}
% \end{frame}

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

\begin{frame}
  \frametitle{The DMP Model (``Ch. 1 of Pissarides (2000)'')}
  \begin{itemize}
  \item Agents:
    \begin{enumerate}
    \item Employed workers;
    \item unemployed workers;
    \item vacant firms;
    \item matched firms.
    \end{enumerate}
  \item Linear utility ($u = b, u = w$) and production $y = p>b$.
  \item Matching function:
    \begin{enumerate}
    \item Determines {\it number} of meetings between firms \& workers.
    \item Args: levels searchers \& vacancies $(U = u\times L, V = v\times L$)
    \item Constant returns to scale ($L$ is lab. force):
    \begin{align*}
      M(uL,vL) = uL\times M(1,\frac{v}{u}) = uL\times p(\theta)
    \end{align*}
  \item where $\theta = \frac{v}{u}$ is ``labor market tightness''
  \item Match rates:
    \begin{align*}
      \underbrace{p(\theta)}_{Worker}= \theta \underbrace{q(\theta)}_{Firm}
    \end{align*}
    \end{enumerate}
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Worker Value Functions}
  \begin{itemize}
  \item Value functions:
    \begin{enumerate}
    \item Employed at wage w: $W(w)$
    \item Unemployed: $U$.
    \end{enumerate}
  \item Unemployed flow value:
    \begin{align*}
      rU = b + p(\theta)E[W(w) - U]
    \end{align*}
  \item Employed flow value:
    \begin{align*}
      rW(w) = w + \delta[U - W(w)]
    \end{align*}
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Firm Value Functions}
  \begin{itemize}
  \item Value functions:
    \begin{enumerate}
    \item Filled, paying wage w: $J(w)$
    \item Vacant $V$.
    \end{enumerate}
  \item Vacant flow value:
    \begin{align*}
      rV = -\kappa + q(\theta)E[J(w) - V]
    \end{align*}
  \item Matched flow value:
    \begin{align*}
      rJ(w) = (p - w) + \delta[V - J(w)]
    \end{align*}
  \item Free entry equilibrium condition:
    \begin{align*}
      rV &= 0\\
      \rightarrow \frac{\kappa}{E[J(w)]} &= q(\theta)
    \end{align*}
  \item This is just a market clearing condition!
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Equilibrium Objects}
  \begin{itemize}
  \item Three key equilibrium objects:
    \begin{enumerate}
    \item Wages;
    \item unemployment;
    \item $\theta = \frac{v}{u}$ (vacancies).
    \end{enumerate}
  \item How we determine each of these is largely a modeling decision.
  \item Steady-state: pin down unemployment via flow equation.
  \item Free-entry: Assume that firms always post vacancies so that free entry binds.
  \item Wages: Assume that wages are determined by a surplus- (profit) sharing rule.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Steady-State Unemployment}
  \begin{itemize}
  \item Flow of unemployment:
    \begin{align*}
      \dot{u} = \delta(1 - u) - p(\theta)u
    \end{align*}
  \item Steady-state:
    \begin{align*}
      0 &= \delta(1 - u) - p(\theta)u\\
       p(\theta)u &= \delta(1 - u)\\
       u &= \frac{\delta}{\delta + p(\theta)}
    \end{align*}
  \item Same as McCall with $\alpha = p(\theta)$.
  \item (Note: no heterogeneity \& $p > b$ $\rightarrow$ all wages accepted.)
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Free Entry}
  \begin{itemize}
  \item Free entry $V = 0$:
    \begin{align*}
      rJ(w) &= (p - w) + \delta[\cancel{V} - J(w)]\\
      (r + \delta)J(w) &= (p - w)
    \end{align*}
  \item Vacancy creation condition (i.e., free entry imposed):
    \begin{align*}
      q(\theta) &= \frac{\kappa}{E[J(w)]} \\
      q(\theta) &= \frac{\kappa(r + \delta)}{(p - w)}\\
      \theta &= q^{-1}(\frac{\kappa(r + \delta)}{(p - w)})
    \end{align*}
  \item Thus, mapping between wages and $\theta$. 1 equation, 2 unknowns.
  \item Need equation to determine wages in equilibrium.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Wage Determination}
  \begin{itemize}
  % \item Previous wage determination approaches:
  %   \begin{enumerate}
  %   \item Burdett-Mortensen: wage-posting game, contracts non-negotiable.
  %   \item Postel-Vinay \& Robin: wage-posting game, contracts set wages to equalize value of outside offer.
  %   \end{enumerate}
  \item Workers and firms bargain over the surplus of a match.
  \item Surplus of a match:
    \begin{align*}
      S(w) &= W(w) + J(w) - U - \cancel{V}\\
      S(w) &= W(w) + J(w) - U
    \end{align*}
  \item Nash Bargaining splits this surplus according to a bargaining weight, $\beta$:
    \begin{align*}
      w = argmax_{w}\underbrace{(W(w) - U)^{\beta}}_{Net\;Utility}\underbrace{(J(w) - V)^{1 - \beta}}_{Net\;Profits}
    \end{align*}
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Wage Determination}
  \begin{itemize}
  \item Nash Bargaining splits this surplus according to a bargaining weight, $\beta$:
    \begin{align*}
      w &= argmax_{w}\underbrace{(W(w) - U)^{\beta}}_{Net\;Utility}\underbrace{(J(w) - V)^{1 - \beta}}_{Net\;Profits}\\
      0 &= \beta (W(w) - U)^{\beta - 1}(J(w) - V)^{1 - \beta}\der{W}{w}\\&+ (1 - \beta)(J(w) - V)^{-\beta}(W(w) - U)\der{J}{w}
    \end{align*}
  \item $\der{W}{w} = 1$, $\der{J}{w} = -1$:
    \begin{align*}
      \beta(\frac{J(w)}{W(w) - U})^{1 - \beta} &= (1 - \beta)(\frac{W(w) - U}{J(w)})^{\beta}\\
      \beta(J(w) + W(w) - U) &= W(w) - U\\
      \beta S(w) &= W(w) - U
    \end{align*}
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Wage Determination}
  \begin{itemize}
  \item Nash Bargaining splits this surplus according to a bargaining weight, $\beta$:
    \begin{align*}
      w &= argmax_{w}\underbrace{(W(w) - U)^{\beta}}_{Net\;Utility}\underbrace{(J(w) - V)^{1 - \beta}}_{Net\;Profits}\\
      w&\text{  solves  } (W(w) - U) = \beta(W(w) + J(w) - U) = \beta S(w)
    \end{align*}
  \item Plug in for each of these:
    \begin{align*}
      (1 &- \beta)[W(w) - U] = \beta J(w)\\
      \beta J(w) &= (1 - \beta)[w - \delta(U - V(w)) \\&- b - p(\theta)(W(w) - U)] \\
      (1 - \beta)(w - b) &= \beta J(w) + (1 - \beta)(p(\theta) + \delta)[W(w) - U]\\
      (1 - \beta)(w - b) &= \beta(p - w - \delta J(w)) \\&+ (1 - \beta)(p(\theta) + \delta)[W(w) - U]
    \end{align*}
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Wage Determination}
  \begin{itemize}
  \item Note that $\beta S(w) = [W(w) - U]$
    \begin{align*}
      (1 - \beta)(w - b) &= \beta(p - w - \delta J(w)) \\&+ (1 - \beta)(p(\theta) + \delta)\beta S(w)
    \end{align*}
  \item And $(1 - \beta)S(w) = J(w)\rightarrow S(w) = \frac{J(w)}{1 - \beta}$
    \begin{align*}
      (1 - \beta)(w - b) &= \beta(p - w - \delta J(w)) \\&+ (1 - \beta)(p(\theta) + \delta)\beta\frac{J(w)}{1 - \beta}\\
      w &= (1 - \beta) b + \beta p + p(\theta)\beta J(w)
    \end{align*}
  \item Free entry condition: $q(\theta) = \frac{\kappa}{J(w)}\rightarrow p(\theta) = \frac{\theta\kappa}{J(w)}$
    \begin{align*}
      w &= (1 - \beta) b + \beta p + \beta\theta\kappa
    \end{align*}
  \end{itemize}
\end{frame}

% ------------------------------------------------
\section{Computation}
% ------------------------------------------------

\begin{frame}
  \frametitle{Computation}
  \begin{itemize}
  \item How would we solve this model?
  \item Need way to compute three equilibrium objects:
    \begin{enumerate}
    \item Wages;
    \item unemployment;
    \item $\theta = \frac{v}{u}$ (vacancies).
    \end{enumerate}
  \item How we determine each of these is largely a modeling decision.
  \item Steady-state: pin down unemployment via flow equation.
  \item Free-entry: Assume that firms always post vacancies so that free entry binds.
  \item Wages: Assume that wages are determined by a surplus- (profit) sharing rule.
  \item Computation:
    \begin{itemize}
    \item Wages, vacancies: depend on surplus.
    \item Unemployment: law of motion.
    \end{itemize}
  \item Here: add aggregate shocks.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Worker Value Functions}
  \begin{itemize}
  \item Value functions:
    \begin{enumerate}
    \item Employed at wage w: $W(w)$
    \item Unemployed: $U$.
    \end{enumerate}
  \item Unemployed flow value:
    \begin{align*}
      rU(z) = b + p(\theta)E[W(w,z) - U(z)] + \gamma E[U(z') - U(z)]
    \end{align*}
  \item Employed flow value:
    \begin{align*}
      rW(w,z) &= w(z) + \delta[U(z) - W(w,z)] \\&+ \gamma E[W(w',z') - W(w,z)]
    \end{align*}
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Firm Value Functions}
  \begin{itemize}
  \item Value functions:
    \begin{enumerate}
    \item Filled, paying wage w: $J(w)$
    \item Vacant $V$.
    \end{enumerate}
  \item Vacant flow value:
    \begin{align*}
      rV(z) = -\kappa + q(\theta(z))E[J(w,z) - V(z)] + \gamma [V(z') - V(w,z)]
    \end{align*}
  \item Matched flow value:
    \begin{align*}
      rJ(w,z) &= (z + p - w) + \delta[V(z) - J(w,z)] \\&+ \gamma [J(w',z') - J(w,z)]
    \end{align*}
  \item Free entry equilibrium condition:
    \begin{align*}
      rV &= 0\\
      \rightarrow \frac{\kappa}{E[J(w,z)]} &= q(\theta)
    \end{align*}
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Computation}
  \begin{itemize}
  \item Surplus of a match:
    \begin{align*}
      S(w,z) &= W(w,z) + J(w,z) - U(z) - \cancel{V(z)}\\
      S(w,z) &= W(w,z) + J(w,z) - U(z)
    \end{align*}
  \item Plugging in and using $\beta S(w,z)$ is workers surplus and $(1 - \beta)S(w,z)$ is firm surplus:
    \begin{align*}
      S(z) = \frac{p + z}{r + \delta + \gamma} - \frac{b + \theta\kappa\frac{\beta}{1 - \beta}}{r + \delta + \gamma} + \frac{\gamma}{r + \delta + \gamma}\int_{z'}S(x)dF(x)
    \end{align*}
  \item This is just a contraction: $\frac{\gamma}{r + \delta + \gamma} < 1$.
  \item Pick $S_{0}(z_{i}) = 0,\;\forall\;i$ and iterate.
  \item Yields vacancies $q(\theta) = \frac{\kappa}{(1 - \beta)S(z)}$ and wages ($w = \beta S(z)$).
  \end{itemize}
\end{frame}

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

\section{Conclusion}
% ------------------------------------------------

\begin{frame}
  \frametitle{Next Time}
  \begin{itemize}
  \item Either:
    \begin{itemize}
    \item Efficiency in search (Hosios Condition);
    \item or Directed/competitive search.
    \end{itemize}
  \item Final homework due Thursday.
  \item Final in less than a week.
  \end{itemize}
\end{frame}


\end{document}
