%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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[]{Quantitative Macro-Labor:\\ General Equilibrium Search and Matching} % 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 2024} % 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{Course 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: Estimating a search model.
  \item Two more lectures:
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Estimation Techniques}
  \begin{itemize}
  \item Broadly two categories of estimation techniques.
  \item Limited information techniques:
    \begin{enumerate}
    \item Simulated method of moments;
    \item Indirect inference;
    \item Calibration (just SMM).
    \end{enumerate}
  \item Key idea: specify set of moments that model should be good at matching.
  \item Calibration vs. SMM: more about approach to robustness.
  \item Full information methods:
    \begin{enumerate}
    \item Maximum likelihood;
    \item Bayesian estimation.
    \end{enumerate}
  \item Comparison?
  \item Excellent reference: DeJong and Dave (2011) ``Structural Macroeconometrics''
  \end{itemize}
\end{frame}

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


\section{Limited-Information Methods}
% ------------------------------------------------

\begin{frame}
  \frametitle{Limited Information Estimation}
  \begin{itemize}
  \item Basic idea:
    \begin{itemize}
    \item Choose moments that model should be able to match.
    \item What are some moments?
    \item Means, variances.
    \end{itemize}
  \item Two approaches:
    \begin{itemize}
    \item Derive conditions and estimate parameters.
    \item Simulate data and match moments.
    \end{itemize}
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{``Pre-Calibrated''}
  \begin{itemize}
  \item AKA preset, sometimes mistakenly called calibrated.
  \item What people think it means: pick some parameters from other macro papers.
  \item When you do this, it is called a ``numerical exercise.''
  \item Fine for first pass, or theory paper, but not for quantitative paper.
  \item What pre-calibrated really means:
    \begin{itemize}
    \item Parameters estimated in another model.
    \item Model in your paper is {\it very} similar.
    \item ``Preset'' parameters that don't affect what differentiates your model.
    \end{itemize}
  \end{itemize}
\end{frame}

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


\begin{frame}
  \frametitle{External Calibration}
  \begin{itemize}
  \item Some model features are directly observable in the data.
  \item Typically, linear function $f(x,y)$, or non-linear function that can be linearized.
  \item Cobb-Douglas production function:
    \begin{align}
      Y=F(K,L) &= zK^{\alpha}L^{1 - \alpha}
    \end{align}
  \item Need to estimate? $\alpha$, and $z_{t}$ as well!
    \begin{align}
      ln(Y) &= ln(z) + \alpha ln(K) + (1 - \alpha)ln(L)
    \end{align}
  \item Run regression:
    \begin{align}
      ln(Y_{t}) &= \beta_{1}ln(K) + \beta_{2}ln(L) + \epsilon_{t}
    \end{align}
  \item Then $\alpha = \frac{\beta_{1}}{\beta_{1} + \beta_{2}}$, $ln(z_{t}) = \hat{\epsilon}_{t}$
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{External Calibration}
  \begin{itemize}
  \item This is {\it much} simpler than other estimation techniques.
  \item Take this approach when you can.
  \item Other applications:
    \begin{enumerate}
    \item Income processes we saw early in class.
    \item Depreciation (human capital or physical capital).
    \end{enumerate}
  \item Others?
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Simulated Method of Moments}
  \begin{itemize}
  \item Basic idea, simulate model, compare outcomes to data.
  \item Outline:
    \begin{itemize}
    \item Define set of unconditional moments in data.
    \item Pick initial parameter values.
    \item Solve and simulate model, generate same unconditional moments with model data.
    \item Compare moments, calculate squared residuals.
    \item Guess new parameter values.
    \end{itemize}
  \item Complications:
    \begin{itemize}
    \item Need a routine to pick new parameters.
    \end{itemize}
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Simulated Method of Moments}
  \begin{itemize}
  \item Define set of empirical targets $h(z_{t})$
  \item Define theoretical counterparts $h(y_{t},\theta)$
  \item Goal, find $\theta$ s.t. $E[h(y_{t},\theta)] = E[h(z_{t})]$.
  \item Define sample analogue $g(Z,\theta)$:
    \begin{align}
      g(Z,\theta) &= \frac{1}{T}\sum_{i = 1}^{T}h(z_{t}) - \frac{1}{N}\sum_{i=1}^{N}[\frac{1}{T}\sum_{t=1}^{T}h(y_{t},\theta)]
    \end{align}
  \item Then the objective function is given by
    \begin{align}
      \min_{\theta}\Gamma(\theta) &= g(Z,\theta)'\times W\times g(Z, \theta)
    \end{align}
  \item Always tricky to pick correct weighting matrix $W$.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Practical Implementation}
  \begin{itemize}
  \item Note that simulated moments involve both $T$ and $N$.
  \item The reason: each iteration, you run the model $N$ times.
  \item Because you need to average out the randomness of simulations.
  \item Then, usually minimize the squared residual with some weighting matrix.
  \item Often, people use identity matrix or inverse of empirical variance; both are not efficient in the statistical sense.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Calibration}
  \begin{itemize}
  \item Two types of calibration:
    \begin{itemize}
    \item Derive conditions and estimate parameters.
    \item Simulate data and match moments.
    \end{itemize}
  \item First is ``external calibration''
  \item Second is SMM, but without recovering standard errors of parameters.
  \item Good reference: Cooley (1995).
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Indirect Inference}
  \begin{itemize}
  \item Simulated method of moments with conditional moments.
  \item Instead of matching means, variances, etc., match regression and other reduced-form moments.
  \item Define an ``auxiliary model'':
    \begin{itemize}
    \item Empirical specifications that are easy to compute.
    \item Can be easily simulated by the model.
    \item Capture essential elements of equilibrium.
    \end{itemize}
  \item Important: auxiliary model {\it does not need to map one-to-one with structural parameters!}
  \item That is, it can be a ``perturbed'' version of your model.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Indirect Inference}
  \begin{itemize}
  \item Two steps:
    \begin{itemize}
    \item Define sample analog of empirical moments $\delta(z_{t})$, $\delta(Z) = \arg\max_{\delta}\Delta(z, \delta)$
    \item Then theoretical analog: $\delta(\mathbbm{Y},\theta) &= \arg\max_{\delta}\Delta(\mathbbm{Y},\delta)$
    \end{itemize}
  \item In words: use $\theta$ to match a vector of parameters $\delta$.
    \begin{align}
      g(Z,\theta) &= \delta(Z) - \frac{1}{S}\sum_{i=1}^{S}\delta(\mathbbm{Y}^{i},\theta)
    \end{align}
  \item Simulate each iteration $S$ times.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Objective Function}
  \begin{itemize}
  \item There are multiple ways to define the objective function.
  \item Intuitive way:
    \begin{align}
      \min_{\theta}\Gamma(\theta) &= [\Delta(Z) - \delta_{S}(\mathbbm{Y},\theta)]'\times W\times [\Delta(Z) - \delta_{S}(\mathbbm{Y},\theta)]
    \end{align}
  \item Also: gaussian objective.
  \end{itemize}
\end{frame}

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


\section{Full-Information Methods}
% ------------------------------------------------

\begin{frame}
  \frametitle{Full Information Methods}
  \begin{itemize}
    \item Variations on maximum likelihood.
  \item May cover next Tuesday (or see online handout).
  \item Useful when model involves distributions (productivity, wages, etc.)
  \item Good references:
    \begin{itemize}
    \item Chris Flinn's work.
    \item Rasmus Lentz's work.
    \item ``European Search'' group (Postel-Vinay, Robin, etc.)
    \end{itemize}
  \end{itemize}
\end{frame}

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

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

\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{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 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{Method of Moments Implementation}
% ------------------------------------------------

\begin{frame}
  \frametitle{Estimation}
  \begin{itemize}
  \item What parameters do we need to estimate/pick?
    \begin{itemize}
    \item $\delta$: (exogenous) separation rate.
    \item $b$: unemployment utility.
    \item $\beta$: bargaining power.
    \item $\kappa$: vacancy creation cost.
    \item $r$: discount rate.
    \item utility function (linear).
    \item Cobb-Douglas Matching: $M(u, v) = A u^{\alpha}v^{1 - \alpha}$
    \end{itemize}
  \item What can we externally calibrate?
    \begin{itemize}
    \item $\delta$: E-U flows.
    \item $\alpha$: U-E flows + vacancy \& unemployment rate.
    \item Set $A = 1$ (maybe).
    \item $r$: choose frequency (weekly, monthly, etc.) and pick interest rate (i.e., $\beta_{Discount} = \frac{1}{1 + r}$)
    \end{itemize}
  \end{itemize}
\end{frame}

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


\begin{frame}
  \frametitle{Estimation}
  \begin{itemize}
  \item What is tricky to calibrate?
    \begin{itemize}
    \item $b$: what is unemployment utility?
    \item $\kappa$: what is the cost of opening a vacancy?
    \item $\beta$: what is ``bargaining power''?
    \end{itemize}
  \item Important question: should we target equilibrium or most closely associated data?
  \item i.e., should $\kappa$ target estimates of the cost of posting a vacancy? Or should we target wages or another equilibrium object?
  \item Not obvious. Argument for model's validity is stronger the more directly you can point to a target.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Using the right data}
  \begin{itemize}
  \item Another important consideration: are you using the right data series?
  \item i.e., if your model doesn't have growth, you can't target the time series of GDP.
  \item Why? because your model isn't equipped to match it.
  \item Filtering:
    \begin{itemize}
    \item Imagine time series has two components: trend and cycle.
    \item De-trend data using HP-filter.
    \end{itemize}
  \item Some series don't have trends: unemployment.
  \item Cooley (1995) is a really good reference for thinking about these issues.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Shimer, 2005}
  \begin{itemize}
  \item Influencial paper that really walks through sensible approaches to calibration.
  \item Some preliminaries:
    \begin{itemize}
    \item Adds aggregate shocks, i.e., not steady state equilibrium.
    \item Discrete time version of model.
    \end{itemize}
  \item Calibration approach:
    \begin{itemize}
    \item Target/set parameters to sensible values.
    \item Do robustness checks with other parameters/assumptions.
    \end{itemize}
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Shimer, 2005}
  \begin{itemize}
  \item What is $b$?
  \item Shimer takes a very literal interpretation of $b$: sets $b$ to be the replacement rate $b = 0.4)$.
  \item Bargaining power $\beta$? Assume that ``Hosios Condition'' holds.
  \item Hosios condition: $\beta = \alpha$, i.e., bargaining power equals elasticity of matching function.
  \item Most of second half of paper: robustness checks with alternate assumptions.
  \item Leads to ``Shimer Puzzle'': search models can't address business cycle fluctuations.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Flinn, 2005}
  \begin{itemize}
  \item Paper that addresses the minimum wage.
  \item Key parameter: worker's bargaining power.
  \item He takes a literal interpretation: sets $\beta$ = fraction of worker salaries out of total revenue at a large firm (McDonald's).
  \item Compares with Hosios Condition: very different outcomes!
  \end{itemize}
\end{frame}

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

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

\begin{frame}
  \frametitle{Conclusion}
  \begin{itemize}
  \item Two ways to approach quantitative macro:
    \begin{itemize}
    \item Seek permission: look for empirical regularities and write down model to try and explain them.
    \item Ask forgiveness: write down model and then look for empirical regularities consistent with equilibrium.
    \end{itemize}
  \item Both are valid ways to approach quantitative macro, and both can involve sunk costs.
  \item Final due date for project 2? Sometime around Dec 12th.
  \end{itemize}
\end{frame}


\end{document}
