copyright © 2000, bios group, inc. 1/10/01 dr vince darley, ocado ltd [email protected] in...

31
Copyright © 2000, Bios Group, Inc. 1/10/0 1 Dr Vince Darley, Ocado Ltd [email protected] In collaboration with Sasha Outkin, Mike Brown, Al Berkeley, Tony Plate, Frank Gao, Richard Palmer, Isaac Saias, Mary Montoya AMLCF workshop July 20, 2009 Agent-Based Modeling of the Nasdaq Stock Market and Predicting the Impact of Rule Changes

Upload: ariel-henderson

Post on 26-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Dr Vince Darley, Ocado [email protected]

In collaboration with Sasha Outkin, Mike Brown, Al Berkeley, Tony Plate, Frank Gao, Richard Palmer, Isaac Saias, Mary Montoya

AMLCF workshop July 20, 2009

Agent-Based Modeling of the Nasdaq Stock Market and Predicting the

Impact of Rule Changes

Page 2: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Problem Statement

• Nasdaq had to consider decimalization and its impacts in 1998.

• How reducing the tick size may affect the market behavior? Why should it have any effect?– How a change to decimals can be modeled?– What is the mechanism through which changed tick

size would affect the market? • Via individual market participants (agents) decisions?• Via changes to market infrastructure– order matching?

– Given specific mechanisms, what other (second order?) effects may occur?

Page 3: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

• Investigate effects of possible policy and environment changes:

– Ex: Evaluate the effects of changing the tick size (decimalization) and of parasitism

• Evaluate the influence of market rules and structure on market dynamics and strategies

• Demonstrate that that simulated market participants and aggregate market parameters are “sufficiently similar” to those in the real world to validate model empirically

Goals

Page 4: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Problem Architecture

Page 5: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Construct and analyze an agent-based model of the market:

• Populate with agents (investors and market makers).

• Simulate market infrastructure and rules.

• Calibrate with the actual stock market data:

- To ensure that the simulated distribution of trade sizes, volumes, prices and other statistical parameters is similar to that observed in the real world.

- To simulate real-world behaviors of and interactions of market makers and investors using data sets of historical quotes and trades.

• Design it to reflect the look and feel of the then existing Level 2 Nasdaq system.

Model Implementation

Page 6: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Philosophical Observations

• By definition, almost tautologically, “the market” is an agent-based system.

• The question is what predictive power such a model representation has? For what kinds of problems?

• What are the theoretical reasons for agent-based representation to work?

• Crucial differences from existing approaches: – Modeling processes and mechanisms, rather than the outcomes

and states.– Heterogeneous rather than homogenous model– Focus on emergent behaviors – potentially, counter intuitively,

invalidating the initial model.• Nasdaq decimalization study: an empirical example.

– Study done during 1998-2000.– Decimalization occurred in April 2001.

Page 7: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Agent Details

• Market makers

• Investors

• Market Agent Features:– Autonomous– Adaptive/learning/handcrafted strategies– Various levels of sophistication/adaptability/

access to information

Page 8: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Simulation Basics

• Market agents are trading in a single stock• Investors have a price target which follows a

Poisson process, random walk, etc.

• Investors: – Receive noisy information about this target– Decide whether to trade by

• Comparing this target with available price• Incorporating market trends• Performing sophisticated technical trading, etc.

• Market makers:– Receive buy and sell orders – Must learn how to set their quotes profitably

Page 9: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Investor – Market Maker Interaction and Parasitism

Parasitic strategy:– Attempts to undercut the current bid/offer by a

small increment (tick size)– Is not a major source of liquidity for the market

Page 10: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Market MakersLimit OrderBook/ECN

Exchange,Rules

Database

Model Structure

Investors

Nasdaq

Page 11: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Model Features

• Trading in:– Market orders– Limit orders– Negotiated orders

• Market rules/ parameters:– Order handling rules– Tick size, etc.

• Market agents’ modes of interaction:– Quote Montage– ECNs– Limit order books– Preferencing, etc.

Page 12: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Model Calibration

• Calibrated the model to• Individual strategies

• Aggregate market parameters

• Simulated strategies are able to replicate the real-world ones (with precision up to 60-70%)

• Created self-calibrating software to use data as it comes in

Page 13: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Questions Investigated

• Effects of tick-size changes and parasitism

• Market dynamics effects:– Presence and origin of “fat tails”– Spread clustering and its causes

• Effects of market maker and investor learning and strategy evolution

Page 14: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Tick size effects

As tick size is reduced, parasitic strategies increasingly impede price discovery / market’s ability to generate useful information

Standard Deviation of (Price - True Value)

11.051.1

1.151.2

1.251.3

1.351.4

1.45

4 100

Inverse of the tick size

Sta

nd

ard

De

via

tio

n

Simulation with asmall number ofparasites

Simulation withsignificant number ofparasites

Page 15: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Tick Size Effects, Many Parasites

Tick size 1/100Tick size 1/16

Page 16: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Fat Tail Results

• “Fat tails”:– A large probability of extreme events by

comparison with a Gaussian distribution

• Origins are uncertain– Herd effects, other?

• Our model generates fat tails with no herd effects

Page 17: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Fat Tails in SimulatedAverage Price Dynamics

-0.2-0.19-0.18-0.17-0.16-0.15-0.14-0.13-0.12-0.11-0.1-0.09-0.08-0.07-0.06-0.05-0.04-0.03-0.02-0.010.0.010.020.030.040.050.060.070.080.090.10.110.120.130.140.150.160.170.180.190.2

5000

10000

15000

20000

freq

uenc

y

difference in the logarithms of the average price

Page 18: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Time Correlations and Fat Tails

The fat tails seem to disappear when the data points are taken far apart (50 periods here)

-0.02-0.019-0.018-0.017-0.016-0.015-0.014-0.013-0.012-0.011-0.01-0.009-0.008-0.007-0.006-0.005-0.004-0.003-0.002-0.0010.0.0010.0020.0030.0040.0050.0060.0070.0080.0090.010.0110.0120.0130.0140.0150.0160.0170.0180.0190.02

5000

10000

15000

20000

difference in the logarithms of the average price

freq

uenc

y

Page 19: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Why Fat Tails in the Simulation?

• Possible explanations:– Interaction and self-interaction through

price

– Existence of spread

– Memory of traders, investors, etc.

• No explicit “herd” effects included

Page 20: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Spread Clustering

• Nasdaq dealers collusion accusations -Christie and Schulz (1994)

• SEC investigation into quoting behavior on Nasdaq (1996) and subsequent settlement

• Clustering in various financial markets - Hasbrouck (1998)

Page 21: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Spread Clustering

• Spread = difference between smallest offer and largest bid

• Spread clustering occurs when some spread values occur much more frequently than others

Fre

qu

ency

117€€€€€€€€169€€€€€819€€€€€€€€165€€€€€421€€€€€€€€1611€€€€€€€€823€€€€€€€€163€€€€€225€€€€€€€€1613€€€€€€€€827€€€€€€€€167€€€€€429€€€€€€€€1615€€€€€€€€831€€€€€€€€16

233€€€€€€€€1617€€€€€€€€835€€€€€€€€169€€€€€437€€€€€€€€1619€€€€€€€€839€€€€€€€€165€€€€€241€€€€€€€€1621€€€€€€€€843€€€€€€€€1611€€€€€€€€445€€€€€€€€1623€€€€€€€€847€€€€€€€€16

50

100

150

200

250

Spread size

Fre

quen

cy

Simulation data

Page 22: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Importance of Spread Clustering

• Emergent property in the simulation: no collusion is present, yet the spread clustering occurs

• Real-world issue: Nasdaq, Forex

Page 23: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

0 0.5 1 1.5 2 2.5 3

x 104

0

1

2

3

4

5x 10

4

Spread Learning DealerNew Volume Dealer Basic Inv Dealer

Learning in the Simulation

• Spread Learning market maker is the most profitable dealer on the market under many circumstances

• Known exceptions: high volatility, tough parasites

time

Ass

ets

$

Page 24: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Phase Transitions

Page 25: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

1. Decimalization (tick size reduction) will negatively impact the price discovery process.

2. Ambiguous investor wealth effects may be observed. (Investors’ average wealth may actually decrease in the simulation, but the effect is not statistically significant).

3. Phase transitions will occur in the space of market-maker strategies.

4. Spread clustering may be more frequent with tick size reductions.

5. Parasitic strategies may become more effective as a result of tick size reductions.

6. Volume will increase, potentially ranging from 15% to 600%.

Summary of Findings

Page 26: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Tick size was officially reduced from a 1/16th to $.01 (in phases) in March, 2001.

Nasdaq economists captured actual data from this transition and put the findings in their Economic Research study report.

BiosGroup compared our model’s results with the findings from the Nasdaq report.

Comparisons with Data

Page 27: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

1. Decimalization (tick size reduction) will negatively impact the price discovery process.

2. Ambiguous investor wealth effects may be observed. (Investors’ average wealth may actually decrease in the simulation, but the effect is not statistically significant).

3. Phase transitions will occur in the space of market-maker strategies.

4. Spread clustering may be more frequent with tick size reductions.

5. Parasitic strategies may become more effective as a result of tick size reductions.

6. Volume will increase, potentially ranging from 15% to 600%.

5 of the 6 likely outcomes actually occurred.

Comparisons with Data (Cont.)

Page 28: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Nasdaq Book

Page 29: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Longer-Term Effects

• Not only the participants strategies change, but the market institutions change as the result.

Page 30: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Future Directions

• Systematising the work• Best features of ABMs combined with best features

of more traditional approaches.– ABMs to explain / derive parameters of stochastic

processes in finance. For example, what features of agents / institutions give raise to specific market behaviors?

• How strongly macro laws are coupled with the micro laws?– Is it possible to have the same macro behaviors when

micro behaviors are different?

Page 31: Copyright © 2000, Bios Group, Inc. 1/10/01 Dr Vince Darley, Ocado Ltd vince.darley@gmail.com In collaboration with Sasha Outkin, Mike Brown, Al Berkeley,

Copyright © 2000, Bios Group, Inc.

1/10/01

Summary and Conclusions

• Predicting complex outcomes is possible!

• Building and validating any “big ABM model” such as this is difficult and time-consuming

• Machine learning agents were an important part of that.

• Ensuring sufficient accuracy and rigour is very difficult. Careful involvement and feedback from market participants/regulators was essential – one benefit of this being (expensive) paid consulting work was that this was not optional

Any questions?