momentum trading and large movements in asset...
TRANSCRIPT
-
Momentum Trading and Large Movements in Asset
Prices
Abhishek Mistry ∗
This Draft: June 15, 2007
Abstract
I investigate large movements in stock prices. Large movements in the S&P 500 are
often reversed by large movements in the opposite direction. I propose a simulation
model of a financial market which endogenously generates this feature of returns. The
model comprises two types of traders: positive-feedback traders and traders that trade
based on their belief of fundamental value. In the long run prices follow the fundamental
trader beliefs; however, momentum traders are able to destabilize prices in the short
term, causing temporary jumps which are then reversed. The model predicts tail
fatness, negative autocorrelation of large returns, and can generate an option implied
volatility smile.
∗Stern School of Business, New York University, [email protected]. I am especially grateful to mydissertation committee Robert Whitelaw, Robert Engle, and Stephen Figlewski. Many thanks as well toDavid Easley, Edwin Elton, Martin Gruber, Gideon Saar, Marti Subrahmanyam, and seminar participantsat NYU for numerous thoughts and suggestions.
1
-
The non-normality of stock returns is a well documented phenomenon. Daily returns
tend to exhibit fat tails and negative skewness. A number of studies have sought to explain
the statistical process that generates these features. Papers such as Bekaert and Wu (2000)
and Campbell and Hentschel (1992) use models of asymmetric GARCH volatility to match
the time series of returns. Others, such as Duffie, Pan, and Singleton (2000) and Heston
(1993), use continous time return dynamics of stochastic volatility and jumps to match return
moments and options prices.
In this paper I attempt to model the underlying economic dynamics that cause large
movements in prices. As documented by Shiller (1981), LeRoy and Porter (1981), Cutler,
Poterba, and Summers (CPS) (1989), and others, stock price movements on a daily level do
not seem to coincide with fundamental shocks, a finding that has come to be known as the
“volatility puzzle.” CPS in particular documented the largest 50 S&P 500 index movements
during 1941-1987 and found the subsequent New York Times explanations to be utterly
lacking. On the day following the fourth largest movement, a -6.73% return, the Times
reported “No basic reason for the assault on prices.”
Not only do large movements appear unrelated to fundamentals, they are often reversed.
In the month following the October 1987 crash, markets rallied and the crash was reversed.
In fact, only two days following the crash, markets rallied 9.10%. The reversal effect is
apparent when looking at the estimated jump sizes from a jump-diffusion model of returns.
Consider the Merton (1976) extension of the geometric Brownian motion which adds Poisson
jumps.
dSt/St = µ dt + σ dBt + dNt∑j=0
(eZj − 1
)(1)
Here, jumps occur with intensity λ and are distributed normally as Zj ∼ N(µJ , σ2J). I
estimated this model on S&P 500 index returns using Markov Chain Monte Carlo1. Figure 1
1For details on the method see Johannes and Polson(2003).
2
-
presents estimated jump sizes of the index returns. Large movements in one direction appear
to occur immediately following large movements in the other direction. The largest positive
jumps appear on top of equally large negative jumps, especially during the late 1990s through
2001.
[Figure 1 about here.]
A more thorough statistical analysis is presented in Table 1, where the following time
series model is regressed via OLS for S&P 500 index returns as well as the SPDRS tracking
fund and returns on S&P 500 futures from 1993-2006.
rt = α0 + α1rt−1 + α2rt−1|rt−1|+ εt (2)
The autocorrelation of returns is statistically insignificant for the index and futures and is
economically small for all three, as seen in columns 1, 3, and 5. However, the coefficient
on rt−1|rt−1| is negative and highly significant for all three return series. The coefficient on
this interaction term indicates the autocorrelation of large movements. It is clear that large
movements in the index are reversed.
[Table 1 about here.]
A natural starting point for explaining temporary price deviations is some form of noise
trading. A large literature has analyzed the survival and price impact of noise traders who
are in competition with more rational agents 2. These papers have argued that noise traders
can survive in competition with rational agents for a very long horizon and that their trading
behavior can impact long run prices.
2See for example, Kogan, Ross, Wang, and Westerfield (2006), Yan (2006), Blume and Easley (2006),Shleifer and Vishny (1997), and Delong, Schleifer, Summers, and Waldman (1991,1990).
3
-
In this paper, however, I focus not on long run mispricing, but on short run price move-
ments. I build a model of temporary price movements caused by the interaction of positive-
feedback traders with fundamentals-based traders. Although fundamental traders outweigh
momentum traders in the model, due to random arrival of traders, several momentum traders
can enter the market sequentially and destabilize prices from their fundamental value. This
destabilization can cause temporary jumps in prices which are reversed as fundamental-based
agents trade prices back to their belief.
I chose to model momentum trading as opposed to other noise behavior because of the
prevalence of market activities that behave as momentum trading. For example, strategies
involving stop loss orders, dynamic portfolio insurance, or option replication will necessar-
ily buy stocks that have rallied and sell stocks that have fallen. These passive momentum
strategies are complemented by investors who actively chase momentum. Many technical an-
alysts have written books claiming use of a moving average trading rule. Grinblatt, Titman,
and Wermers (1995) documented that as many as 70% of mutual funds actively engage in
positive-feedback trading. Furthermore, even if funds do not chase momentum, fund flows in-
crease to funds that have experienced superior performance. If high performing funds simply
scale their holdings proportionately, they will necessarily buy stocks that have rallied.
This model differs from previous work along several dimensions. First, rather assuming
the noise traders has a constant incorrect belief such as Yan, the momentum traders’ beliefs
arise from past prices and are constantly changing depending on past returns. This gives
rise to a set of price dynamics not seen in a model with constant beliefs. Second, I focus on
very short term prices rather than the long run risk/return equilibrium. Long run prices in
the model simply follow the fundamental agents’ beliefs. Lastly and most radically, I employ
a new agent-based computational methodology to achieve my results.
Instead of a standard analytic general equilibrium model, I build a financial market
simulation using the behavior of the economic agents as a primitive. This reduced form
4
-
modeling technique allows for easy assimilation of complicated trading behaviors and inter-
actions into a dynamic model as well as facility in analyzing very short term behavior and
return moments. It is my sincere hope that this new methodology will aid other researchers
in developing the next generation of asset pricing models. The simulation approach is com-
plementary to analytic modeling; ideas and results found using simulation can be later be
modeled for an analytic solution. For a literature review on the agent-based finance area,
see Tesfatsion (2002) and LeBaron (2000). The basic concepts of agent-based simulations
and a framework for building a simulation are supplied in the appendix.
This paper is organized as follows. Section 1 presents a simulation model of momentum
trading. Section 2 analyzes the price and trading activity dynamics of the model. Next,
in Section 3 I estimate the parameters of the model to match features of S&P 500 returns.
After briefly discussing trader survival in Section 4, I then document how the model is
able to replicate various features of the data and discuss the options pricing implications in
Section 5. Lastly, Section 6 concludes and provides future directions for research.
1 Simulation Model
I begin by describing a simulation model of a financial market. The market consists of two
types of agents, momentum traders and fundamental traders, and a limit order book. There
is one riskless asset and one risky asset cleared by an electronic limit order book algorithm.
Traders place orders with the limit order book to buy and sell the risky asset, which gives
rise to a market price. The market microstructure follows.
There are distinct trading periods t = 0, 1, 2, . . . which correspond to days of trading and
100 traders. During each trading period, each trader has the opportunity to place orders
once. The order or trading is chosen randomly, with the one constraint that the first trader
to place orders is a fundamental trader.
5
-
During each trader’s turn, the trader may place buy and sell limit orders for any given
price. All orders are limit orders. Orders are cleared as soon as a matching counterparty is
found. Any orders that are not cleared at the end of a day are assumed to expire and are
thus discarded.
When an order is submitted, the limit order book algorithm checks to see if a matching
counterparty exists. If one exists, the trade is executed at the limit price given by the older
order. For example, suppose a sell order exists in the book at $100. A buyer issues an order
to buy the same number of shares with a limit price of $101. In this case, the trade would
be immediately executed at the price of $100. It is as if the buyer were simply picking off
the ask price. If, however, the buy order was issued first, the trade would be executed at
$101. The market maker algorithm does not collect a fee.
After executing a trade, any residual demand is saved in the order book. The highest
buy order limit price and lowest sell order limit price in the book are termed the bid and
ask prices. Denote ptj as the bid-ask average on day t after j traders have placed orders.
If there are no buy orders or no sell orders waiting, then define ptj as the last transaction
price. Denote ptC as the closing price, ie the last transaction price in day t.
There are 100 traders. The numbers of momentum traders and fundamental traders are
fixed. Each trader is initially endowed with 5000 shares of the stock and $500,000 cash. At
the end of each day, the trader’s cash earns interest at the annual rate of rf . The trader’s
stock earns a dividend yield each day at the annual rate of δ.
Each fundamental trader observes a signal at the beginning of each day which informs
them about the true value of the asset Vt. Specifically, each fundamental trader i forms a
belief of that day’s price Vti, which is given by the true value plus mean-zero noise.
V ati = Vt + εti , εti ∼ N(0, σ2N) (3)
6
-
During her turn, each fundamental trader will issue a buy order with limit price Vti − 0.01
and a sell order with limit price Vti + 0.01. The spread simply ensures that the orders do
not immediately cross.
The true asset value Vt is calculated once at the beginning of each day. In the next
section, I will set this process to generate impulse reponses, but in subsequent analysis the
asset value will follow a geometric Brownian motion.
dVt = µVt dt + σVt dBt (4)
Momentum traders follow a trading rule based not on the fundamental value but instead
on the current observed price and the previous day’s closing price. In particular, if the price
has increased since yesterday’s close, the momentum trader will issue a buy order. If the
price has declined, the momentum trader will issue a sell order. The limit price for these
orders is calculated as
V mti = ρ( ptjpt−1,C
− 1)ptj + ptj (5)
= (1− ρ)ptj + ρp2tj
pt−1,C(6)
for momentum trader i trading on day t after j other traders. The parameter ρ represents
the momentum traders’ perceived autocorrelation in returns. High positive values indicate
that these traders believe that the return since yesterday’s close is likely to be duplicated.
Lastly, all trades are placed with a quantity equal to a fixed fraction of wealth of the
trader placing the order at the time the order was placed, truncated to an integer value. The
quantity is
qti = kWtiptj
(7)
where Wti is the wealth of trader i after j traders have traded on day t and k is a constant
7
-
set large enough so there is positive demand. Unreported results show that the choice of
k matters only for wealth distributions and not for pricing. Higher values of k will lead to
greater wealth gains or losses for the traders.
This concludes the description of the model. Next, I examine the price and holdings
behavior of agents in response to two price shocks to illustrate the dynamics of the model.
2 Dynamics
Consider a three period world of trading. On the first day, the fundamental value V1 is $100.
On the second day, the fundamental value jumps 20% to $120. On the third day, the value
remains at $120.
If there were no momentum traders in the model, the price would instantly jump to
$120 and remain constant after. However, with the presence of momentum trading, these
dynamics are altered. Figure 2(b) shows the average asset holdings of each type of agent on
the day before, day of, and day after the fundamentals shock for 100,000 simulations of the
impulse response. The upper solid line shows the average momentum trader’s holdings of the
risky asset. On the day of the shock, the momentum trader purchases shares anticipating
that the price will continue to rise.
[Figure 2 about here.]
The effect of the momentum traders’ buying pressure is to increase prices. Figure 2(a)
shows the price movement after the shock. On the day of the shock, prices rise above
and beyond the fundamental value. This causes fundamental traders to sell believing the
stock is too expensive, which can be seen in their asset holdings. As Figure 2(b) indicates,
the holdings of the fundamental traders decrease as they sell to the momentum traders.
Consequently, the liquidity absorption by fundamental traders forces the price back toward
the fundamental value of $120.
8
-
The analogous effect can be seen for a downward movement in fundamentals. Consider a
scenario where the fundamental value drops from $100 to $80. Figures 2(c) and 2(d) report
the average prices and holdings across 100,000 simulations of this scenario. Again, there is
an overshooting effect caused by momentum trading. Momentum traders sell in response to
the price shock. Their selling causes the price to fall further than the fundamental value of
$80; however, on the next day the price recovers slightly towards its fundamental value.
Table 2 reports the distribution of prices for both the up and down impulses. The
distributions are heavily skewed following the fundamental shock. Note that median prices
did not exhibit a large amount of overshooting. However, in the runs where overshooting
occurred, it was greatly pronounced. Immediately following the 20% gain, prices ranged
from $117.60 to $1,822.60. Analogously, prices following the 20% loss were very negatively
skewed, with a range from $0.89 to $97.17.
[Table 2 about here.]
In the day following the shock, there was a tendency to again overshoot in the other
direction. As prices revert from the overshot value, momentum traders see the movement
and apply pressure in the same direction. If the price skyrocketed, the next day momentum
traders see the decline and cause the price to plummet beyond fundamental value. The
overshooting on the second day is more subdued, as evidenced by the mean prices being
much closer to fundamental value.
3 Estimation and Calibration
Having illustrated the dynamics of the model, I now proceed to set the model parameters. For
the remainder of the paper, I will assume the fundamental value process follows a geometric
Brownian motion.
9
-
There are eight parameters of the model. I set the riskfree rate to 5%, the dividend yield
to 5%, and the long run drift to 13%. The proportion of wealth traded in each order (k in
earlier notation) is set to 0.01, a value that yielded sufficient trading but did not result in
any one trader being driven out of the market.
Leaving out the effect of momentum traders, there are two parameters that affect long run
volatility of prices: the fundamental volatility σ and the volatility of the fundamental trader’s
signal noise σN . Panel A of Table 3 reports the variance of daily returns (in percentage
terms) simulated with no momentum traders and various pairs of σ and σN . S&P 500 index
returns in 1988-2005 had a daily variance of 1%. From the table, it is clear that there is
a range of possible combinations of fundamental and noise volatility that can generate any
given variance. For simplicity, I chose 15% fundamental volatility and 0.5% noise volatility,
numbers which yielded a realized variance close to the observed market variance.
[Table 3 about here.]
Next, I attempt to estimate the two key parameters of the model: the number of mo-
mentum traders m (out of a market of 100 traders) and the momentum traders’ perceived
autocorrelation ρ. With zero momentum traders or zero perceived autocorrelation the model
degenerates to a Black-Scholes type of framework. With a larger number of momentum
traders or increased perceived autocorrelation, there will be short-term price dynamics that
result from momentum trader overshooting.
To estimate these two parameters I turn to a simulated moments approach. Specifically,
for any given set of parameters m and ρ I simulate one year of returns several times and
calculate the variance, skewness, and kurtosis of each set of returns (denoted σ2t , St, and
Kt). Additionally, I estimate the jump model from equation (1) via MCMC on each set of
returns to get the estimated jump variance σ2Jt and jump intensity λt. I choose parameters
10
-
to minimize the objective criterion
minm,ρ
g′g (8)
where the moment equations g are given by
g(m, ρ) =1
T
T∑t=1
σ2t (m, ρ)− σ20St(m, ρ)− S0Kt(m, ρ)−K0σ2Jt(m, ρ)− σ2J0λt(m, ρ)− λ0
(9)Here the population values σ20, S0, K0, σ
2J0, and λ0 are the variance, skewness, kurtosis,
jump variance, and jump intensity of S&P 500 returns from 1988-2005.
Panel B of Table 3 reports the objective for various pairs of m and ρ. The objective is
minimized for m = 20 momentum traders and a perceived autocorrelation of ρ = 0.8.
4 Survival
Before I consider pricing implications of the model, it is important to review survival of
the agents. The Friedman (1953) critique of noise trading states that if noise traders are
destabilizing then they must buy high and sell low, thus incurring losses that will drive them
out of the market. Recent papers have shattered this view. Most recently, Yan (2006) showed
that even in a complete markets general equilibrium model, the evolutionary mechanism
described by Friedman is so slow that it would take 100 years to drive out a noise trader.
I find similar implications in my model. Table 4 reports the average returns of both types
of traders for 1,000 simulations each of various values of the parameters. In almost all cases,
the momentum trader earns a positive expected return due to holding some amount of the
riskfree asset and the risky asset. Furthermore, in many cases the gap between expected
returns of the two traders is 3% or less. With this small difference, if momentum traders
start with equal endowments as fundamental tradere, even after 50 years the momentum
11
-
traders will still own 20% of aggregate wealth3. They are not driven from the market.
[Table 4 about here.]
The effects of variation in the individual parameters are given below:
1. Effect of drift. In general, a change in long run expected returns on the risky asset
does not affect the two traders disproportionately.
2. Effect of volatility. As volatility of fundamentals increases, there are larger fluctuations
in the limit prices placed by fundamental traders. This causes momentum traders to
overshoot prices more often, thus incurring larger losses.
3. Effect of noise. This effect behaves similarly. As volatility of the fundamental traders
signal increases, there are large fluctuations in prices of orders submitted by funda-
mental traders. This causes momentum traders to overreact to movements more often,
again incurring losses.
4. Effect of wealth proportion. As the proportion of wealth traded each period increases,
gains or losses are amplified. As trading grows very large, for example, 10% of wealth,
momentum traders can occur substantial losses.
5. Effect of number of momentum traders. As one might expect, when there are more
momentum traders in the market, they destabilize prices more often and hence earn
lower expected returns. The fundamental traders benefit and earn higher expected
returns.
6. Effect of perceived autocorrelation. There is a related effect here. As perceived au-
tocorrelation increases, the frequency at which momentum traders destabilize prices
3Consider two traders with 50% wealth each. If one trader grows wealth at 8% and the other grows at11%, after 50 years the first trader still has 20% of the wealth
12
-
does not change; however, the traders will submit limit orders farther from fundamental
trader beliefs, thus incurring larger losses relative to the fundamental traders.
5 Pricing Implications
Having established that momentum traders are able to survive in competition with funda-
mental traders, I now turn to their impact. Specifically, in this section I discuss how this
model is able to replicate several features of observed stock returns.
Table 5 reports return moments and estimated jump model parameters both for data
generated from the momentum model and for S&P 500 index returns. Note that the model
is able to produce jumps, with a positive jump intensity and daily return kurtosis of 4.70.
[Table 5 about here.]
The model fails to match these moments primarily along two grounds. First, the distri-
bution generated by the model is symmetric and does not have fat tails at longer horizons.
This could be a result of negative return-volatility correlation in fundamentals. An asym-
metric GARCH model of fundamentals may be able to produce the negative skewness and
tail fatness at longer horizons, while still yielding large jumps at the daily level.
The other striking difference is the autocorrelation of daily returns. The momentum
model implies a far greater level of negative autocorrelation in daily stock returns than is
observed in the market. This is possibly due to the highly stylized nature of the model, which
can only approximate the behavior of real world noise traders. Still, the autocorrelation
decays at longer horizons and actually matches the data at the yearly level.
The resulting tail fatness in returns is immediately visible in a generated time series.
Figure 3 plots a five year span of daily returns and predicted jump sizes from estimating
equation (1). Ordinary prices tend to follow fundamental values. Occasionally, however, the
13
-
random sequence of arrival produces a sequence of momentum traders that destabilize the
price, creating a temporary jump which is reversed. In the generated data, there are many
large returns which are quickly accompanied by large returns in the opposite direction, a
pattern that is similar to the S&P data from Figure 1. As one illustration, towards the end
of the sample, there is a return of 11.4% which is immediately followed by a return of -10.6%.
[Figure 3 about here.]
The negative autocorrelation of large movements can also be seen in the final two columns
of Table 1, which presents the regression of equation (2) on this generated time series. The
coefficient on rt−1|rt−1| is negative and significant. The magnitude appears smaller than that
of the market, but the effect remains. Large movements are reversed.
The resulting tail fatness holds implications for options pricing. Since options have a
finite exercise date, there is a possibility for a jump that occurs immediately before exercise,
thus giving value to out-of-the-money options. More specifically, the possibility of a large
jump immediately before exercise can give out of the money options higher value than they
would have under Black-Scholes.
To see this more rigorously, I compute options prices using the momentum trading model.
The price of a European call option can be calculated as the discounted intrinsic value.
Ct = e−rf T E[(ST −K)+] (10)
Technically, this is not correct since the expectation must be taken under the risk neutral
measure and not the physical measure. This requires a function form for either the market
price of risk or the pricing kernel. As a first approximation, I have simply assumed that the
same dynamics hold under the risk-neutral measure as do under the physical measure, with
the drift equal to the risk-free rate. I then simulate 300,000 price paths and calculate option
prices for a range of strikes and maturities of 1 week, 1 month, and 3 months.
14
-
Then using the realized volatility of annual returns and the riskfree rate, I calculate
Black-Scholes implied volatility of each option. The resulting volatilities are plotted against
moneyness, defined in standard deviation units as ln(K/S)−rTσ√
T, in Figure 4. Out-of-the-money
options are priced higher due to the possibility of a jump before exercise. Also note that
options with shorter maturities are most sensitive to a temporary jump and hence have
steeper and higher implied volatility smiles.
[Figure 4 about here.]
6 Conclusion
I study the implications of momentum trading on the distribution of stock returns. I build
a simulation model of a financial market with two types of agents: momentum traders and
fundamental traders. Fundamental traders are assumed to outweigh the momentum traders
and hence drive long run prices. However, a shock to fundamentals causes the price to
move, and momentum traders overreact to the movement. This can occasionally cause large
temporary jumps in prices if a number of momentum traders enter the market at once. These
jumps are then reversed.
The model matches several key features of observed equity returns. The model can
endogenously generate large movements in prices unrelated to fundamentals which are then
reversed. There is negative correlation in returns which is much larger for large returns.
Futhermore, the return distribution can also manifest as options implied volatility smile.
Although I have focused on matching features of the equity market as a whole, future
research could focus on matching the model to individual stock returns. An implication
of this model is that cross sectional variation in momentum trading could generate cross
sectional variation in the distribution of returns. Specifically, stocks with higher momentum
trading should have fatter tailed distributions and greater negative autocorrelation of large
15
-
returns. Futhermore, attempts could be made to identify time periods when momentum
trading activity is high. Return distributions should exhibit fatter tails during those periods.
16
-
A A Framework for Agent-Based Simulation
In this section, I present a framework for building an agent-based simulation. The discussion
here will attempt to abstract away from market details and focus on what exactly an agent is
and how agents interact. The ideas here are derived from computation theory and artificial
intelligence research. For further insight into these fields, consult any introductory textbook,
such as Kozen (1997), Hopcroft and Ullman (1979), or Norvig and Russell (2002). Although
this material is largely unrelated to financial market theory, I believe such a presentation is
vital to understanding the mechanism by which a simulation functions.
A.1 Basic concepts and examples
To highlight some basic intuition and develop some understanding of simulation concepts,
I begin with a simple theoretical framework based on van den Bergh et al (2002). In their
view, a simulation as a collection of intelligent agents. Each agent represents a real world
entity. Examples of agents include clouds within a weather simulation, a predator in an
ecological simulation, or traders within a financial market simulation.
Each agent is described by its current state and behavior, which are modeled as follows.
The agent has a (potentially infinite) set of possible states S = {s1, s2, ...} and a set of
possible actions A = {a1, a2, ...}. The agent has an action function action : S → A which
describes its behavior. In addition there is some environment function env : A → P(S)
which describes the consequences of the agent’s behavior. Note that the environment maps
actions to a set of possible states, thus making the action non-deterministic. Together, the
action and environment functions create a transition function trans : S → P(S) that
brings the agent from one state to the next. This transition fully describes the impact of
one action on the agent.
As an example, consider a one agent simulation of a person. The agent has states S =
17
-
{ warm, cold } which represent whether the person is warm or cold. The actions the agent
could take are A = { go inside, go outside }. Define action and env as
action(warm) = go outside action(cold) = go inside
env(go outside) = {cold} env(go inside) = {warm}
Suppose the agent is warm and chooses to go outside. The environment function then tells us
that the agent becomes cold. This causes the agent to go inside. The environment function
tells us the agent becomes warm. And so on.
Now consider a more complicated example with two agents. Agent 1 will have states S1
= { $100, $50, $0 } and actions A1 = { give $50 }. Agent 2 will have states S2 = { $100,
$50, $0 } and actions A2 = { take $50 }. Both agents will start in their $50 state, meaning
they have $50. The following occurs:
Agent 1 gives agent 2 $50, soaction($50) = give $50
env(give $50) = {$0}Agent 2 receives $50 from agent 1, so
action($50) = take $50
env(take $50) = {$100}
The result is that agent 1 ends up with $0 and agent 2 ends up with $100.
This second example illustrates a difficulty in the van den Bergh et al approach. Although
each agent is well defined, the interaction among agents is poorly specified. In a general
framework of agent-based simulation, not only do we need a description of each agent’s state
and behavior, we need a full description of the interaction among agents.
Beyond the purely theoretical difficulties, this framework has two other major flaws.
First, the abstractions of sets of states and action functions are conceptually interesting but
does not fit well with practical simulation implementations. It remains to be fleshed out
how this abstract concept corresponds to a trader placing an order in a financial market
simulation.
18
-
Perhaps more importantly, this model cannot easily encompass traditional expected util-
ity maximization. To represent a standard asset pricing agent, we would need to delineate
every state of the world, which would become an enormously cumbersome problem.
In the following pages, I propose a more general framework for simulation that can
encompass many different styles. The framework is based on several concepts touched upon
here. First, a simulation consists of agents, each of whom have some state. The agents will
transition to their next state by some behavior. Finally, there will be a mechanism by which
agents will interact with each other and sequence their actions.
A.2 A general simulation paradigm
I begin by introducing a concept of time to the simulation that was not present in the van
den Bergh et al model. The simulation proceeds in discrete time steps t = 0, 1, 2, ... until
halted by the user. The initial state of the world and agents’ behaviors are exogenously
specified. The progression of states and actions arise endogenously.
A.2.1 States
There are n agents in the simulation. Each individual agent i has a private state, denoted
P it , which contains all the information that the agent has at a given time t. There is also a
public state, denoted Gt, that contains information common across all agents.
For simplicity, let each state be an element of an all inclusive set of states, the set of
strings of finite length. This set is denoted as Σ∗ where Σ, the alphabet of the string, is any
finite set and * is the transitive set closure defined as
A∗ =∞⋃
j=0
Aj
19
-
or equivalently,
A∗ = {x1x2...xn | n ≥ 0 ∧ x1, ..., xn ∈ A}
By definition, the empty string, denoted �, is an element of Σ0 = {}, so that � is always an
element of Σ∗. As an example of Σ∗, if Σ = {a, b} then Σ∗ = {�, a, b, aa, ab, ba, bb, aaa, ...},
ie Σ∗ is the set of all strings consisting only of a and b.
Previously we denoted the set of possible sets for each agent by some abstract set. There
is no loss of generality by moving to a universal set of strings. Strings can encode any state
from a given set of states, provided the alphabet Σ has at least 2 elements. Proposition 1
gives the construction.
Proposition 1. Let S be a countable set (of states) and let Σ = {0, 1}. Then there exists a
one-to-one mapping f : S → Σ∗.
Proof. Let {s1, s2, s3, ...} be an enumeration of the elements of S. Define f : S → Σ∗ as
f(si) = the binary encoding of i. The function f must be one-to-one. Consider any j, k ∈ N
be such that j 6= k. We know that f(sj) = the binary encoding of j and f(sk) = the binary
encoding of k. Since j 6= k, the binary encoding of j cannot be equal to the binary encoding
of k. Thus, f(sj) 6= f(sk).
Furthermore, strings can also any finite collection of sets of states. This construction is
simple as well.
Proposition 2. Let C be a finite collection of countable sets of states S1, S2, ...Sn and let
Σ = {0, 1}. Then there exists a one-to-one mapping g : S1 × S2 × ...× Sn → Σ∗.
Proof. Let fi : Si → Σ∗ be the mapping from Proposition 1. Define g : S1 × ...× Sn → Σ∗
as
g(s1, ..., sn) = the stringx1x2x3... where x1 = the first character of f1(s1), x2 = the first
character of f2(s2), ..., xn+1 = the second character of f1(s1), and so on. The function g must
20
-
be one-to-one. Consider any R = (r1, ..., rn), T = (t1, ..., tn) ⊆ S1 × ... × Sn where for some
i, ri 6= ti. Then fi(ri) 6= fi(ti) by Proposition 1. By construction some character in g(R) is
different from the character in the corresponding position in g(T ). Hence, g(R) 6= g(T ).
Proposition 2 implies that we can use a string to encode the state of any finite number of
agents, as well as the public state. Therefore, we need only one string to represent an entire
state of a simulation. For conceptual simplicity and facility in implementation, however, I
will continue to separate each private state and the public state.
Lastly, the initial public and private states G0 ∈ Σ∗ and P i0 ∈ Σ∗ are exogenously given.
These represent the information present at the beginning of the simulation.
A.2.2 Agent behavior
To model agents’ behaviors I borrow a key concept in artificial intelligence and computational
theory research. The Church-Turing thesis, loosely interpreted, states that human behavior
can be represented by possibly non-deterministic algorithms. A concise description of an
algorithm can be given by a Turing machine, a simple computational device that takes as
input a string, performs a number of calculations, and either does not halt or halts returning
some output string.
Using this concept of behavior as Turing machines, I represent each agent’s transition
from one period to another by a Turing machine which takes as input the agent’s current
private state and the current public state. Conceptually, this is akin to stating that an agent
sees the world around him and performs some behavior according to what he sees. The
behavior then determines the state of the world in the following period.
From this Turing machine, we will derive an action function Ai : Σ∗×Σ∗ → Σ∗×Σ∗ that
maps the public state and agent i’s private state to their next values. So,
Ai(Gt,i, Pit ) = (Gt,i+1, P
it+1)
21
-
where P it is private state of agent i at time t and Gt,i is an intermediate value of the public
state.
From the action function, we can separate the determinants of the new public and private
states. We will define the public update function σi : Σ∗ × Σ∗ → Σ∗ and the private update
function λi : Σ∗ × Σ∗ → Σ∗ such that
Ai(G, P ) = (σi(G, P ), λi(G, P ))
This describes each agent’s transition from one period to the next. An important point
to note here is that there is only one public state which all agents update. This may seem
like a flaw. For example, if a trader places a buy order to a market maker, the transaction
should be private between those two agents. In this framework, the only way to do this is to
encode the transaction in the public state. In practice, however, this is a moot point. The
actions may be visible to other traders, but the traders will specified to ignore them.
In fact, we only need one state for the entire simulation since strings can encode a finite
collection of sets of states (proven above in Proposition 2). The reason to separate out each
agent’s private state is simply for clarity.
A.2.3 Interaction
Lastly, I describe the interaction among the agents. The agents will ”communicate” to one
another via the public state. We have each agent’s public update function. One way to
create the interaction is to jointly compute the next public state with each agent’s public
update function. This would seem natural, as agents may act simultaneously. However, for
simplicity I will serialize the public update functions. That is, we calculate the next public
22
-
state by computing each public update function in turn. So,
Gt+1 = σn(σn−1(...σ2(σ1(Gt, P1t ), P
2t )..., P
n−1t ), P
nt )
In serializing the agents’ actions, I have made a critical design decision. One can argue
that in the real world, actions can be simultaneous, thus the model seems unrealistic and
restrictive. However, by serializing actions we gain a clear advantage without losing too
much power.
Serializing actions can greatly facilitate implementation. Since each action can be com-
puted sequentially, we can run the simulation on a single computer. Synchronizing actions
requires that we have multi-CPU systems; however, even on these complex systems, synchro-
nization can be difficult as unrelated factors such as memory access times and cache misses
make it difficult, if not impossible, to guarantee simultaneous execution of two agents’ ac-
tions.
The problem with serialization is that one agent may gain priority when executing actions.
For example, suppose in a financial market, two traders (agents i, j with i < j) want to buy
the same stock in the same time step. In this framework, since i < j agent i would place his
buy order before agent j. This may not be an issue in only one time step, but the problem
truly manifests if this behavior is repeated. In each case, agent i will execute his action first.
One can patch up this problem with a simple solution. For each action, introduce a
completion time. This time reflects how long it takes for the agent to complete the action.
The agent will execute the action then wait this time interval. To add nondeterminism
the completion time will have a random component which may increase or decrease the
completion time for any given action. For example, suppose it takes agents i and j 10
steps to place a buy order. The simulation picks some r ∈ [−3, 3] calculated from the
uniform distribution. The action will occur after 10+r steps, rounded to the nearest integer.
23
-
Although this method does not correct the problem of serialization, it ensures that no one
agent always has priority when executing actions. In the above example, agent i will execute
his order before agent j with probability 0.5.
Formally, we add the following to our simulation:
Each agent i has a function decideAction δi : Σ∗ × Σ∗ → N that returns the time of the
agent’s next performed action (this can be stored in the agent’s private state) and a function
nextAction φi : Σ∗ × Σ∗ → Σ∗ × Σ∗ that performs the agent’s next action. The action
function Ai can now be described by
Ai(Pt, Gt,i) =
{(Pt, Gt,i) if δ(Pt, Gt,i) < tφ(Pt, Gt,i) otherwise
Note that this is not a new definition of Ai but rather an explanation of how Ai will function.
A final point to note about the problem of synchronization is that it may not be an issue
in dealing with financial markets. Consider a market consisting only of market makers and
traders. In order for a trade to clear, a market maker must execute the trade. Because the
market maker is human, he can only execute one trade at a time, thus allowing us to use
serialization in constructing such a market. It may be true that a real life market maker
can execute trades in parallel through the use of computers. However, we can readily model
this by creating one market maker agent for each computer used to execute trades. These
market maker agents will interact with one another to clear the market. This simple example
demonstrates the flexibility and extensibility of the simulation framework and shows how
serialization of actions can be used despite its flaws.
[Figure 5 about here.]
A diagram of the agent behavior and interaction is given in Figure 5. The initial public
and private states are exogenously given. Agent 1 then acts, which updates his private state
and the common public state. Agent 2 acts next, updating his private state and the public
24
-
state. Each agent acts in turn until the last agent acts, which brings the simulation to the
next time step. The action resumes with agent 1’s behavior. And so on.
A.3 Algorithmic vs. analytic framework
Economists have been skeptical of these models, partly because analytic reasoning can be-
come difficult within a computational model. One tactic of many simulations such as the
Sante Fe simulation of Arthur et al (1997) is to create analytic objective functions for each
agent and reason about them mathematically as well as experimentally. Although this
method allows researchers to use well-developed analytic tools, by restricting the agents to
analytic functions, we restrict the realm of behaviors that can be modeled. (This is not true
theoretically, but is true practically).
With this framework, I allow agent behaviors to encompass a much broader range of
abilities. Furthermore, one can incorporate an analytic model into this framework. For
example, the Sante Fe simulation calculates supply and demand functions for each agent
and stock at each time step. The market is then cleared by computing the prices needed to
match supply with demand. We can incorporate this kind of model as follows:
Agents 1, ..., (j − 1) are traders. At each time step they store their supply anddemand for each stock in the public state.
Agent j is a market maker that clears the entire market. At each time step, hesets prices and allocates stocks to match supply with demand.
Now we are in a position to use analytic tools to reason about market microstructure. At
the same time, we can easily broaden the range of behaviors of agents without having to
start from scratch.
The simulation approach serves as a complement to traditional analytic modeling. Sim-
ulations allow theorists to examine a wide range of possibilities and understand various
economic phenomenon that can then be more rigidly modeled in an analytic framework.
25
-
Hopefully, in the coming years more economists will branch out to these other techniques
and incorporate them into a more encompassing repertoire.
A.4 From the mathematical model to a practical implementation
Lastly, I turn to several implementation details. An implementation of this framework
includes program code to store state and to compute each agent’s action function. The
object-oriented programming paradigm fits nicely with the model. Each agent is represented
by an object. The private state is stored in the data private to the object. Public state is
stored across various agent objects’ public data. Figure 6 shows the various objects.
[Figure 6 about here.]
To tie the agents together and model the interaction, we create two kinds of objects. The
class Agent will be a base class for all agents. It will contain the method action() which
provides the interface to the framework. The framework itself will be represented by a class
SimulationFramework. This class will execute the simulation. At each time step, it will call
all agent’s action functions in order. The simulation will continue indefinitely until the user
halts it. One can write this in pseudocode as
Initially, t=0
While(user has not halted the simulation)
For each agent i
agent[i].action(t)
Increment t
End while
The action() methods will internally call upon decideAction() and nextAction() methods
which each agent will declare. The decideAction() method will return the time step at which
the next action is to be performed (the completion time). After this time has expired, the
action() method will call nextAction() to perform the action. In pseudocode, the action
method can be written as
26
-
If this is the first call to action()
Let nextActionTime = time + decideAction()
Else If time ≥ nextActionTimeCall nextAction()
Let nextActionTime = time + decideAction()
End
Notice that to incorporate nondeterminism, an agent simply needs to add randomness
to the decideAction() or nextAction() methods. This mechanism for performing actions
will be uniform across all agents. The agents will vary only in their implementation of
decideAction() and nextAction(). A class diagram of the simulation framework is given in
Figure 7.
[Figure 7 about here.]
27
-
References
[1] W. B. Arthur, J. Holland, B. LeBaron, R. Palmer, and P. Tayler. Asset pricing underendogenous expectations in an artificial stock market. In W. B. Arthur, S. Durlauf, andD. Lane, editors, The Economy as an Evolving Complex System II, pp. 15-44. Addison-Wesley, Reading, MA, 1997.
[2] G. Bekaert and G. Wu. Asymmetric volatility and risk in equity markets. Review ofFinancial Studies 13(1): 1-42, 2000.
[3] L. Blume and D. Easley. If you’re so smart, why aren’t you rich? Belief selection incomplete and incomplete markets. Econometrica 74(4): 929-966, 2006.
[4] J. Campbell and L. Hentschel. No news is good news - an asymmetric model of changingvolatility in stock returns. Journal of Financial Economics 31(3): 281-318, 1992.
[5] D. Cutler, J. Poterba, and L. Summers. What moves stock prices? Journal of PortfolioManagement, 15(3): 4-12, 1989.
[6] J. B. Delong, A. Shleifer, L. H. Summers, and R. J. Waldman. The survival of noisetraders in financial markets. Journal of Business, 64(1): 1-19, 1991.
[7] J. B. Delong, A. Shleifer, L. H. Summers, and R. J. Waldman. Noise trader risk infinancial markets. Journal of Political Economy, 98(4): 703-738, 1990.
[8] D. Duffie, J. Pan, and K. Singleton. Transform analysis and asset pricing for affinejump-diffusions. Econometrica 68(6): 1343-1376, 2000.
[9] M. Friedman. The case for flexible exchange rates. Printed in Essays in Positive Eco-nomics, University of Chicago Press, Chicago, IL, 1953.
[10] M. Grinblatt, S. Titman, and M. Wermers. Momentum investment strategies, porfolioperformance, and herding: a study of mutual fund behavior. American Economic Review85(5): 1088-1105, 1995.
[11] S. Grossman and R. Shiller. The determinants of the variability of stock market prices.American Economic Review 71(2): 222-227, 1981.
[12] S. Heston. A closed-form solution for options with stochastic volatility with applicationsto bond and currency options. Review of Financial Studies 6(2): 327-343, 1993.
[13] J. E. Hopcroft and J. D. Ullman. Introduction to Automata Theory, Languages, andComputation, Addison-Wesley, Reading, MA, 1979.
[14] M. Johannes and N. Polson. MCMC methods for financial econometrics. In Y. Aı̈t-Sahalia and L.P. Hansen (Eds.), Handbook of Financial Econometrics (to appear), 2003.
28
-
[15] L. Kogan, S. Ross, J. Wang, and M. Westerfield. The price impact and survival ofirrational traders. Journal of Finance 61(1): 195-229, 2006.
[16] D. Kozen. Automata and Computability, Springer-Verlag, New York, 1997.
[17] B. LeBaron. Agent-based computational finance: suggested readings and early research.Journal of Economic Dynamics and Control 24: 679-702, 2000.
[18] S. LeRoy and R. Porter. The present value relation: tests based on implied variancebounds. Econometrica, 49(3):555-574, 1981.
[19] R. Merton. Option pricing when underlying stock returns are discontinuous. Journal ofFinancial Economics 3(1-2): 125-144, 1976.
[20] P. Norvig and S. J. Russel. Artificial Intelligence: A Modern Approach, Prentice-Hall,2002.
[21] A. Shleifer and R. W. Vishny. The limits of arbitrage. Journal of Finance, 52(1): 35-55,1997.
[22] R. Shiller. Do stock prices move too much to be justified by subsequent changes individends? American Economic Review : 71(3): 421-436, 1981.
[23] L. Tesfatsion. Agent-based computational economics: growing economies from the bot-tom up. Artificial Life 8(1): 55-82, 2002.
[24] W. M. van den Bergh, K. Boer, A. de Bruin, U. Kaymak, and J. Spronk. On IntelligentAgent-Based Analysis of Financial Markets. Working Paper, 2002.
29
-
Figure 1: Estimated S&P 500 Index Jumps 1985-2005
30
-
1 1.5 2 2.5 370
80
90
100
110
120
130
(a) Up Price
1 1.5 2 2.5 34800
4850
4900
4950
5000
5050
5100
5150
5200Momentum (+)Fundamental (+)
(b) Up Holdings
1 1.5 2 2.5 370
80
90
100
110
120
130
(c) Down Price
1 1.5 2 2.5 34800
4850
4900
4950
5000
5050
5100
5150
5200Momentum (−)Fundamental (−)
(d) Down Holdings
Figure 2: Impulse Response Graphs
31
-
(a) Return Time Series
(b) Estimated Jump Sizes
Figure 3: Returns and Estimated Jumps from Generated Data
32
-
−2 −1.5 −1 −0.5 0 0.5 1 1.5 2
0.15
0.16
0.17
0.18
0.19
0.2
0.21
Moneyness
Bla
ck−
Sch
oles
Impl
ied
Vol
atili
ty
1 week1 month3 months
Figure 4: Implied Volatility Smile Generated by Momentum Model
33
-
(P 10 , ..., Pn0 , G0) = (P
10 , ..., P
n0 , G0,0)yAgent 1’s action
(P 11 , P20 , ..., P
n0 , G0,1)yAgent 2’s action
(P 11 , P21 , P
30 , ..., P
n0 , G0,2)
...yAgent n’s action(P 11 , ...,P
n1 , G0,n) = (P
11 , ..., P
n1 , G1) = (P
11 , ..., P
n1 , G1,0)yAgent 1’s action
...
Figure 5: Agent behavior and interaction in the simulation paradigm
34
-
PrivateData
PublicData
Agent 2
PrivateData
PublicData
Agent 1
Agent 1Private State
Private StateAgent 2
Public State
PublicData
PrivateData
Agent 4
PublicData
PrivateData
Agent 3
Private StateAgent 3
Private StateAgent 4
Figure 6: Private and public states across agent objects
35
-
Agent
(has a)Agent[] agentsvoid run()
SimulationFramework
long decodeAction()void nextAction()void action()
Figure 7: Framework Class Diagram
36
-
Table 1: S&P 500 Index and Simulation Generated Return Autocorrelation Regressions
S&P 500 Index SPDRS Trust S&P 500 Futures Generated(1) (2) (3) (4) (5) (6) (7) (8)
Intercept 0.0004 0.0004 0.0005 0.0004 0.0004 0.0004 0.0006 0.0006t (2.25) (2.12) (2.60) (2.44) (2.23) (2.00) (1.50) (1.48)
rt−1 -0.0134 0.1334 -0.0388 0.0905 -0.0299 -0.0015 -0.3755 -0.2843(-0.79) (4.27) (-2.30) (2.90) (-1.77) (-0.09) (-14.35) (-6.69)
rt−1|rt−1| -6.4615 -5.4735 -10.6313 -2.5395(-5.58) (-4.91) (-10.58) (-2.71)
R2 0.0002 0.0090 0.0015 0.0083 0.0009 0.0318 0.1409 0.1459
37
-
Table 2: Impulse Response Price Distributions
Mean Std Dev Min 5% Median 95% MaxUp
Before 100.01 0.95 70.50 98.99 100.01 101.03 128.30Impulse 128.34 31.58 117.60 119.66 120.37 142.69 1822.60After 119.13 4.70 5.32 118.19 119.90 120.74 138.62
DownBefore 100.02 1.03 49.13 98.98 100.01 101.04 160.45Impulse 76.95 7.13 0.89 66.44 79.82 80.24 97.17After 81.25 23.75 66.44 79.47 80.07 81.22 5753.00
38
-
Table 3: Model Estimation Objectives
Panel A: Generated Variance for Fundamental Volatility/Signal Volatility Pairs
Fundamental Trader Signal Volatility0.004 0.005 0.006 0.007 0.008 0.009
0.010 0.3358 0.5228 0.7037 1.0195 1.2929 1.66380.015 0.3462 0.4844 0.6939 0.9472 1.2058 1.6050
Fundamental 0.020 0.3529 0.5352 0.7761 0.9383 1.2018 1.6949Volatility 0.050 0.4178 0.6028 0.8282 1.0375 1.4189 1.7135
0.100 0.7276 0.9061 1.1035 1.3611 1.7094 2.07790.150 1.1421 1.3072 1.6229 1.8554 2.1173 2.42800.200 1.8485 2.0825 2.2969 2.6590 2.8553 3.0881
Panel B: Momentum Trader/Perceived Autocorrelation Objective Function
Perceived Autocorrelation0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0
1 26.87 21.23 30.69 20.91 19.26 21.55 19.12 21.10 20.985 19.92 20.22 18.20 19.38 19.35 20.11 18.72 19.21 17.42
Number 10 20.26 19.03 18.83 19.35 21.39 14.98 17.15 16.90 13.16Momentum 15 25.89 21.07 19.94 18.39 18.65 15.95 16.29 16.72 15.34
Traders 20 20.94 20.89 18.83 11.19 12.53 15.83 3.31 6.97 9.7925 24.14 20.76 13.97 13.96 5.14 3.46 6.45 7.39 4.9930 22.50 20.32 17.01 12.35 7.26 228.57 28.64 100.78 261.4340 27.08 36.87 322.90 349.01 270.32 4462.27 13943.01 6792.44 37314.71
39
-
Table 4: Momentum and Fundamental Trader Survival for Varying Parameters
µ Mom Fund σ Mom Fund-0.05 -0.0128 0.0189 0.05 0.1029 0.12160.00 0.0151 0.0489 0.10 0.0929 0.11840.10 0.0693 0.1036 0.15 0.0967 0.12770.15 0.1075 0.1372 0.20 0.0776 0.11860.20 0.1347 0.1614 0.40 0.0569 0.1281
Noise Vol Mom Fund Wealth Prop Mom Fund0.001 0.0996 0.1208 0.0005 0.1162 0.11880.005 0.0923 0.1239 0.0010 0.1096 0.11510.010 0.0769 0.1268 0.0050 0.0976 0.11660.150 -0.3353 0.2251 0.0100 0.0864 0.11800.200 -0.4567 0.2426 0.1000 -0.0973 0.1678
Mom Traders Mom Fund AC Mom Fund5 0.1023 0.1185 0.10 0.1084 0.1188
10 0.0888 0.1113 0.30 0.1049 0.118720 0.0842 0.1173 0.50 0.0956 0.116540 -0.0353 0.2092 0.70 0.0925 0.120445 -0.2000 0.3781 0.90 0.0873 0.1228
40
-
Table 5: Return Moments and Estimated Jump Model Parameters for Momentum ModelReturns
Panel A: Return Moments of Generated Data and S&P 500
Model Generated S&P (1988-2005)Moment Daily Monthly Yearly Daily Monthly YearlyMean 0.0476 0.2263 1.1231 0.0357 0.1789 0.7937
Variance 2.1835 5.5327 19.2777 1.0157 4.3115 16.5819Skewness 0.0082 -0.0064 0.0216 -0.2210 -0.2655 -0.5683Kurtosis 4.7048 3.0544 3.0544 7.3611 4.0490 4.0490
AC -0.3565 -0.1307 -0.1252 -0.0071 -0.0646 -0.1361
Panel B: Jump Model Parameters Estimated from Generated Data and S&P 500 Returns
Jump Model Params Generated S&Pµ 0.0341 0.0507σ2 1.9454 0.4560µj -0.0020 -0.0164σ2j 2.9519 2.5612λ 0.0828 0.2313
41