A NASDAQ MARKET SIMULATION INSIGHTS ON A MAJOR MARKET FROM THE SCIENCE OF COMPLEX ADAPTIVE SYSTEMS
Complex Systems and Interdisciplinary Science (ISSN: 1793-4540) Series Editors: Felix Reed-Tsochas (University of Oxford, UK) Neil Johnson (University of Oxford, UK) Associate Editors: Brian Arthur Santa Fe Institute, Spain Robert Axtell The Brookings Institution, USA Stefan Bornholdt University of Leipzig, Germany Janet Efstathiou University of Oxford, UK Pak Ming Hui The Chinese University of Hong Kong, China Published: Vol. 1 Forthcoming: Philip Maini University of Oxford, UK Martin Nowak Harvard University, USA Ricard Solé Santa Fe Institute, Spain Dietrich Stauffer University of Cologne, Germany Kagan Tumer NASA Ames Research Center, USA A Nasdaq Market Simulation: Insights on a Major Market from the Science of Complex Adaptive Systems by Vincent Darley & Alexander V. Outkin Large Scale Structure and Dynamics of Complex Networks Alessandro Vespignani & Guido Caldarelli Coping with Complexity: Understanding and Managing Complex Agent-Based Dynamical Networks Janet Efstathiou, Neil F. Johnson & Felix Reed-Tsochas
Complex Systems and Interdisciplinary Science Vol. 1 A NASDAQ MARKET SIMULATION INSIGHTS ON A MAJOR MARKET FROM THE SCIENCE OF COMPLEX ADAPTIVE SYSTEMS Vincent Darley President & CEO of Eurobios, UK Alexander V Outkin Los Alamos National Laboratory, USA World Scientific N E W J E R S E Y L O N D O N S I N G A P O R E B E I J I N G S H A N G H A I H O N G K O N G TA I P E I C H E N N A I
Published by World Scientific Publishing Co. Pte. Ltd. 5 Toh Tuck Link, Singapore 596224 USA office: 27 Warren Street, Suite 401-402, Hackensack, NJ 07601 UK office: 57 Shelton Street, Covent Garden, London WC2H 9HE Library of Congress Cataloging-in-Publication Data Darley, Vincent. A NASDAQ market simulation : insights on a major market from the science of complex adaptive systems / by Vincent Darley & Alexander V. Outkin. p. cm. ISBN-13 978-981-270-001-8 -- ISBN-10 981-270-001-3 (alk. paper) Includes bibliographical references and index. 1. NASDAQ (Computer network). 2. Stock exchanges--computer simulation. I. Outkin, Alexander. V. HG4574.2.D37 2007 332.64'30973--dc22 British Library Cataloguing-in-Publication Data A catalogue record for this book is available from the British Library. Copyright 2007 by World Scientific Publishing Co. Pte. Ltd. 2006048900 All rights reserved. This book, or parts thereof, may not be reproduced in any form or by any means, electronic or mechanical, including photocopying, recording or any information storage and retrieval system now known or to be invented, without written permission from the Publisher. For photocopying of material in this volume, please pay a copying fee through the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, USA. In this case permission to photocopy is not required from the publisher. Printed in Singapore.
With love to Pilar and Troy who gave endless support throughout the long and difficult birth of this book To my wife Vlada and my daughters Yana and Victoria for the joy and happiness you bring
This page intentionally left blank
Preface This research started in 1998 when Bios Group and Nasdaq entered into a collaboration to explore new ways to better understand Nasdaq s operating world. One set of goals was to explore the effects, including unintended consequences, of the market microstructure, market rules, and changes to them, on the behavior of participants such as market makers and traders in the Nasdaq market, and thereby on the dynamics and behavior of the market as a whole. For reasons that will become clear, the means chosen to pursue these goals was to create agent-based models of the Nasdaq market. Stock markets in general, and Nasdaq in particular, have undergone a period of rapid change in the past few years, which produced sweeping changes in the market s behavior. The nature and direction of those changes are still far from certain; however, they are certainly dramatic. Therefore, it is of the utmost importance to understand what can happen so that markets and their regulators have sufficient information to prepare for new changes in the future, potentially by making well-informed adjustments to some of their rules and infrastructure. One of the most important issues in 1998 was the forthcoming decimalization. Decimalization means a change to expressing prices in a decimal system, rather than in dollars and fractions of dollars, and the related questions of what the minimum tick size (or price change) in the markets should be, and what effects a particular minimum tick size might have on the dynamics of the market, and its fairness, volatility, price discovery, etc. Much of the recent history of Nasdaq and NYSE prices were quoted in $1/8ths and $1/16ths, but in 1998 decimalization was being planned; hence this was a very important issue at the time. The goal of this book is twovii
viii A Nasdaq Market Simulation fold: first, to describe our research in investigating this question how decimalization, and tick size reductions in particular, affect the market s overall behavior, and the behavior of market s individual participants; and second, to present a conceptual agent-based market modeling framework and its implementation. This book will be useful to the people and organizations involved in market research and operations market modelers, stock brokers, market makers, day traders, etc. It will also be useful to researchers in academia as a welcome departure from more traditional perfectly rational, equilibrium or econometrics based approaches. It will also be useful to policy makers as a presentation of a cohesive conceptual framework and of a test system for evaluating the impacts of various policy and rule changes. And last, but not least, it will be useful to anyone who wants to understand how the observed market dynamics arises from interaction of behaviors of a market s individual participants and components. However, this is not a cookbook: while we provide a significant amount of detail on how the simulation was constructed and how the results were obtained, it does not provide step by step instructions on how a similar simulation can be created. Additional supplementary materials for this book and for the simulation model described here can be found at www.agentsim.com. Much of the research described herein was performed in collaboration with Tony Plate, Richard Palmer, Isaac Saias, Vladimir Makhankov, Bill Reynolds, Manoj Gambhir, Gerard Weisbuch, Frank Gao, and Mary Montoya as part of Bios Group work financially supported by Nasdaq. Significant contributors to the reports that served as a foundation for specific chapters are acknowledged in those chapters. We acknowledge Bios Group role and support in developing the materials for the book. We thank Vince Hockett and Bios Group management for granting us the publication rights for this material. The views expressed here are those of the authors and are not necessarily reflective of views at the Bios Group or Nasdaq. Since this work was carried out, Bios Group operations have been sold, and both authors have moved on, with Vince setting up a branch of Eurobios in London, UK, and Sasha joining the Los Alamos National Laboratory. Both authors continue to apply the techniques and approaches discussed here to a wide variety of interesting problems, of both a research and practical nature. The authors are grateful to Al Berkeley, Mike Brown, Stuart Kauffman, Bob MacDonald, Bennett Levitan, Richard Palmer, Per Bak, Isaac Saias, Martin Shubik, Jeff Smith and other members of the Nasdaq Economic
Preface ix Research group, Simon Spencer, Jon Tarnow, Douglas Patterson, and others for their valuable comments and suggestions. We are indebted to Rob Axtell for his continued support and encouragement. We thank Paula Lozar for editing help. We thank the editorial staff at World Scientific for their help and patience. Any errors which may remain are of course the sole responsibility of the authors.
This page intentionally left blank
Contents Preface 1. Foresight, Unpredictability and Strategies 1 1.1 Introduction........................... 1 1.2 What is Agent-Based Modeling?............... 8 1.3 Nasdaq Market Overview................... 12 1.4 Nasdaq Simulation Model Overview............. 13 1.5 Existing Market Modeling and Simulation Work...... 15 1.5.1 Complexity and Agent-Based Modeling........ 16 1.5.2 Financial Markets and Agent-Based Modeling.... 17 1.5.3 Artificial Intelligence, Machine Learning, and Other Approaches to Modeling Agent Strategies...... 19 2. Market Dynamics Analytical Results 21 2.1 Introduction........................... 21 2.2 Spreads in Markets....................... 23 2.3 Summary of the Glosten-Milgrom Model.......... 23 2.3.1 GM Model, Information, and Bayesian Updates... 24 2.3.2 Convergence Times................... 26 2.3.3 Tick-Size Effects.................... 26 2.4 Extension of the GM Model to Multinomial Prices..... 27 2.4.1 The Mathematical Formulas for the Multinomial Case........................... 28 2.4.2 Updating the Probability in the Recursive Case... 28 2.4.3 Setting the Bid-Ask Prices............... 30 2.4.4 The Binomial Case................... 31 vii xi
xii A Nasdaq Market Simulation 2.5 Multinomial Additions..................... 32 2.5.1 Convergence of Beliefs................. 34 2.6 Extension of GM to Incorporate Inventory.......... 34 2.6.1 Convergence of Beliefs................. 35 2.7 Price Dynamics......................... 36 3. Agent-Based Model and Simulation Results 39 3.1 Introduction........................... 39 3.2 Model Overview........................ 41 3.2.1 Market.......................... 41 3.2.2 Strategies........................ 42 3.2.3 Evolutionary Selection of Strategies and Learning Strategies........................ 46 3.3 An Outline of the Computer Model.............. 48 3.4 Results.............................. 50 3.4.1 Tick Size Effects on Price Discovery......... 50 3.4.2 Explanations of Observed Results........... 56 3.4.2.1 Effects of Parasitism............. 56 3.4.2.2 Effects of Tick Size.............. 57 3.5 Aggregate Behavior of the Market.............. 58 3.6 Fat Tails............................. 59 3.6.1 Herding Effects..................... 60 3.6.2 Range of Fat Tails................... 62 3.7 Spread Clustering........................ 63 3.8 Other Results.......................... 65 3.9 Profitability of Market Makers Strategies.......... 65 3.10 Informational Content of the Trades............. 66 3.11 Market Structure Analysis................... 66 3.12 Market s Predictability..................... 66 3.13 Effects of Market Infrastructure................ 67 3.14 Effects of Learning and Evolution............... 67 3.15 Conclusions........................... 69 4. Spread Clustering 71 4.1 Introduction........................... 71 4.2 Spread Clustering........................ 72 4.2.1 Spread Clustering with Learning and Basic Inventory Market Makers..................... 72
Contents xiii 4.2.2 Spread Clustering with Other Dealer Types..... 74 4.3 Are the Spread Clustering Results Meaningful? Pros and Cons............................... 76 4.3.1 Real World Relevance of the Spread Clustering Results.......................... 76 4.3.2 Possible Criticism.................... 77 4.4 Validity of the Observed Clustering Effects......... 77 4.5 Possible Reasons for Observed Clustering of Spread Sizes. 79 4.6 Conclusions........................... 80 5. Learning, Evolution and Tick Size Effects 81 5.1 Types of Reinforcement-Learning Dealers.......... 81 5.2 The Reinforcement-Learning Framework and Incentive Structure............................ 84 5.3 Learning in the Market.................... 86 6. Calibration 89 6.1 Introduction........................... 89 6.2 Results.............................. 90 6.3 Calibration Methodology.................... 92 6.3.1 Calibrating to the Trading Volume Distribution... 92 6.3.2 Calibration on the Individual Level.......... 92 6.4 Quantitative Behaviors: Calibrating Simulated Strategies Against Real-World Strategies................. 93 6.4.1 Parameter Discovery for Basic Dealers........ 95 6.4.2 Parameter Discovery for Volume Dealers....... 97 6.4.2.1 Time series comparisons........... 97 6.4.2.2 Statistical analysis.............. 99 6.4.3 Identification of Analytic Parasites.......... 100 6.4.4 Results Basic Dealers................. 101 6.4.5 Results Volume Dealers and Parasitic Dealers... 103 6.5 Wealth Effects Analysis.................... 108 6.6 Conclusions........................... 110 7. Phase Transitions in the Market 111 7.1 Data Preparation........................ 111 7.1.1 Time Series Regularization Procedure........ 111
xiv A Nasdaq Market Simulation 7.1.2 Price Response to the Number of Transactions and Their Volume...................... 112 7.2 Phase Transitions Analysis.................. 114 7.3 Conclusions........................... 115 8. Validation: After Decimalization and the Tick-Size Change 119 8.1 Introduction........................... 119 8.2 Comparing Predictions with the Actual Decimalization Results.............................. 121 8.2.1 Negative Effects on the Price Discovery Process... 121 8.2.2 Possible Volume Increases............... 122 8.2.3 Ambiguous Investor Wealth Effects.......... 123 8.2.4 Phase Transitions in the Space of Market-Maker Strategies........................ 124 8.2.5 Spread Clustering.................... 124 8.2.6 More Effective Parasitic Strategies.......... 124 8.3 Conclusions and Directions for the Future.......... 125 9. Future Developments of the Model 127 9.1 Qualitative Scenario Investigation............... 127 9.2 Macrostructure Explanation.................. 128 9.3 Risk Analysis.......................... 128 9.4 Agent Soup of the Day..................... 128 Appendix A: The Agent-Based Model Software 131 A.1 Graphical User Interface.................... 132 A.2 Menus.............................. 135 A.3 Charts.............................. 136 A.3.1 Market and Pricing Charts............... 136 A.3.2 Market Maker Performance.............. 139 A.3.3 Investor Performance.................. 139 A.4 Interacting with the Market.................. 140 A.5 Batch Mode........................... 141 A.6 Basic Description of Object Simulation Framework..... 142 Bibliography 145 Index 151