Pairs Trading Founded in 1807, John Wiley & Sons is the oldest independent publishing company in the United States. With offices in North America, Europe, Aus- tralia, and Asia, Wiley is globally committed to developing and marketing print and electronic products and services for our customers’ professional and personal knowledge and understanding. The Wiley Finance series contains books written specifically for finance and investment professionals as well as sophisticated individual investors and their financial advisors. Book topics range from portfolio management to e- commerce, risk management, financial engineering, valuation, and financial instrument analysis, as well as much more.
For a list of available titles, visit our Web site at www. Pairs Trading Quantitative Methods and Analysis GANAPATHY VIDYAMURTHY John Wiley & Sons, Inc. Copyright © 2004 by Ganapathy Vidyamurthy. All rights reserved.
Published by John Wiley & Sons, Inc., Hoboken, New Jersey. Published simultaneously in Canada. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, 978-750-8400, fax 978-646-8600, or on the web at www. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, 201-748-6011, fax 201-748-6008.
Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created or extended by sales representatives or written sales materials. The advice and strategies contained herein may not be suitable for your situation. You should consult with a professional where appropriate.
Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages. For general information on our other products and services, or technical support, please contact our Customer Care Department within the United States at 800-762-2974, outside the United States at 317-572-3993 or fax 317-572-4002. Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
For more information about Wiley products, visit our web site at www. Library of Congress Cataloging-in-Publication Data: Vidyamurthy, Ganapathy. Pairs trading : quantitative methods and analysis / Ganapathy Vidyamurthy. Includes bibliographical references and index.64′524—dc22 2004005528 Printed in the United States of America 10 9 8 7 6 5 4 3 2 1 Contents Preface ix Acknowledgments xi PART ONE Background Material CHAPTER 1 Introduction 3 The CAPM Model 3 Market Neutral Strategy 5 Pairs Trading 8 Outline 9 Audience 10 CHAPTER 2 Time Series 14 Overview 14 Autocorrelation 15 Time Series Models 16 Forecasting 24 Goodness of Fit versus Bias 25 Model Choice 26 Modeling Stock Prices 30 CHAPTER 3 Factor Models 37 Introduction 37 Arbitrage Pricing Theory 39 The Covariance Matrix 42 Application: Calculating the Risk on a Portfolio 44 Application: Calculation of Portfolio Beta 47 Application: Tracking Basket Design 49 Sensitivity Analysis 50 v vi CONTENTS CHAPTER 4 Kalman Filtering 52 Introduction 52 The Kalman Filter 54 The Scalar Kalman Filter 57 Filtering the Random Walk 60 Application: Example with the Standard & Poor Index 64 PART TWO Statistical Arbitrage Pairs CHAPTER 5 Overview 73 History 73 Motivation 74 Cointegration 75 Applying the Model 80 A Trading Strategy 82 Road Map for Strategy Design 83 CHAPTER 6 Pairs Selection in Equity Markets 85 Introduction 85 Common Trends Cointegration Model 87 Common Trends Model and APT 90 The Distance Measure 93 Interpreting the Distance Measure 94 Reconciling Theory and Practice 97 CHAPTER 7 Testing for Tradability 104 Introduction 104 The Linear Relationship 106 Estimating the Linear Relationship: The Multifactor Approach 107 Estimating the Linear Relationship: The Regression Approach 108 Testing Residual for Tradability 112 CHAPTER 8 Trading Design 118 Introduction 118 Contents vii Band Design for White Noise 119 Spread Dynamics 122 Nonparametric Approach 126 Regularization 130 Tying Up Loose Ends 135 PART THREE Risk Arbitrage Pairs CHAPTER 9 Risk Arbitrage Mechanics 139 Introduction 139 History 140 The Deal Process 141 Transaction Terms 142 The Deal Spread 145 Trading Strategy 147 Quantitative Aspects 149 CHAPTER 10 Trade Execution 151 Introduction 151 Specifying the Order 152 Verifying the Execution 155 Execution During the Pricing Period 161 Short Selling 166 CHAPTER 11 The Market Implied Merger Probability 171 Introduction 171 Implied Probabilities and Arrow-Debreu Theory 173 The Single-Step Model 175 The Multistep Model 177 Reconciling Theory and Practice 180 Risk Management 184 CHAPTER 12 Spread Inversion 189 Introduction 189 The Prediction Equation 190 The Observation Equation 192 viii CONTENTS Applying the Kalman Filter 193 Model Selection 194 Applications to Trading 197 Index 205 Preface ost book readers are likely to concur with the idea that the least read M portion of any book is the preface.
With that in mind, and the fact that the reader has indeed taken the trouble to read up to this sentence, we prom- ise to leave no stone unturned to make this preface as lively and entertain- ing as possible. For your reading pleasure, here is a nice story with a picture thrown in for good measure. Enjoy! Once upon a time, there were six blind men. The blind men wished to know what an elephant looked like.
They took a trip to the forest and with the help of their guide found a tame elephant. The first blind man walked into the broadside of the elephant and bumped his head. He declared that the elephant was like a wall. The second one grabbed the elephant’s tusk and said it felt like a spear.
The next blind man felt the trunk of the elephant and was sure that elephants were similar to snakes. The fourth blind man hugged the elephant’s leg and declared the elephant was like a tree. The next one caught the ear and said this is definitely like a fan. The last blind man felt the tail and said this sure feels like a rope.
Thus the six blind men all perceived one aspect of the elephant and were each right in their own way, but none of them knew what the whole elephant really looked like. ix x PREFACE Oftentimes, the market poses itself as the elephant. There are people who say that predicting the market is like predicting the weather, because you can do well in the short term, but where the market will be in the long run is anybody’s guess. We have also heard from others that predicting the market short term is a sure way to burn your fingers.
“Invest for the long haul” is their mantra. Some will assert that the markets are efficient, and yet some others would tell you that it is possible to make extraordinary returns. While some swear by technical analysis, there are some others, the so-called fundamentalists, who staunchly claim it to be a voodoo science. Multiple valuation models for equities like the dividend discount model, relative val- uation models, and the Merton model (treating equity as an option on firm value) all exist side by side, each being relevant at different times for dif- ferent stocks.
Deep theories from various disciplines like physics, statistics, control theory, graph theory, game theory, signal processing, probability, and geometry have all been applied to explain different aspects of market behavior. It seems as if the market is willing to accommodate a wide range of sometimes opposing belief systems. If we are to make any sense of this smor- gasbord of opinions on the market, we would be well advised to draw com- fort from the story of the six blind men and the elephant. Under these circumstances, if the reader goes away with a few more perspectives on the market elephant, the author would consider his job well done.
Acknowledgments ll of what is in the book has resulted from the people who have touched A my life, and I wish to acknowledge them. First, I thank my parents for raising me in an atmosphere of high expectations: my dad, for his keen in- terest in this project and for suggesting the term stogistics, and my mom, for her unwavering confidence in my abilities. I also thank my in-laws for being so gracious and generous with their support and for sharing in the excite- ment of the whole process. I greatly thank friends Jaya Kannan and Kasturi Kannan for their thoughtful gestures and good cheer during the writing process.
Thanks to my brother, brother-in-law, and their spouses—Chintu, Hema, Ganesh, and Annie—for their kind and timely enquiries on the status of the writing. It definitely served as a gentle reminder at times when I was lagging behind schedule. I owe a deep debt of gratitude to my teachers not only for the gift of knowledge but also for inculcating a joy for the learning process, especially Professor Narasimha Murthy, Professor Earl Barnes, and Professor Robert V. Kohn, all of whom I have enjoyed the privilege of working with closely.
The contents of Chapters 11 and 12 are an outcome of the many dis- cussions with Professor Robert V. The risk arbitrage data were provided by Jason Dahl. The cartoon illustrations done by Tom Kerr are better than I could ever imagine. I thank all of them.
Professors Marco Avellaneda (Courant Institute of Mathematics), Robert V. Kohn (Courant Institute of Mathematics), Kumar Venkataraman (Cox School of Business Southern Methodist University), and professionals Paul Crowley, Steve Evans, Brooke Allen, Jason Dahl, Bud Kroll, and Ajay Junnarkar agreed to review draft versions of the manuscript. Many thanks to all of them. All mistakes that have been overlooked are mine.
I thank my editor, Dave Pugh, for ensuring that the process of writing was a smooth and pleasurable one. Also, thanks to the staff at John Wiley, including Debra Englander for their assistance. I apologize for any persons left out due to my absentmindedness. Please accept my unspoken thanks.
xi xii ACKNOWLEDGMENTS Last, but most importantly, I wish to thank my wife, Lalitha, for all the wonderful years, for teaching me regularization and being able to share in the excitement of new ideas. Also, thanks to Anjali and Sandhya without whose help the project would have concluded a lot sooner, but would have been no fun at all. You make it all worth it. PART One Background Material CHAPTER 1 Introduction e start at the very beginning (a very good place to start).
We begin with W the CAPM model. THE CAPM MODEL CAPM is an acronym for the Capital Asset Pricing Model. It was originally proposed by William T. The impact that the model has made in the area of finance is readily evident in the prevalent use of the word beta.
In contemporary finance vernacular, beta is not just a nondescript Greek let- ter, but its use carries with it all the import and implications of its CAPM definition. Along with the idea of beta, CAPM also served to formalize the notion of a market portfolio. A market portfolio in CAPM terms is a portfolio of assets that acts as a proxy for the market. Although practical versions of market portfolios in the form of market averages were already prevalent at the time the theory was proposed, CAPM definitely served to underscore the significance of these market averages.
Armed with the twin ideas of market portfolio and beta, CAPM at- tempts to explain asset returns as an aggregate sum of component returns.