jupytext | kernelspec | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
(chang_ramsey)=
<div id="qe-notebook-header" align="right" style="text-align:right;">
<a href="https://quantecon.org/" title="quantecon.org">
<img style="width:250px;display:inline;" width="250px" src="https://assets.quantecon.org/img/qe-menubar-logo.svg" alt="QuantEcon">
</a>
</div>
In addition to what's in Anaconda, this lecture will need the following libraries:
---
tags: [hide-output]
---
!pip install polytope
This lecture describes how Chang {cite}chang1998credible
analyzed competitive equilibria and a best competitive equilibrium called a Ramsey plan.
He did this by
- characterizing a competitive equilibrium recursively in a way also employed
in the {doc}
dynamic Stackelberg problems <dyn_stack>
and {doc}Calvo model <calvo>
lectures to pose Stackelberg problems in linear economies, and then - appropriately adapting an argument of Abreu, Pearce, and Stachetti
{cite}
APS1990
to describe key features of the set of competitive equilibria
Roberto Chang {cite}chang1998credible
chose a model of Calvo {cite}Calvo1978
as a simple structure that conveys ideas that apply more broadly.
A textbook version of Chang's model appears in chapter 25 of {cite}Ljungqvist2012
.
This lecture and {doc}Credible Government Policies in Chang Model <chang_credible>
can be viewed as more sophisticated and complete treatments of the
topics discussed in {doc}Ramsey plans, time inconsistency, sustainable plans <calvo>
.
Both this lecture and {doc}Credible Government Policies in Chang Model <chang_credible>
make extensive use of an idea to which we apply the nickname
dynamic programming squared.
In dynamic programming squared problems there are typically two interrelated Bellman equations
- A Bellman equation for a set of agents or followers with value or value function
$v_a$ . - A Bellman equation for a principal or Ramsey planner or Stackelberg leader with value or
value function
$v_p$ in which$v_a$ appears as an argument.
We encountered problems with this structure in
{doc}dynamic Stackelberg problems <dyn_stack>
,
{doc}optimal taxation with state-contingent debt <opt_tax_recur>
,
and other lectures.
We'll start with some standard imports:
import numpy as np
import polytope
import matplotlib.pyplot as plt
First, we introduce some notation.
For a sequence of scalars $\vec z \equiv {z_t}{t=0}^\infty$, let $\vec z^t = (z_0, \ldots , z_t)$, $\vec z_t = (z_t, z{t+1}, \ldots )$.
An infinitely lived
representative agent and an infinitely lived government exist at dates
The objects in play are
- an initial quantity
$M_{-1}$ of nominal money holdings - a sequence of inverse money growth rates
$\vec h$ and an associated sequence of nominal money holdings$\vec M$ - a sequence of values of money
$\vec q$ - a sequence of real money holdings
$\vec m$ - a sequence of total tax collections
$\vec x$ - a sequence of per capita rates of consumption
$\vec c$ - a sequence of per capita incomes
$\vec y$
A benevolent government chooses sequences
Given tax collection and price of money sequences, a representative household chooses
sequences
In competitive equilibrium, the price of money sequence
Chang adopts a version of a model that {cite}Calvo1978
designed to exhibit
time-inconsistency of a Ramsey policy in a simple and transparent
setting.
By influencing the representative household’s expectations, government actions at
time
When setting a path for monetary expansion rates, the government takes into account how the household’s anticipations of the government's future actions affect the household's current decisions.
The ultimate source of time inconsistency is that a
time
A representative household faces a nonnegative value of money sequence
Facing vector
:label: eqn_chang_ramsey1
\sum_{t=0}^\infty \beta^t \left[ u(c_t) + v(q_t M_t ) \right]
subject to
:label: eqn_chang_ramsey2
q_t M_t \leq y_t + q_t M_{t-1} - c_t - x_t
and
:label: eqn_chang_ramsey3
q_t M_t \leq \bar m
Here
Chang {cite}chang1998credible
assumes that
-
$u: \mathbb{R}_+ \rightarrow \mathbb{R}$ is twice continuously differentiable, strictly concave, and strictly increasing; -
$v: \mathbb{R}_+ \rightarrow \mathbb{R}$ is twice continuously differentiable and strictly concave; - $u'(c){c \rightarrow 0} = \lim{m \rightarrow 0} v'(m) = +\infty$;
- there is a finite level
$m= m^f$ such that$v'(m^f) =0$
The household carries real balances out of a period equal to
Inequality {eq}eqn_chang_ramsey2
is the household’s time
It tells how real balances
Equation {eq}eqn_chang_ramsey3
imposes an exogenous upper bound
The government chooses a sequence of inverse money growth rates with
time
The government purchases no goods.
It taxes only to acquire paper currency that it will withdraw from circulation (e.g., by burning it).
Let $p_t $ be the price level at time
Evidently, the value of paper currency meassured in units of the consumption good at time
The government faces a sequence of budget constraints with time
where
Evidently, this budget constraint can be rewritten as
which by using the definitions of
:label: eqn_chang_ramsey2a
-x_t = m_t (1-h_t)
The restrictions
We define the set
To represent the idea that taxes are distorting, Chang makes the following assumption about outcomes for per capita output:
:label: eqn_chang_ramsey3a
y_t = f(x_t),
where
Example parameterizations
In some of our Python code deployed later in this lecture, we'll assume the following functional forms:
The tax distortion function
Calvo's and Chang's purpose is not to model the causes of tax distortions in
any detail but simply to summarize
the outcome of those distortions via the function
A key part of the specification is that tax distortions are increasing in the absolute value of tax revenues.
Ramsey plan:
A Ramsey plan is a competitive equilibrium that
maximizes {eq}eqn_chang_ramsey1
.
Within-period timing of decisions is as follows:
- first, the government chooses
$h_t$ and$x_t$ ; - then given
$\vec q$ and its expectations about future values of$x$ and$y$ ’s, the household chooses$M_t$ and therefore$m_t$ because$m_t = q_t M_t$ ; - then output
$y_t = f(x_t)$ is realized; - finally
$c_t = y_t$
This within-period timing confronts the government with
choices framed by how the private sector wants to respond when the
government takes time
This consideration will be important in lecture {doc}credible government policies <chang_credible>
when
we study credible government policies.
The model is designed to focus on the intertemporal trade-offs between the welfare benefits of deflation and the welfare costs associated with the high tax collections required to retire money at a rate that delivers deflation.
A benevolent time
To promote the welfare increasing effects of high real balances, the government wants to induce gradual deflation.
Given
First-order conditions with respect to
The last equation expresses Karush-Kuhn-Tucker complementary slackness conditions (see here).
These insist that the inequality is an equality at an interior solution for
Using
:label: eqn_chang_ramsey4
m_t [u'(c_t) - v'(m_t) ] \leq \beta u'(f(x_{t+1})) m_{t+1} h_{t+1},
\quad = \text{ if } m_t < \bar m
Define the following key variable
:label: eqn_chang_ramsey5
\theta_{t+1} \equiv u'(f(x_{t+1})) m_{t+1} h_{t+1}
This is real money balances at time
From the standpoint of the household at time eqn_chang_ramsey5
shows that
By "intermediates" we mean that the future paths
The observation that the one dimensional promised marginal utility of real
balances
A closely related observation pervaded the analysis of Stackelberg plans
in lecture {doc}dynamic Stackelberg problems <dyn_stack>
.
Definition:
- A government policy is a pair of sequences
$(\vec h,\vec x)$ where$h_t \in \Pi \ \forall t \geq 0$ . - A price system is a nonnegative value of money sequence
$\vec q$ . - An allocation is a triple of nonnegative sequences
$(\vec c, \vec m, \vec y)$ .
It is required that time
Definition:
Given
-
$m_t = q_t M_t$ and$y_t = f(x_t)$ . - The government budget constraint is satisfied.
- Given
$\vec q, \vec x, \vec y$ ,$(\vec c, \vec m)$ solves the household’s problem.
Chang constructs the following objects
- A set
$\Omega$ of initial marginal utilities of money$\theta_0$ - Let
$\Omega$ denote the set of initial promised marginal utilities of money$\theta_0$ associated with competitive equilibria. - Chang exploits the fact that a competitive equilibrium consists of a first
period outcome
$(h_0, m_0, x_0)$ and a continuation competitive equilibrium with marginal utility of money$\theta _1 \in \Omega$ .
- Let
- Competitive equilibria that have a recursive representation
-
A competitive equilibrium with a recursive representation consists of an initial
$\theta_0$ and a four-tuple of functions$(h, m, x, \Psi)$ mapping$\theta$ into this period’s$(h, m, x)$ and next period’s$\theta$ , respectively. -
A competitive equilibrium can be represented recursively by iterating on
:label: Chang500 \begin{split} h_t & = h(\theta_t) \\ m_t & = m(\theta_t) \\ x_t & = x(\theta_t) \\ \theta_{t+1} & = \Psi(\theta_t) \end{split}
starting from
$\theta_0$ The range and domain of
$\Psi(\cdot)$ are both$\Omega$
-
- A recursive representation of a Ramsey plan
- A recursive representation of a Ramsey plan is a recursive
competitive equilibrium
$\theta_0, (h, m, x, \Psi)$ that, among all recursive competitive equilibria, maximizes$\sum_{t=0}^\infty \beta^t \left[ u(c_t) + v(q_t M_t ) \right]$ . - The Ramsey planner chooses
$\theta_0, (h, m, x, \Psi)$ from among the set of recursive competitive equilibria at time$0$ . - Iterations on the function
$\Psi$ determine subsequent$\theta_t$ ’s that summarize the aspects of the continuation competitive equilibria that influence the household’s decisions. - At time
$0$ , the Ramsey planner commits to this implied sequence${\theta_t}_{t=0}^\infty$ and therefore to an associated sequence of continuation competitive equilibria.
- A recursive representation of a Ramsey plan is a recursive
competitive equilibrium
- A characterization of time-inconsistency of a Ramsey plan
- Imagine that after a ‘revolution’ at time
$t \geq 1$ , a new Ramsey planner is given the opportunity to ignore history and solve a brand new Ramsey plan. - This new planner would want to reset the
$\theta_t$ associated with the original Ramsey plan to$\theta_0$ . - The incentive to reinitialize
$\theta_t$ associated with this revolution experiment indicates the time-inconsistency of the Ramsey plan. - By resetting
$\theta$ to$\theta_0$ , the new planner avoids the costs at time$t$ that the original Ramsey planner must pay to reap the beneficial effects that the original Ramsey plan for$s \geq t$ had achieved via its influence on the household’s decisions for$s = 0, \ldots, t-1$ .
- Imagine that after a ‘revolution’ at time
A competitive equilibrium is a triple of sequences
eqn_chang_ramsey2
, {eq}eqn_chang_ramsey3
, and {eq}eqn_chang_ramsey4
.
Chang works with a set of competitive equilibria defined as follows.
Definition: eqn_chang_ramsey2
, {eq}eqn_chang_ramsey3
, and {eq}eqn_chang_ramsey4
are satisfied
Chang establishes that
Chang makes the following key observation that combines ideas of Abreu, Pearce,
and Stacchetti {cite}APS1990
with insights of Kydland and Prescott {cite}kydland1980dynamic
.
Proposition: The continuation of a competitive equilibrium is a competitive equilibrium.
That is,
(Lecture {doc}dynamic Stackelberg problems <dyn_stack>
also used a version of this insight)
We can now state that a Ramsey problem is to
subject to restrictions {eq}eqn_chang_ramsey2
, {eq}eqn_chang_ramsey3
, and {eq}eqn_chang_ramsey4
.
Evidently, associated with any competitive equilibrium
To bring out a recursive structure inherent in the Ramsey problem, Chang defines the set
Equation {eq}eqn_chang_ramsey4
inherits from the household’s Euler equation for
money holdings the property that the value of
This dependence is captured in the definition above by making
Chang establishes that
Next Chang advances:
Definition:
Thus,
If we knew the sets
-
Find the indirect value function
$w(\theta)$ defined as$$ w(\theta) = \max_{(\vec m, \vec x, \vec h) \in \Gamma(\theta)} \sum_{t=0}^\infty \beta^t \left[ u(f(x_t)) + v(m_t) \right] $$
-
Compute the value of the Ramsey outcome by solving
$\max_{\theta \in \Omega} w(\theta)$ .
Thus, Chang states the following
Proposition:
:label: eqn_chang_ramsey7
w(\theta) = \max_{x,m,h,\theta'} \bigl\{ u(f(x)) + v(m) + \beta w(\theta') \bigr\}
where maximization is subject to
:label: eqn_chang_ramsey8
(m,x,h) \in E \ {\rm and} \ \theta' \in \Omega
and
:label: eqn_chang_ramsey9
\theta = u'(f(x)) (m+x)
and
:label: eqn_chang_ramsey10
-x = m(1-h)
and
:label: eqn_chang_ramsey11
m \cdot [ u'(f(x)) - v'(m) ] \leq \beta \theta' , \quad = \ {\rm if} \ m < \bar m
Before we use this proposition to recover a recursive representation of the
Ramsey plan, note that the proposition relies on knowing the set
To find kydland1980dynamic
together with a method based on the
Abreu, Pearce, and Stacchetti {cite}APS1990
iteration to convergence on an
operator
We want an operator that maps a continuation
Chang lets
Elements of the set
Chang defines an operator
such that {eq}eqn_chang_ramsey9
, {eq}eqn_chang_ramsey10
,
and {eq}eqn_chang_ramsey11
hold.
Thus,
Proposition:
-
$Q \subset B(Q)$ implies$B(Q) \subset \Omega$ (‘self-generation’). -
$\Omega = B(\Omega)$ (‘factorization’).
The proposition characterizes
It is easy to establish that
This property allows Chang to compute
Let
A government strategy
Chang restricts the government’s choice of strategies to the following space:
In words,
Chang observes that
Definition:
Admissibility of
After any history
In words,
Remark: $CE_\pi^0 = {h \in \Pi: \text{ there is } \ (m,\theta') \in [0, \bar m] \times \Omega \ \text{ such that }
m u'[ f((h-1)m) - v'(m)] \leq \beta \theta' \ \text{ with equality if } \ m < \bar m }$.
Definition:
An allocation rule is a sequence of functions
Thus, the time
Definition: Given an admissible government strategy
At this point it is convenient to introduce another operator that can be used to compute a Ramsey plan.
For computing a Ramsey plan, this operator is wasteful because it works with a state vector that is bigger than necessary.
We introduce this operator because it helps to prepare
the way for Chang’s operator called credible government policies <chang_credible>
.
It is also useful because a fixed point of the operator to
be defined here provides a good guess for an initial set
from which to initiate iterations on Chang’s set-to-set operator credible government policies <chang_credible>
.
Let
Let
Let
Think of using pairs
Define the operator
such that
:label: eqn_chang_ramsey120
w = u(f(x( h))) + v(m( h)) + \beta w'( h)
:label: eqn_chang_ramsey130
\theta = u'(f(x( h))) ( m( h) + x( h))
:label: eqn_chang_ramsey_150
x(h) = m(h) (h-1)
:label: eqn_chang_ramsey160
m(h) (u'(f(x(h))) - v'(m(h))) \leq \beta \theta'(h)
It is possible to establish.
Proposition:
- If
$Z \subset D(Z)$ , then$D(Z) \subset S$ (‘self-generation’). -
$S = D(S)$ (‘factorization’).
Proposition:
- Monotonicity of
$D$ :$Z \subset Z'$ implies$D(Z) \subset D(Z')$ . -
$Z$ compact implies that$D(Z)$ is compact.
It can be shown that
This
Further, we can compute
As a very useful by-product, the algorithm that finds the largest fixed
point
Above we have defined the
such that
We noted that the set
Our implementation builds on ideas in this notebook.
To find
It was invented by Judd, Yeltekin, Conklin {cite}JuddYeltekinConklin2003
.
This algorithm constructs the smallest convex set that contains the
fixed point of the
Given that we are finding the smallest convex set that contains
Let
We approximate
A key feature of this algorithm is that we discretize the action space,
i.e., we create a grid of possible values for
The outer hyperplane approximation algorithm proceeds as follows:
- Initialize subgradients,
$H$ , and hyperplane levels,$C_0$ . - Given a set of subgradients,
$H$ , and hyperplane levels,$C_t$ , for each subgradient$h_i \in H$ :- Solve a linear program (described below) for each action in the action space.
- Find the maximum and update the corresponding hyperplane level,
$C_{i,t+1}$ .
- If
$|C_{t+1}-C_t| > \epsilon$ , return to 2.
Step 1 simply creates a large initial set
Given some set
To do this, for each subgradient
subject to
This problem maximizes the hyperplane level for a given set of actions.
The second part of Step 2 then finds the maximum possible hyperplane level across the action space.
The algorithm constructs a sequence of progressively smaller sets
Step 3 ends the algorithm when the difference between these sets is small enough.
We have created a Python class that solves the model assuming the following functional forms:
The remaining parameters
Below we use the class to solve the model and plot the resulting
equilibrium set, once with
(Here we have set the number of subgradients to 10 in order to speed up the code for now - we can increase accuracy by increasing the number of subgradients)
:load: _static/lecture_specific/chang_credible/changecon.py
ch1 = ChangModel(β=0.3, mbar=30, h_min=0.9, h_max=2, n_h=8, n_m=35, N_g=10)
ch1.solve_sustainable()
def plot_competitive(ChangModel):
"""
Method that only plots competitive equilibrium set
"""
poly_C = polytope.Polytope(ChangModel.H, ChangModel.c1_c)
ext_C = polytope.extreme(poly_C)
fig, ax = plt.subplots(figsize=(7, 5))
ax.set_xlabel('w', fontsize=16)
ax.set_ylabel(r"$\theta$", fontsize=18)
ax.fill(ext_C[:,0], ext_C[:,1], 'r', zorder=0)
ChangModel.min_theta = min(ext_C[:, 1])
ChangModel.max_theta = max(ext_C[:, 1])
# Add point showing Ramsey Plan
idx_Ramsey = np.where(ext_C[:, 0] == max(ext_C[:, 0]))[0][0]
R = ext_C[idx_Ramsey, :]
ax.scatter(R[0], R[1], 150, 'black', 'o', zorder=1)
w_min = min(ext_C[:, 0])
# Label Ramsey Plan slightly to the right of the point
ax.annotate("R", xy=(R[0], R[1]), xytext=(R[0] + 0.03 * (R[0] - w_min),
R[1]), fontsize=18)
plt.tight_layout()
plt.show()
plot_competitive(ch1)
ch2 = ChangModel(β=0.8, mbar=30, h_min=0.9, h_max=1/0.8,
n_h=8, n_m=35, N_g=10)
ch2.solve_sustainable()
plot_competitive(ch2)
In this section we solve the Bellman equation confronting a continuation Ramsey planner.
The construction of a Ramsey plan is decomposed into a two subproblems in {doc}Ramsey plans, time inconsistency, sustainable plans <calvo>
and {doc}dynamic Stackelberg problems <dyn_stack>
.
- Subproblem 1 is faced by a sequence of continuation Ramsey planners at
$t \geq 1$ . - Subproblem 2 is faced by a Ramsey planner at
$t = 0$ .
The problem is:
subject to:
To solve this Bellman equation, we must know the
set
We have solved the Bellman equation for the two sets of parameter values for which we computed the equilibrium value sets above.
Hence for these parameter configurations, we know the bounds of
The two sets of parameters
differ only in the level of
From the figures earlier in this lecture, we know that when
ch1 = ChangModel(β=0.3, mbar=30, h_min=0.99, h_max=1/0.3,
n_h=8, n_m=35, N_g=50)
ch2 = ChangModel(β=0.8, mbar=30, h_min=0.1, h_max=1/0.8,
n_h=20, n_m=50, N_g=50)
ch1.solve_bellman(θ_min=0.01, θ_max=0.0499, order=30, tol=1e-6)
ch2.solve_bellman(θ_min=0.045, θ_max=0.15, order=30, tol=1e-6)
First, a quick check that our approximations of the value functions are good.
We do this by calculating the residuals between iterates on the value function on a fine grid:
max(abs(ch1.resid_grid)), max(abs(ch2.resid_grid))
The value functions plotted below trace out the right edges of the sets of equilibrium values plotted above
fig, axes = plt.subplots(1, 2, figsize=(12, 4))
for ax, model in zip(axes, (ch1, ch2)):
ax.plot(model.θ_grid, model.p_iter)
ax.set(xlabel=r"$\theta$",
ylabel=r"$J(\theta)$",
title=rf"$\beta = {model.β}$")
plt.show()
The next figure plots the optimal policy functions; values of
for model in (ch1, ch2):
fig, axes = plt.subplots(2, 2, figsize=(12, 6), sharex=True)
fig.suptitle(rf"$\beta = {model.β}$", fontsize=16)
plots = [model.θ_prime_grid, model.m_grid,
model.h_grid, model.x_grid]
labels = [r"$\theta'$", "$m$", "$h$", "$x$"]
for ax, plot, label in zip(axes.flatten(), plots, labels):
ax.plot(model.θ_grid_fine, plot)
ax.set_xlabel(r"$\theta$", fontsize=14)
ax.set_ylabel(label, fontsize=14)
plt.show()
With the first set of parameter values, the value of
But with the second set of parameters it converges to a value in the interior of the set.
Consequently, the choice of
One way of seeing this is plotting
With the first set of parameter values, this function does not intersect the
45-degree line until
fig, axes = plt.subplots(1, 2, figsize=(12, 4))
for ax, model in zip(axes, (ch1, ch2)):
ax.plot(model.θ_grid_fine, model.θ_prime_grid, label=r"$\theta'(\theta)$")
ax.plot(model.θ_grid_fine, model.θ_grid_fine, label=r"$\theta$")
ax.set(xlabel=r"$\theta$", title=rf"$\beta = {model.β}$")
axes[0].legend()
plt.show()
Subproblem 2 is equivalent to the planner choosing the initial value of
From this starting point, we can then trace out the paths for
These are shown below for both sets of parameters
for model in (ch1, ch2):
fig, axes = plt.subplots(2, 2, figsize=(12, 6))
fig.suptitle(rf"$\beta = {model.β}$")
plots = [model.θ_series, model.m_series, model.h_series, model.x_series]
labels = [r"$\theta$", "$m$", "$h$", "$x$"]
for ax, plot, label in zip(axes.flatten(), plots, labels):
ax.plot(plot)
ax.set(xlabel='t', ylabel=label)
plt.show()
In {doc}Credible Government Policies in Chang Model <chang_credible>
we shall find
a subset of competitive equilibria that are sustainable
in the sense that a sequence of government administrations that chooses
sequentially, rather than once and for all at time
In the process of constructing them, we shall construct another, smaller set of competitive equilibria.