A “Simple” 3-period-lived agent OG model#
Why this “simple” theory?#
Almost every module of the OG-Core model is straightforward on its own in terms of theory, mathematics, and intuition. Most undergraduate students with basic economics and mathematical training are able to understand them quickly. Examples include:
The
household.py
module that has all the functions that come from the theory of household decision making in the “Households” chapter of the OG-Core documentation,The
firm.py
module that has all the functions that come from the theory of firms’ decisions about how much capital to rent and how much labor to hire as described in the “Firms” chapter of the OG-Core documentation, andThe
demographics.py
module that has the functions that generate the population distribution and how it changes over time as described in the “Demographics” chapter of the OG-Core documentation.
In contrast, users of the country calibrations of the OG-Core macroeconomic model often struggle to understand the difference and relationship between the steady-state equilibrium solution and the transition path equilibrium solution and why those algorithms in SS.py
and TPI.py
are so complex. Indeed, understanding the transition path solution algorithm often requires more in-depth theoretical and mathematical training.
The text of this chapter is almost exactly Chapter 2 of [DeBacker and Evans, 2024].[1] The model presented in this chapter is nearly the simplest version of the OG model. It is “nearly” the simplest because we start with overlapping generations of agents who live for three periods. The simplest overlapping generations model is a two-period-lived agent model as described in Chapter 1 of [DeBacker and Evans, 2024]. Although the two-period-lived agent model seems like the natural starting place, that model is fundamentally different from any OG model in which agents live for three periods or more.[2] We start with the three-period-lived agent model because its solution method and results are similar for all life spans
The model presented here is a perfect foresight, three-period-lived agent OG model. The model in this chapter has trivial demographics in that a unit measure of agents are born each period, and each generation of agents lives for three periods. There is no population growth because the population in each period equals 3 (young, middle-aged, and old), and the mortality rate is zero in every period except the last period in which it is one. And the agents inelastically supply labor. We also characterize “nearly” the simplest production sector with a unit measure of infinitely lived, perfectly competitive firms that rent capital and hire labor from households.[3] There is no government sector in that agents and firms in the model pay no taxes nor receive any transfers.
Households#
A unit measure of identical individuals are born each period and live for three periods. Let the age of an individual be indexed by
where
We assume the individuals supply a unit of labor inelastically in the first two periods of life and are retired in the last period of life.
We also assume that individuals are born with no savings
These assumptions give rise to the three age-specific budget constraints derived from the general version Equation (18).[4]
We assume that consumption must be nonnegative
Let the utility of consumption in each period be defined by a function
where the parameter
Individuals choose lifetime consumption
The number of variables to choose in the household’s optimization problem can be reduced by substituting the budget constraints into the optimization problem Equation (24) and assuming that the non-negativity constraints on the two capital stocks do not bind.[6]
The optimal choice of how much to save in the second period of life
Equation (26) implies that the optimal savings for age-2 individuals is a function
The optimal choice of how much to save in the first period of life
Notice that the term in the brackets on the third line of Equation (28) equals zero because of the optimality condition Equation (26) for
Equation (29) implies that the optimal savings for age-1 individuals is a function of the wages in that period and the next period and the interest rate in the next period and in the period after that.[7]
Instead of looking at the age-1 and age-2 savings decisions of a particular individual, which happen in consecutive periods, we could look at the age-1 savings decisions of the young in period
which implies that the period-
Define
As will be shown in Section Equilibrium, the state as defined in Definition 2 in every period
where the
Firms#
The economy also includes a unit measure of identical, perfectly competitive firms that rent investment capital from individuals for real return
We assume that the price of the output in every period
where
Market clearing#
Three markets must clear in this model: the labor market, the capital market, and the goods market. Each of these equations amounts to a statement of supply equals demand.
The goods market clearing equation (41) is redundant by Walras’ Law.
Equilibrium#
Before providing exact definitions of the functional equilibrium concepts, we give a rough sketch of the equilibrium, so you can see what the functions look like and understand the exact equilibrium definition more clearly. A rough description of the equilibrium solution to the problem above is the following three points.
Markets clear according to Equations (39) and (40). These equations characterize the equilibrium and constitute a system of nonlinear difference equations.
The easiest way to understand the equilibrium solution is to substitute the market clearing conditions (39) and (40) into the firm’s optimal conditions (37) and (38) and solve for the equilibrium wage and interest rate as functions of the distribution of capital.
Now Equations (42) and (43) can be substituted into household Euler equations (29) and (31) to get the following two-equation system that completely characterizes the equilibrium.
The system of two dynamic equations (44) and (45) characterizing the decisions for
We first define the steady-state equilibrium, which is exactly identified. Let the steady state of endogenous variable
Definition 1 (Steady-state equilibrium)
A non-autarkic steady-state equilibrium in the perfect foresight overlapping generations model with
As we saw earlier in this section, the characterizing equations in Definition 1 reduce to (44) and (45) in every period. These two equations are exactly identified in the steady state. That is, they are two equations and two unknowns (
We can solve for steady-state
Now we can get ready to define the non-steady-state equilibrium. To do this, we need to define two other important concepts.
Definition 2 (State of a dynamical system)
The state of a dynamical system—sometimes called the state vector—is the smallest set of variables that completely summarizes all the information necessary for determining the future of the system at a given point in time.
In the 3-period-lived agent, perfect foresight, OG model described in this section, the state vector can be seen in equations (44) and (45). What is the smallest set of variables that completely summarize all the information necessary for the three generations of all three generations living at time
Definition 3 (Stationary function)
We define a stationary function to be a function that only depends upon its arguments and does not depend upon time.
The relevant examples of stationary functions in this model are the policy functions for saving and investment. We defined the functions
With the concept of the state of a dynamical system and a stationary function, we are ready to define a functional non-steady-state equilibrium of the model.
Definition 4 (Non-steady-state functional equilibrium)
A non-steady-state functional equilibrium in the perfect foresight overlapping generations model with
households have symmetric beliefs
about the evolution of the distribution of savings as characterized in Equation (34), and those beliefs about the future distribution of savings equal the realized outcome (rational expectations):
We have already shown how to boil down the characterizing equations in Definition 4 to two equations (44) and (45). But we have also seen that those two equations are not identified. So how do we solve for these equilibrium functions? The solution to the non-steady-state equilibrium in Definition 4 is a fixed point in function space. Choose two functions
Solution method: time path iteration (TPI)#
The benchmark conventional solution method for the non-steady-state rational expectations equilibrium transition path in OG models was originally outlined in a series of papers between 1981 and 1985,[11] in chapter 4 of the seminal book [Auerbach and Kotlikoff, 1987] for the perfect foresight case, and in Appendix II of [Nishiyama and Smetters, 2007] and Section 3.1 of [Evans and Phillips, 2014] for the stochastic case. We call this method time path iteration (TPI). The idea is that the economy is infinitely lived, even though the agents that make up the economy are not. Rather than recursively solving for equilibrium policy functions by iterating on individual value functions, one must recursively solve for the policy functions by iterating on the entire transition path of the endogenous objects in the economy (see Chapter 17 of [Stokey et al., 1989]). [Evans and Phillips, 2014] give a good description of how to implement this method.
The key assumption is that the economy will reach the steady-state equilibrium
Given the initial capital distribution
Notice that everything in equation (48) is known except for the savings decision
The next step is to solve for
Everything is known in these two equations except for
At this point, we have solved for the distribution of capital
Let
If the fixed point has not been found
This process is repeated until the initial transition path for the aggregate capital stock is consistent with the transition path implied by those beliefs and household and firm optimization. TPI solves for the equilibrium transition path from Definition 4 by finding a fixed point in the time path of the economy.
Calibration#
Use the following parameterization of the model for the problems below. Because agents live for only three periods, assume that each period of life is 20 years. If the annual discount factor is estimated to be 0.96, then the 20-year discount factor is
Exercises#
Exercise 1 (Checking feasibility of guesses for b_vec)
Using the calibration from Section Calibration of this chapter, write a Python function named feasible()
that has the following form,
b_cnstr, c_cnstr, K_cnstr = feasible(f_params, bvec_guess)
where the inputs are a tuple f_params = (nvec, A, alpha, delta)
, and a guess for the steady-state savings vector bvec_guess = np.array([scalar, scalar])
. The outputs should be Boolean (True
or False
, 1
or 0
) vectors of lengths 2, 3, and 1, respectively. K_cnstr
should be a singleton Boolean that equals True
if f_params
and bvec_guess
. The object c_cnstr
should be a length-3 Boolean vector in which the True
if f_params
and bvec_guess
. And b_cnstr
is a length-2 Boolean vector that denotes which element of bvec_guess
is likely responsible for any of the consumption nonnegativity constraint violations identified in c_cnstr
. If the first element of c_cnstr
is True
, then the first element of b_cnstr
is True
. If the second element of c_cnstr
is True
, then both elements of b_cnstr
are True
. And if the last element of c_cnstr
is True
, then the last element of b_cnstr
is True
.
Which, if any, of the constraints is violated if you choose an initial guess for steady-state savings of
bvec_guess = np.array([1.0, 1.2])
?Which, if any, of the constraints is violated if you choose an initial guess for steady-state savings of
bvec_guess = np.array([0.06, -0.001])
?Which, if any, of the constraints is violated if you choose an initial guess for steady-state savings of
bvec_guess = np.array([0.1, 0.1])
?
Exercise 2 (Computing the steady-state equilibrium)
Use the calibration from Section Calibration and the steady-state equilibrium Definition 1. Write a function named get_SS()
that has the following form,
ss_output = get_SS(params, bvec_guess, SS_graphs)
where the inputs are a tuple of the parameters for the model params = (beta, sigma, nvec, L, A, alpha, delta, SS_tol)
, an initial guess of the steady-state savings bvec_guess
, and a Boolean SS_graphs
that generates a figure of the steady-state distribution of consumption and savings if it is set to True
. The output object ss_output
is a Python dictionary with the steady-state solution values for the following endogenous objects.
ss_output = {
'b_ss': b_ss, 'c_ss': c_ss, 'w_ss': w_ss, 'r_ss': r_ss,
'K_ss': K_ss, 'I_ss': I_ss, 'Y_ss': Y_ss, 'C_ss': C_ss,
'EulErr_ss': EulErr_ss, 'RCerr_ss': RCerr_ss,
'ss_time': ss_time
}
Let ss_time
be the number of seconds it takes to run your steady-state program. You can time your program by importing the time
library.
import time
...
start_time = time.time() # Place at beginning of get_SS()
...
ss_time = time.time() - start_time # Place at end of get_SS()
And let the object EulErr_ss
be a length-2 vector of the two Euler errors from the resulting steady-state solution given in difference form RCerr_ss
is a resource constraint error which should be close to zero. It is given by
Solve numerically for the steady-state equilibrium values of
, , , , , , , the two Euler errors and the resource constraint error. List those values. Time your function. How long did it take to compute the steady-state?Generate a figure that shows the steady-state distribution of consumption and savings by age
and .What happens to each of these steady-state values if all households become more patient
(an example would be )? That is, in what direction does move each steady-state value , , , and ? What is the intuition?
Exercise 3 (Computing the transition path equilibrium)
Use the calibration from Section Calibration and the steady-state solution from part 1 of Exercise 2. Use time path iteration (TPI) to solve for the non-steady state equilibrium transition path of the economy from
Report the maximum of the absolute values of all the Euler errors across the entire time path. Also report the maximum of the absolute value of all the aggregate resource constraint errors
across the entire time path.Plot the equilibrium time paths of the aggregate capital stock
, wage , and interest rate .How many periods did it take for the economy to get within 0.00001 of the steady-state aggregate capital stock
? What is the period after which the aggregate capital stock never is again farther than 0.00001 away from the steady-state?
Footnotes#
This section contains the footnotes for this chapter.