Macro Study Notes

Xinyu Zhou

Module 9

Mathematical Methods & Tools

Modern macroeconomics relies on a set of core mathematical tools: log-linearization for approximating models, the method of undetermined coefficients for solving linear rational expectations models, phase diagrams for analyzing dynamics, and dynamic programming for optimization.

Log-Linearization

Log-linearization converts nonlinear dynamic models into linear systems that can be solved analytically or computationally.

Basic Principle

For a scalar function $y_t = f(x_t)$ with steady state $\bar{y} = f(\bar{x})$:

$y_t - \bar{y} \approx f'(\bar{x})(x_t - \bar{x})$   (level deviation)

In log-deviations $\hat{x}_t \equiv \ln(x_t/\bar{x}) \approx (x_t - \bar{x})/\bar{x}$:

Log-linear approximation: $\quad \hat{y}_t \approx \frac{f'(\bar{x})\bar{x}}{f(\bar{x})}\hat{x}_t$

The coefficient is an elasticity — interpretation is unit-free.

Examples

FunctionLog-Linear Form
$y = x^a z^b$$\hat{y} = a\hat{x} + b\hat{z}$ (exact!)
$y = ax + bz$$\hat{y} = \frac{a\bar{x}}{a\bar{x}+b\bar{z}}\hat{x} + \frac{b\bar{z}}{a\bar{x}+b\bar{z}}\hat{z}$
$y = (ax + b)^c$$\hat{y} = c\frac{a\bar{x}}{a\bar{x}+b}\hat{x}$
$y = f(x_1, \ldots, x_n)$$\hat{y} = \sum_{i=1}^n \frac{f_{x_i}(\bar{x})\bar{x}_i}{f(\bar{x})}\hat{x}_i$

Application: Consumption Euler

Nonlinear: $\quad u'(c_t) = \beta \mathbb{E}_t\{u'(c_{t+1}) R_{t+1}\}$

Log-linearized (CRRA): $\quad \mathbb{E}_t\{\Delta \hat{c}_{t+1}\} = \frac{1}{\sigma}\hat{R}_{t+1}$

where $\sigma \equiv -u''(\bar{c})\bar{c}/u'(\bar{c})$ is the coefficient of relative risk aversion.

AR(1) Processes

Definition

$x_{t+1} = (1 - \phi)\bar{x} + \phi x_t + \varepsilon_{t+1}, \quad \varepsilon_t \sim \text{IID } N(0, \sigma_\varepsilon^2)$

$\phi$ is the persistence parameter; $|\phi| < 1$ for stationarity.

Key Properties

Iterating forward from $x_0$:

$x_t = \bar{x} + \phi^t(x_0 - \bar{x}) + \sum_{i=0}^{t-1} \phi^i \varepsilon_{t-i}$

  • Mean: $\mathbb{E}[x_t] \to \bar{x}$ as $t \to \infty$.
  • Stationary variance: $\text{Var}(x_\infty) = \frac{\sigma_\varepsilon^2}{1 - \phi^2}$.
  • Impulse response: $\frac{\partial x_{t+j}}{\partial \varepsilon_t} = \phi^j$ — decays geometrically.

A persistent process ($\phi$ close to 1) has high long-run variance even with small innovations.

Method of Undetermined Coefficients

This method solves linear rational expectations models by guessing a linear policy function in the state variables and solving for the coefficients.

General Procedure

  1. Write the model as a system of linear(ized) stochastic difference equations in state variables $s_t$ and control variables $c_t$.
  2. Guess that controls are linear functions of states: $c_t = \Psi_{cs} s_t$.
  3. Guess the law of motion for states: $s_{t+1} = \Psi_{ss} s_t + \Psi_{s\varepsilon} \varepsilon_{t+1}$.
  4. Substitute guesses into the model equations.
  5. Collect terms and solve for the unknown coefficient matrices $\Psi$.

Key Insight: Recursive Structure

The coefficients governing the response to the endogenous state ($\Psi_{ss}$, $\Psi_{cs}$) can typically be solved first, independently of the response to exogenous shocks ($\Psi_{s\varepsilon}$). This gives a recursive structure to the problem.

Application: Solving the Stochastic Growth Model

Log-Linearized Model

The stochastic growth model with CRRA utility $u(c) = \frac{c^{1-\sigma}}{1-\sigma}$, Cobb-Douglas production $f(k) = k^\alpha$, and AR(1) productivity:

$\bar{c}\hat{c}_t + \bar{k}\hat{k}_{t+1} = \bar{y}\hat{z}_t + \frac{1}{\beta}\bar{k}\hat{k}_t$   (resource constraint)

$\mathbb{E}_t\{\Delta\hat{c}_{t+1}\} = \frac{\beta\bar{r}}{\sigma}\mathbb{E}_t[\hat{z}_{t+1} + (\alpha-1)\hat{k}_{t+1}]$   (Euler)

$\hat{z}_{t+1} = \phi\hat{z}_t + \varepsilon_{t+1}$   (productivity AR(1))

Guess and Solve

Guess: $\hat{k}_{t+1} = \psi_{kk}\hat{k}_t + \psi_{kz}\hat{z}_t$, $\hat{c}_t = \psi_{ck}\hat{k}_t + \psi_{cz}\hat{z}_t$.

Step 1: The capital coefficients $\psi_{kk}$ solve a quadratic:

$\displaystyle \psi_{kk}^2 - \left(1 - \frac{\beta\bar{r}(\alpha-1)}{\sigma} + \frac{\bar{c}}{\bar{k}}\right)\psi_{kk} + \frac{1}{\beta} = 0$

Choose the stable root ($\psi_{kk} < 1$) for a unique convergent equilibrium.

Step 2: Recover $\psi_{ck} = \frac{1}{\beta} - \frac{\bar{k}}{\bar{c}}\psi_{kk}$.

Step 3: Solve for $\psi_{kz}, \psi_{cz}$ using the response to the exogenous state.

Impulse Response Function

For a +1% productivity shock ($\varepsilon_0 = 0.01$):

  • Output rises on impact (productivity + capital response).
  • Consumption rises (wealth effect).
  • Capital rises gradually then returns to steady state (hump-shaped).
  • All variables converge back to steady state as the shock dies out ($\phi^t \to 0$).

Phase Diagrams

Two-Variable Systems

For a system $\dot{x} = f(x, y)$, $\dot{y} = g(x, y)$:

  1. Plot the nullclines: $\dot{x} = 0$ and $\dot{y} = 0$.
  2. The intersection is the steady state.
  3. Draw arrows indicating direction of motion in each region.
  4. Identify the saddle path — the unique trajectory converging to steady state.

RCK Phase Diagram

  • $\dot{k} = 0$: $c = f(k) - \delta k$ (hump-shaped curve).
  • $\dot{c} = 0$: $f'(k) = \delta + \rho$ (vertical line at modified golden rule $k^*$).
  • The saddle path is the unique trajectory that satisfies the transversality condition.
  • For any $k_0$, there is exactly one $c_0$ on the saddle path.

Dynamic Programming

Bellman Equation

A recursive formulation of the infinite-horizon optimization problem:

Bellman Equation: $\quad V(s) = \max_{a \in \Gamma(s)} \{ F(s, a) + \beta V(s') \}$

where $s$ is the state, $a$ is the choice (control), $s' = g(s, a)$ is the transition, and $V(s)$ is the value function — the maximized lifetime utility starting from state $s$.

The optimal policy function $a = h(s)$ satisfies the first-order and envelope conditions, recovering the Euler equation.

Why DP?

  • Turns an infinite-dimensional problem (choose infinite sequence) into a finite-dimensional one (choose today's action + continuation value).
  • Works naturally with uncertainty (expectations operator inside the Bellman equation).
  • Foundation for computational solution methods (value function iteration, policy iteration).

Value Function Iteration (VFI)

Algorithm

  1. Discretize the state space into a grid of $N$ points.
  2. Make an initial guess for the value function $V^{(0)}(s)$ at each grid point.
  3. For each state $s$, solve: $V^{(n+1)}(s) = \max_{a} \{ F(s, a) + \beta V^{(n)}(g(s, a)) \}$.
  4. Check convergence: if $\|V^{(n+1)} - V^{(n)}\| < \text{tol}$, stop. Otherwise, update and repeat.

By the Contraction Mapping Theorem (Banach fixed-point theorem), VFI converges to the unique true value function for any initial guess.

Contraction Mapping

Blackwell's Sufficient Conditions: The Bellman operator $T$ defined by $(TV)(s) = \max_a \{F(s,a) + \beta V(g(s,a))\}$ is a contraction mapping with modulus $\beta$ if: (1) $T$ is monotone, and (2) $T$ satisfies discounting. Then $V = TV$ has a unique solution.