%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 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[]{PhD Macro II:\\ What is a Macro Model?} % 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 2023} % 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: Basic two-period consumption-savings model.
  \item Use to understand what we are doing with macro models.
  \item Key: macro models are
    \begin{itemize}
    \item difference equations from a convex optimization problem
    \item that are resolved by a specified equilibrium concept.
    \end{itemize}
  \item i.e., we specify a what we think the world looks like.
  \item Then we show how people would figure out that world.
  \item Then we show how those decisions aggregate.
  \item Will get you access to the cluster today.
  \item Homework due (next) Thursday.
  \end{itemize}
\end{frame}

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

\section{Some Key Features in Macro Models} % 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{Basic two-period model}
  \begin{itemize}
  \item A (very) basic consumption-savings model:
    \begin{align}
      \max_{c_{1},a_{2},c_{2}} u(c_{1}) &+ \beta u(c_{2})\\
      \text{s.t.  } c_{1} + a_{2} &= (1 + r)a_{1} + w_{1}\\
      c_{2} &= (1 + r)a_{2} + w_{2}
    \end{align}
  \item What is this?:
    \begin{itemize}
    \item concave return function (sum of concave functions is concave)
    \item over convex set (budget constraint).
    \end{itemize}
  \item Two (philosophical) ways to think about solving this problem:
    \begin{enumerate}
    \item We are solving a decision problem of an agent, then aggregating to clear markets.
    \item We are deriving a set of difference (cont. time $\implies$ differential) equations and finding an equilibrium.
    \end{enumerate}
  \item Keep \textbf{both} in mind (will return to this later).
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Euler Equation}
  \begin{itemize}
  \item We solve this and get an Euler Equation:
    \begin{align}
      u'(c_{1}) = \beta(1 + r)u'(c_{2})
    \end{align}
  \item What does this say?
    \begin{enumerate}
    \item Agents will {\it allocate} their budget between two periods according to this equation.
    \item This expression tells us the growth path of consumption, given $c_{0}$.
    \end{enumerate}
  \item Euler equation: absolute, fundamental, key equation in every (dynamic) macro model.
  \item Note: Euler equation {\it need not} be over consumption.
  \item Budget constraint tells us path of assets/consumption for a given initial condition.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Euler Equation}
  \begin{itemize}
  \item The Euler Equation tells us the evolution of consumption in an economy.
  \item That is, it determines the dynamics.
  \item The effect of taxes, the presence of frictions or wedges, adjustment costs, etc. can usually be distilled to the following:
    \begin{align}
      u'(c_{1}) = (1 + \Delta)\beta(1 + r)u'(c_{2})
    \end{align}
  \item where $\Delta$ is a distortion in the economy, i.e. a friction that prevents the market from realizing the perfectly competitive equilibrium.
  \item These features change the marginal utility of consumption over time, and thus distort the path of consumption.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Key Insight II: Portfolio Allocation}
  \begin{itemize}
  \item Let's return to the two-period model:
    \begin{align}
      \max_{c_{1},a_{2},\ell,c_{2}} u(c_{1},\ell) &+ \beta u(c_{2},1)\\
      \text{s.t.  } c_{1} + a_{2} &= (1 + r)a_{1} + w_{1}(1 - \ell)\\
      c_{2} &= (1 + r)a_{2}
    \end{align}
  \item Now agents are optimizing over consumption \textbf{and} leisure.
  \item At first blush, this looks like it could become more difficult.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Portfolio Allocation}
  \begin{itemize}
  \item When we solve this model, we get
    \begin{align}
      u_{1}(c_{1},\ell^{*}) &= \beta(1 + r)u_{1}(c_{2},0)
    \end{align}
  \item But also
    \begin{align}
      \der{V}{\ell} &= u_{2}(c_{1}^{*},\ell) - w\lambda = 0\\
      u_{2}(c_{1}^{*},\ell) &= w u_{1}(c_{1}^{*},\ell)
    \end{align}
  \item and
    \begin{align}
      c_{1} + a_{2} &= (1 + r)a_{1} + w_{1}(1 - \ell)
    \end{align}
  \item Now we have an equation that determines dynamics (Euler Equation) \& one that gives corresponding change in assets.
  \item \textbf{And} a \textbf{static} equation that determines the allocation of resources within a period (Portfolio Allocation).
  \item A lot of problems boil down to these two equations (possibly more with additional static choices).
  \end{itemize}
\end{frame}

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

\section{What is a Macro Model} % 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{Models as Dynamic Systems}
  \begin{itemize}
  \item Two (philosophical) ways one might think about solving this problem:
    \begin{enumerate}
    \item We are solving a decision problem of an agent, then aggregating to clear markets.
    \item We are deriving a difference equation and finding an equilibrium.
    \end{enumerate}
  \item Now, we'll briefly discuss the second interpretation.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Neoclassical Growth Model}
  \begin{itemize}
  \item The baseline model for most of modern macro (value function representation):
    \begin{align}
      V(k_{t}) &= \max_{c_{t}} u(c_{t}) + \beta V(k_{t + 1})\\
      \text{s.t.  } c_{t} + k_{t+1} &= k_{t}^{\alpha} + (1 - \delta)k_{t}
    \end{align}
  \item We have a recursive formulation \&
  \item We have a dynamic equation for capital.
  \item What we will solve for:
    \begin{itemize}
    \item Euler Equation;
    \item Steady state capital and consumption.
    \end{itemize}
  \end{itemize}
\end{frame}

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

% \begin{frame}
%   \frametitle{Neoclassical Growth Model}
%   \begin{itemize}
%   \item The baseline model for most of modern macro (value function representation):
%     \begin{align}
%       V(k_{t}) &= \max_{c_{t}} u(c_{t}) + \beta V(k_{t + 1})\\
%       \text{s.t.  } c_{t} + k_{t+1} &= k_{t}^{\alpha} + (1 - \delta)k_{t}
%     \end{align}
%   \item We have a recursive formulation \&
%   \item We have a dynamic equation for capital.
%   \item What we will solve for:
%     \begin{itemize}
%     \item Euler Equation;
%     \item Steady state capital and consumption.
%     \end{itemize}
%   \end{itemize}
% \end{frame}

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


\begin{frame}
  \frametitle{Neoclassical Growth Model}
    \begin{align}
      V_{t}(k_{t}) &= \max_{c_{t}} u(c_{t}) + \beta V_{t+1}(k_{t + 1})\\
      \text{s.t.  } c_{t} + k_{t+1} &= k_{t}^{\alpha} + (1 - \delta)k_{t}
    \end{align}
  \begin{itemize}
  \item Solving this:
    \begin{align}
      \der{V_{t}}{c_{t}} &= -\lambda + u'(c_{t}) = 0\\
      \der{V_{t}}{k_{t+1}} &= -\lambda + \beta \der{V_{t+1}}{k_{t+1}} = 0
    \end{align}
  \item Envelope condition:
    \begin{align}
      \der{V_{t+1}}{k_{t+1}} = \der{V_{t}}{k_{t}} = \lambda(\alpha k_{t}^{\alpha-1} + (1 - \delta))
    \end{align}
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Neoclassical Growth Model}
  \begin{itemize}
  \item FOCs:
    \begin{align}
      \der{V_{t}}{c_{t}} &= -\lambda + u'(c_{t}) = 0\\
      \der{V_{t}}{k_{t+1}} &= -\lambda + \beta \der{V_{t+1}}{k_{t+1}} = 0
    \end{align}
  \item Envelope condition:
    \begin{align}
      \der{V_{t+1}}{k_{t+1}} = \der{V_{t}}{k_{t}} = \lambda(\alpha k_{t}^{\alpha-1} + (1 - \delta))
    \end{align}
  \item Putting these together gives us the Euler Equation:
    \begin{align}
      u'(c_{t}) = \beta(\alpha k_{t}^{\alpha-1} + (1 - \delta))u'(c_{t + 1})
    \end{align}
  \item This \& BC give us dynamics of neoclassical growth model.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Steady State}
  \begin{itemize}
  \item What is a steady state and why do we care?
  \item It is challenging in general to characterize the solution to our model:
  \item Even if we specify a utility function, it will have no closed form solution unless $\delta = 1$.
  \item But we can characterize the solution in the steady-state, i.e., where variables are constant over time:
  \item $c_{t} = c_{t + 1} = c^{*}$, $k_{t} = k_{t + 1} = k^{*}$.
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Steady State}
  \begin{itemize}
  \item But we can characterize the solution in the steady-state, i.e., where variables are constant over time:
  \item $c_{t} = c_{t + 1} = c^{*}$, $k_{t} = k_{t + 1} = k^{*}$.
  \item pick $u(c) = ln(c)$. then
    \begin{align}
      \frac{1}{c_{t}} = \beta(\alpha k_{t}^{\alpha-1} + (1 - \delta))\frac{1}{c_{t + 1}}
    \end{align}
  \item In steady state:
    \begin{align}
      \frac{1}{c^{*}} = \beta(\alpha k^{*\alpha-1} + (1 - \delta))\frac{1}{c^{*}}
    \end{align}
  \item Why would the Euler Equation in the steady-state only be a function of capital?
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Steady State}
  \begin{itemize}
  \item This leaves us with capital:
    \begin{align}
      1 &= \beta(\alpha k^{*\alpha-1} + (1 - \delta))\\
      k^{*} &= (\frac{1}{\alpha\beta} - \frac{(1 - \delta)}{\alpha})^{\frac{1}{\alpha - 1}}\\
      k^{*} &= (\frac{\alpha\beta}{1 - \beta(1 - \delta)})^{\frac{1}{1 - \alpha}}
    \end{align}
  \item Now consumption from the budget constraint:
    \begin{align}
      c^{*} + k^{*} &= k^{*\alpha} + (1 - \delta)k^{*}\\
      c^{*} &= k^{*\alpha} - \delta k^{*}\\
      c^{*} &= (\frac{\alpha\beta}{1 - \beta(1 - \delta)})^{\frac{\alpha}{1 - \alpha}} - \delta (\frac{\alpha\beta}{1 - \beta(1 - \delta)})^{\frac{1}{1 - \alpha}}
    \end{align}
  \item Why would consumption be determined by the budget constraint, not the Euler Equation?
  \end{itemize}
\end{frame}

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

\begin{frame}
  \frametitle{Dynamics}
\begin{itemize}
\item Outside of steady-state we need to think about dynamics, i.e., how model evolves or fluctuates (in presence of shocks).
\item Dynamics:
  \begin{align}
    c_{t + 1} &= \beta(\alpha k_{t}^{\alpha-1} + (1 - \delta))c_{t}\\
    k_{t+1} &= k_{t}^{\alpha} + (1 - \delta)k_{t} - c_{t}
  \end{align}
\item We have two dynamic variables: $c$ and $k$.
\item The behavior of this system will depend on their dynamics.
\end{itemize}

\end{frame}

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

\begin{frame}
  \frametitle{Dynamics}
\begin{itemize}
\item Dynamics:
  \begin{align}
    c_{t + 1} &= \beta(\alpha k_{t}^{\alpha-1} + (1 - \delta))c_{t}\\
    k_{t+1} &= k_{t}^{\alpha} + (1 - \delta)k_{t} - c_{t}
  \end{align}
\item The behavior of this system will depend on their dynamics.
\item At steady-state:
  \begin{align}
    1 = \frac{c_{t + 1}}{c_{t}} &= \beta(\alpha k_{t}^{\alpha-1} + (1 - \delta))\\
    1 = \frac{k_{t+1}}{k_{t}} &= k_{t}^{\alpha-1} + (1 - \delta) - \frac{c_{t}}{k_{t}}
  \end{align}
\item If both hold, we are in steady-state, if not, quantities can vary dynamically.
\end{itemize}

\end{frame}

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

\begin{frame}
  \frametitle{Dynamics}
\begin{itemize}
\item Dynamics:
  \begin{align}
    c_{t + 1} &= \beta(\alpha k_{t}^{\alpha-1} + (1 - \delta))c_{t}\\
    k_{t+1} &= k_{t}^{\alpha} + (1 - \delta)k_{t} - c_{t}
  \end{align}
\item Small value of $c_{t}$: second equation dictates that $k_{t}$ $\uparrow$.
\item Small value of $k_{t}$: first equation dictates that $c_{t}$ $\uparrow$.
\item Reverse is true.
\end{itemize}

\end{frame}

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

\begin{frame}
  \frametitle{Phase Diagram}
\begin{itemize}
\item Dynamics (figure from Eric Sim's notes):
\end{itemize}
  \begin{align}
    c_{t + 1} &= \beta(\alpha k_{t}^{\alpha-1} + (1 - \delta))c_{t}\\
    k_{t+1} &= k_{t}^{\alpha} + (1 - \delta)k_{t} - c_{t}
  \end{align}
\centering\includegraphics[width=\textwidth]{PhaseDiagram.png}

\end{frame}

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

\begin{frame}
  \frametitle{Phase Diagram}
\centering\includegraphics[width=0.8\textwidth]{PhaseDiagram.png}
\vspace{-5mm}\begin{itemize}
\item Solving a model (mathematical intuition): determining rules that put us on the saddle path (dashed line).
\item Same concept for a decentralized economy.
\item Seeing these models as dynamic systems expands our toolbox for solving them.
\item We will discuss this later.
\end{itemize}

\end{frame}

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

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


\begin{frame}
  \frametitle{Next Time}
  \begin{itemize}
  \item Discuss important time series preliminaries.
  \item Be sure to start Matlab homework.
  \item See online for specific assignment.
  \end{itemize}
\end{frame}


\end{document}
