Implementing an Agent-Based General Equilibrium Model

Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Implementing an Agent-Based General
Equilibrium Model
Heber Farnsworth
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
1
Background
2
Motivational Example
3
Generalizing via Agent-Based Modeling
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Pure Exchange General Equilibrium
We shall take N dividend processes δn (t) as exogenous
with a distribution which is known to all agents
There are a large number of agents with differing utilities
who trade claims to these cash flows
Relevant prices are the interest rate, r (t), and a price of
risk vector, θ(t)
Markets clear: in aggregate all cash flows are consumed
and all claims are held
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Bayesian Equilibrium
Agents know the possible types of other investors in the
market but do not know the wealth of each type
Each agent knows there may be many others of his own
type and so knowing his own wealth does not help him
infer the distribution of wealth across types
All agents start out with homogeneous beliefs about this
distribution
Observing equilibrium r (t) and θ(t) provides the
information for updating this distribution
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Stochastic Discount Factors
Recall that the stochastic factor, H(t) gives the time t price
of any asset which pays cash flow ξ at T as
1
Et [ξH(T )]
H(t)
It’s dynamics are
dH(t)
= −r (t)dt − θ(t)> dW (t)
H(t)
What we are looking for is the dynamics of H(t) in terms of
the observables
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
A Simple Example
Suppose that all agents have log utility over consumption
but different rates of time preference
There is only one risky asset and agents own proportions
wk of it.
"Z
#
T
max E
e−ρk t log(ck (t))dt
ck (t)
subject to
"Z
0
#
T
"Z
H(t)ck (t)dt = E
E
0
#
T
H(t)wk δ(t)dt
0
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Solution to Agent’s Problems
The solutions to the agents’ problem are given by
ck (t) =
where
γk =
1 −ρk t
e
γk xk
H(t)
ρk
1 − e−ρk T
and xk is the total starting wealth of agents of type k .
By starting wealth we mean the value of the endowment
stream of this type
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Aggregation
Since in equilibrium all cash flows are consumed we must
have that
1 X −ρk t
δ(t) =
e
γk xk
H(t)
k
Investors know that this must hold but they don’t know the
xk
But their beliefs must be consistent with this market
clearing condition
δ(t) =
1 X −ρk t
e
γk Et [xk ]
H(t)
k
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Updating
Let Yk (t) = Et [xk ] be the common beliefs of agents at time
t about the starting wealth of type k
This must a non-negative martingale so it follows that it is
an exponential martingale
dYk (t)
= vk (t)> dW (t)
Yk (t)
This extra uncertainty must be reflected in the stochastic
discount factor dynamics
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Equilibrium
Applying the Ito formula to the market clearing condition
and matching coefficients we obtain
PK
k =1
r (t) = P
K
e−ρk t γk Yk (t)ρk
−ρk t γ Y (t)
k k
k =1 e
+ µδ (t) − θ(t)> θ(t)
PK
θ(t) = σδ (t) −
−ρk t γ Y (t)v (t)
k k
k
k =1 e
PK
−ρ
t
k
γk Yk (t)
k =1 e
If all the ρk were the same and the vk were zero then we
would have the classical result
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Why is this Interesting?
Notice that even with log-normal endowment shocks we
have stochastic interest rates and risk prices in this model
Empirical research suggests that a large portion of the
variation in prices that we observe is due to time varying
risk-prices
But the source of the change in risk prices has been hard
to identify
Here we find that at least part of it is due to aggregate
uncertainty about market structure
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
The Goal
We want to be able to show how shocks propegate from
one asset class to another, i.e. subprime CMOs to general
stock market
This means we need more than one risky asset
We expect that the mechanism is that losses in one asset
class changes the wealth of one type of investor
disproportionately which causes large changes in risk
pricing
So investor types must be quite different from eachother
We may even need to constrain some investors
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Other Utility Functions
The model just presented is the only one that can be
solved analytically
Non-log investors are necessary for realism – consider the
HARA class
We can solve for optimal consumption and investment
behavior for HARA investors but only with certain class of
distributions for r (t) and θ(t)
So we must assume that even with updating we always
stay within this class
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Agents with Metacognition
In computer science intelligent agents are able to choose
from a set of actions based on observed data
In this work the agents are smarter than that in that they
know their beliefs might be wrong and can adjust
Agents also observe the results of their actions (equilibrium
r (t) and θ(t)) and determine if this is consistent with their
observations and beliefs – introspection
If not then they update their beliefs before taking new
actions – reflection
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Gaussian State Vector
Agents know that endowment growth rate is linear in a
state vector Y which satisfies
dY (t) = K (Θ − Y (t)dt + ΣdW (t)
They believe that
r (t) = d0 + d1> Y (t) + Y (t)> d2 Y (t)
and
θ(t) = θ0 + θ1> Y (t)
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Updating
Investors are assumed to see Y (t) each period
Equilibrium r (t) and θ(t) are also observed
The parameters of the functions that relate r (t) and θ(t) to
Y (t) are updated each period to reconcile these
observations
Ideally we would like this to take place during the
market-clearing process, but the computational burden is
high
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Consumption Choice
HARA investors optimal consumption
ck (t) =
Xk (t)
Gk (t, T )
where Xk (t) is current wealth and
Z
T
Gk (t, T ) ≡
e−ρk βk (s−t) Fk (t, s)ds
t
where βk is a risk tolerance parameter and F is a function
of Y and t which solves a parabolic PDE
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Exponential Quadratic Forms
The Guassian state vector and the assumed forms of µδ ,
r (t) and θ(t) guarantee that this PDE has a solution of the
form
1
>
>
Fk (t, T ) = exp C(τ ) + D(τ ) Y (t) + Y (t) Q(τ )Y (t)
2
where τ = T − t
The function C, D, and Q satisfy a particular set of ODEs
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Investment Decision
A HARA investor chooses investments according to
−1
−1
πk (t) = βk X (t) σ(t)>
θ(t) + Xk (t) σ(t)>
gk (t, T )
where gk (t, T ) is the volatility of Gk (t, T )
But to know σ(t) we need to be able to compute prices of
risky assets
This is another set of PDEs
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Market Clearing
The market clearing r (t) and θ(t) are determined by
numerical search
The observed Y (t) and the updated parameters determine
agent demands for consumption and investment
So at each iteration in finding market clearing we need to
solve a set of ODEs and do several numerical integrations
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model
Outline
Background
Motivational Example
Generalizing via Agent-Based Modeling
Open Questions
We do not yet know how to incorporate the extra variation
caused by updating into the H(t)
We can make guesses about it’s magnitude and
incorporate those guesses
But then we may have to run the model long enough to
calibrate these guesses to reality
Lots of CPU crunching ahead of us
Heber Farnsworth
Implementing an Agent-Based General Equilibrium Model