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 website at www.WileyFinance.com.
Founded in 1807, JohnWiley & Sons is the oldest independent publishing company in the United States. With offices in North America, Europe, Australia, 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.
Copyright © 2016 by Richard L. Peterson. 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, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600, or on the Web at www.copyright.com. 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, or online at http://www.wiley.com/go/permissions.
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 for 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 publishes in a variety of print and electronic formats and by print-on-demand. Some material included with standard print versions of this book may not be included in e-books or in print-on-demand. If this book refers to media such as a CD or DVD that is not included in the version you purchased, you may download this material at http://booksupport.wiley.com.
For more information about Wiley products, visit www.wiley.com.
Library of Congress Cataloging-in-Publication Data is available:
ISBN 9781119122760 (Hardcover)
ISBN 9781119163749 (ePDF)
ISBN 9781119163756 (ePub)
Cover Design: Wiley
Cover Images: brain social media © VLADGRIN/istockphoto.com; summer background
© Magnilion/istockphoto.com
To the MarketPsych team. Your inspiration and persistence created something entirely new in the world.
From investor neuroimaging to developing sentiment-based market models, Dr. Peterson spends his time exploring the intersection of mind and markets. Dr. Peterson is CEO of MarketPsych, where he is a creative force behind the Thomson Reuters MarketPsych Indices (TRMI). The TRMI is a data feed of emotions and macroeconomic topics in social and news media covering 8,000 equities, 130 countries, 30 currencies, and 35 commodities. Dr. Peterson has published in academic journals, including Games and Economic Behavior and the Journal of Neuroscience, written textbook chapters, and is an associate editor of the Journal of Behavioral Finance. His book Inside the Investor's Brain (Hoboken, NJ: John Wiley & Sons, 2007) is in six languages, and it and MarketPsych (Hoboken, NJ: Wiley 2010) were named top financial books of the year by Kiplinger. Dr. Peterson received cum laude Electrical Engineering (B.S.), Arts (B.A.), and Doctor of Medicine degrees (M.D.) from the University of Texas. Called “Wall Street's Top Psychiatrist” by the Associated Press, he performed postdoctoral neuroeconomics research at Stanford University and is board-certified in psychiatry. He lives in California with his family.
As a 12-year-old boy I was befuddled when my father—a finance professor—gave me trading authority over a small brokerage account. At the time I didn't understand what the stock market was, and I had no idea how to proceed. He educated me on how to read stock tables in the daily newspaper (this was 1985), call a broker, and place an order. I was set free with my limited knowledge and zero experience with the goal of growing the balance.
To select investments, I first turned to the local newspaper. I reviewed the micro-text of the stock tables. The numbers didn't make sense to me—my first dead-end. For Plan B I visited the library, and the librarian referred me to dusty books from the 1960s that extolled the virtues of 'tronics stocks and Dow Theory. “Nothing for me here,” I thought. I wanted to know what to buy right now, not to learn ancient theory.
Next I went to a bookstore. A young attendant directed me to the magazine section, and the first magazine I picked up listed the Top 10 Growth Stocks of 1985. “Perfect!” I thought. I went home, called up the broker, and dictated the top 10 names to him, buying shares in each.
Over the next few months, I didn't pay attention to the stocks' performance. About a year later I figured it would be a good time to check in. I expected to hear that I had made big gains. In fact, I fantasized that the broker would soon be calling me for investment advice. When I opened an account statement I saw—to my disbelief—that the account was down 20 percent.
Confused, I went back to the bookstore. I related my tale to another attendant, and he condescendingly informed me, “Clearly you bought the wrong magazine.” “He's right!” I realized. This new, wiser guide helped me find a magazine extolling the Top 10 Most Innovative stocks of 1986. I went home, invested in a few of the top 10, and waited. I paid more attention this time, and I noticed that the first three monthly account statements were positive. I felt good, back on track, and I imagined I would be redeemed as a genius stock investor.
A year later, after a nine-month hiatus, I opened the latest account statement. The damage was worse—my account was now down nearly 50 percent from where it had started. “This can't be right,” I thought. I sheepishly called the broker. He confirmed the loss.
I wanted to understand what the experts knew that I did not, so I started reading books by investing by gurus such as Benjamin Graham and Peter Lynch. I noticed that these books were teaching me not only about fundamentals, but also about psychology. It seemed that many of history's most successful investors used an understanding of investor behavior. Baron Nathan von Rothschild, an early scion of the Rothschild banking dynasty, in 1812 guided investors to, “Buy to the sound of cannons, sell to the sound of trumpets.” Benjamin Graham wrote, “We buy from pessimists, and we sell to optimists.” Warren Buffett modernized the saying as, “Be fearful when others are greedy and greedy when others are fearful.” This advice seemed like useful guidance, but it wasn't specific or easily actionable.
Psychology-based investing advice seemed too vague. I wanted more concrete guidance, and as I embarked on engineering coursework in college, I found what I believed was a true advantage in investing—a deeper understanding of mathematics and models.
While the markets had beaten me as a 12-year-old investor, in college I vowed to learn their tricks and recover my losses. Working through a university degree in electrical engineering, the solidity of mathematics—of software development and machine learning algorithms—seemed like the best path to resurrecting the now-dormant brokerage account. I obtained long price and volume data histories, reserved CPU time on the engineering department's fast RISC machines, and wrote code to identify patterns in the prices.
The predictive systems I built seemed promising at first. The algorithms found basic patterns in prices, and they had decent accuracy in their out-of-sample predictions. As a result I decided to use the systems in live trading. Over the following three years, I traded S&P 500 futures contracts based on these systems' directional signals.
While they were initially successful, two problems emerged as I used these predictive systems. First, I saw what quantitative analysts call alpha decay, the phenomenon in which good mathematical trading systems gradually fade in their profitability. The models worked well on their “training set” in the 1980s and early 1990s, but every year through the late 1990s the profitability declined. Perhaps other traders were finding the same patterns and arbitraging them out of the markets, or perhaps markets were changing.
The second problem with these trading systems was more personal. Sometimes they indicated I should buy stocks as the prices were plummeting and the news was exceptionally negative. Other times, they told me to sell stocks as the market was charging higher. Such signals felt wrong to me. They required trading against the herd, and they were emotionally difficult to execute. Even though I intellectually knew that cherry-picking trading signals is a bad habit, too often I made excuses and deviated from the plan. After retrospectively analyzing my behavior, it seemed that the best trading signals were the most emotionally difficult to follow. I would have to battle my own human nature in order to trade well.
Considering these two problems together, it occurred to me that the most enduring edge in markets—the one least likely to suffer alpha decay—might lie in identifying the information and feelings (sentiments) that compel traders to move as a herd, too often at their own peril. Sentiment has a way of pulling traders in, of fooling them again and again. I wanted a way to quantify sentiment so I could use it without simultaneously being its victim. I became a scholar of sentiment to gain perspective on it.
Through four years of medical school and then four more years as a psychiatry resident, I researched the biology of decision making. During residency training I began coaching investors, and it was through coaching that I gained a deep appreciation of the very human, and very diverse, natures of successful traders.
Near the end of psychiatry residency I started neuroeconomics post-doctoral studies at Stanford University with Brian Knutson. Knutson's lab studies subjects undertaking financial risks, using tools such as brain fMRI and psychometric testing. I wrote extensively about this research in the book Inside the Investor's Brain.1 Researchers such as Knutson have demonstrated, even when the expected value of a risk is fixed, differences in the presentation and description of the potential gain or loss predictably alter behavior. I wondered how to quantify such “soft” factors in the information stream. Financial social media and news seemed like a good place to start.
The field of text analytics—quantifying sentiment, topics, and tones in investment-related language—is the quantitative basis for this book. While it's self-evident that the release of information such as corporate earnings leads to gyrations in stock prices, the impact is sometimes counterintuitive. For example, a company might beat consensus earnings estimates but the stock price immediately loses value. Given the preponderance of online stock conversations where earnings estimates and other opinions are shared, it seemed that if one could measure and quantify the important content in those messages, then perhaps a predictive edge could be identified in markets.
In pursuit of such a predictive edge, in 2004 the MarketPsych team built financial text analytics software. First, we built search engine technology to gather news and social media as quickly as articles were published. Then we built text analyzers to quantify influential characteristics in text. We created time series of each high-impact factor—factors such as fear or excitement—for each stock over time. Finally, we tested the data statistically to determine its correlation with future price action. We found promising results, and we resolved to start trading.
Using our early text analysis engines on social media, we set up simple investment strategies. These strategies ran automatically and posted their results online. Over 18 months through 2007 the strategies earned a 34 percent absolute return on paper. The strategies were written up in Popular Science in February 2008,2 and that article stoked interest from investors. We raised a small fund to trade a market-neutral hedge fund strategy. As far as we know, the fund was the first social media–based hedge fund.
On September 2, 2008, we launched the fund with $1 million under management and dreams of big growth. Three days after we started trading, Fannie Mae and Freddie Mac failed. Lehman Brothers and AIG went under the following weekend. Fortunately, we had prepared for the increased chaos by creating primarily fear-based strategies. Despite the onset of the financial crisis, the fund's returns held up through mid-2009.3,4 Over its first 12 months, the fund was up 40 percent net, putting it in the top 1 percent of hedge funds through the financial crisis.
We had built trading models that made money in volatile, emotional markets. As the dust cleared from the crisis, we needed to adapt. Managing $1 million was not enough to pay our expenses, regardless of the stellar performance. We economized as best we could, and we went offline every few months to tune the software and develop strategies for the new bull market. But these efforts weren't enough to save the fund.
By the time we closed it, we had traded the fund over a period of 2 years and 4 months and made a 28 percent return net of fees, beating the S&P 500 (including dividends) by more than 24 percent. The fund's returns were sharply positive for its first 12 months, then declined, as seen in the equity curve depicted in Figure P.1.
Figure P.1 Equity curve of the MarketPsy Long-Short Fund LP (upper line) versus the S&P 500 from September 2008 through December 2011.
At the end of 2010, we received inquiries from hedge funds looking to buy the sentiment data we had created. To pursue this new opportunity we set a goal to produce and sell the global standard in media sentiment data. To that end, in 2011 we joined forces with Thomson Reuters, and with its assistance we expanded our asset coverage to include currencies, commodities, countries, and global stocks.
The data feed we produce is now called the Thomson Reuters MarketPsych Indices (TRMI), and Thompson Reuters distributes the feed to funds, banks, brokers, governments, and researchers who use the data to predict global economic activity and asset prices. Insights derived from the TRMI are woven throughout this book. Research cited in this book was produced by Aleksander Fafula and CJ Liu of MarketPsych, Elijah DePalma of Thomson Reuters, and various university academic researchers.
Aleksander Fafula joined the MarketPsych team as a data scientist after earning a PhD in finance (he already had a master's degree in computer science). Aleksander completed his innovative PhD thesis by developing trading models that tapped into collective misperceptions of stock price charts.
I heard rumors about CJ before I met him. A professor at the University of California at Berkeley—Terry Odean—had heard of a sentiment aficionado developing models in the financial engineering department, where CJ was completing his Master's degree. As a child CJ was an expert in the card game Big Two. Big Two is similar to the English card game Liar. The goal of Big Two is to dispose of all of one's cards without being caught in a deception. The best players can detect what cards others are holding through behavioral cues. CJ's interest in behavioral analysis is similarly evident in his poker talents. CJ once took a trip to Las Vegas with other members of our team. While everyone else slept, CJ played Texas Hold'em all night long, winning a significant amount of money. He later described how he had made unpredictable bets in order to throw the professionals off his scent (similar to the strategy of Jesus Ferguson described in Chapter 15).
This book is based on a simple claim: There are patterns in market prices. While that assertion is controversial among academics, belief in that notion is a prerequisite to work in the investment industry. Investors who propose to beat the market attempt to harvest some mispricing, somewhere, often systematically.
This book covers broad scientific and experimental ground as it makes the case that not only do price patterns exist, but the most predictable patterns are rooted in the anatomy of the human brain and the biology of its information processing networks.
Some information provokes emotional reactions—as we describe in subsequent chapters—and these reactions predictably alter trading behavior. In this book the term sentiment refers to emotions, feelings, outlooks, attitudes, and beliefs. Sometimes investors reveal their sentiment through their statements in news and social media, and those statements become the predictive information of interest. Sentiments alter collective behavior, leading to patterns in prices.
This book is organized into five parts. Part One explores the foundations of investor behavior. Investor sentiment has been found predictive of market price action based on humans' innate information processing networks and specific characteristics of information. Part Two examines short-term price patterns that result from both news and social media. Part Three lays out the longer-term price patterns associated with sentiment, including momentum and value enhancements with sentiment. Part Four describes complex price patterns such as speculative bubbles and patterns in commodities and currencies. Part Five turns its attention to individual investor psychology, sharing tools to help investors avoid the biases whose effects on collective trading behavior cause the price patterns examined in this book.
Usually media sentiment is a reaction to already-past events. But in some cases sentiment itself appears to predict price action. In other cases—such as when examining traditional investment factors—sentiment improves an already-existing predictive advantage. The book examines market price patterns based on the independent power of sentiment and the conditioning of sentiment with fundamental and price variables.
Some readers may be disoriented by the numerous proofs—such as equity curves and charts—provided. This voluminous evidence is offered because the field of sentiment analysis is controversial to some, and we hope to convincingly demonstrate its intrinsic value.
This book is not designed to give a one-size-fits-all investing strategy or trading system, and it does not intend to promote a specific product (however, it indirectly promotes the Thomson Reuters MarketPsych Indices because that is the primary data source utilized). This book is based on more than a decade of research into the nature and role of sentiment in driving trading behavior and market prices. It reviews relevant academic research on the topics of interest in each chapter. When appropriate, some writings are recycled from past MarketPsych newsletters and books. While others have not yet produced data with the level of detail available to our internal research, we believe that due to the universality of our process, the studies in this book are replicable. The particulars of markets may evolve, but the general principles of human behavior change slowly, if at all.
There are major potential weaknesses in this book's approach. First of all, it is based on the quantification of meaning in an enormous amount of textual data—literally billions of financial news and social media articles published since 1998. Given this large volume of information, there is a risk of making spurious correlations. This pitfall is addressed in Chapter 5. Over the years we have found many preliminary results that could not be replicated due to statistical errors or bugs in the analytics code. The findings presented in this book were repeated on various data versions, using pricing data from different providers, after much debugging, and typically following forward-testing. As a result, we hope that the results presented here will prove robust, but only additional external replication and the passage of time will confirm them. Second, explaining a phenomenon from the brain level to the market level requires deductive leaps that may never be supported by scientific research. While such connections are suggested in this book, they are not definitively established. Third, because the book is building on established academic findings but is written for practitioners, it intersperses both academic and trading jargon, findings, and examples. It tries to make the text flow smoothly and the linkages clear, but despite our best efforts, fluidity is not guaranteed. In many cases, research results are quite complex and nuanced—for example, academic findings about the predictability of Twitter sentiment deviate from those derived from Facebook—and as a result, readers may be confused by the breadth of findings. Fourth, this book simplifies sentiment-based investing. This approach may be the most difficult and dangerous investment discipline, as it contravenes our human nature. Only seasoned professionals with excellent risk management should attempt the strategies described herein. Given its unusual format—part textbook, part investment guide—the book is modular in its approach, and readers should feel free to skip ahead to sections of interest.
There is a clear conflict of interest in this book. This book is written by a data vendor, and it contains research by ourselves and competing vendors who have a financial interest in data sales. To lessen this bias, the book reviews existing academic literature. We distributed the TRMI sentiment data to qualified global academics for research, and their results are included in the relevant chapter sections. Additionally, we have endeavored to be as statistically honest in our own research, and all of the equity curves in this text have been replicated under various conditions and limitations to ensure robustness. Nonetheless our conflict of interest is inescapable. Evidence from the field of medicine indicates that such conflicts are unconscious, pervasive, and too often denied. We acknowledge that we are susceptible to significant bias, and we hope this bias does not diminish the overall quality or long-term impact of this work.
Financial markets are a creation of humans: humans who respond with fear and uncertainty, humans with damaged egos, humans who curse others for their mistakes, humans who make predictions, and humans who follow the crowd. Market prices, like humans, are sometimes—but not always—driven by sentiment. This book is about the systematic and collective investor sentiments that leave telltale patterns in prices. Readers can learn both to take advantage of these patterns and to manage sentiment in themselves. We hope you gain new insights into financial markets and become a superior investor (and human being) as you journey through this book.
In 2004 the MarketPsych team set out to decipher how information and sentiment impact global markets. The team was deeply inspired on this journey by Dr. Tom Samuels. He is dearly missed following his passing in 2013. Dr. Samuels hoped that through sentiment analysis the business community would more fully understand the importance of the unconscious in driving business and market activity. He provided exceptional resources and encouragement to the company from its inception.
This book was written as a team effort over several years. So many people influenced its production that we cannot do justice to their individual contributions. The ground-breaking work of data scientists including Changjie Liu, Aleksander Fafula, and Elijah DePalma is featured throughout this book. Without their insights and statistical studies this book would not have been possible.
Without a world-class sentiment data product, the statistical evidence would have been impossible to gather. As CTO and sysadmin extraordinaire, Diego Gutierrez dedicated enormous time and countless sleepless nights to developing a flawless data product. Thomson Reuters product manager Eric Fischkin devoted his unparalleled expertise and sharp mind to creating the data architecture. Eugene Smolanka's work on information aggregation, Alexey Karakulov's project management and QA, Tayyab bin Tariq's data analytics, Zulma Cao's crawlers, and Alexey Verenikin's determined detective work were also essential to the production of the data that underlies this book. Additionally, we feel much gratitude to the ongoing development assistance of Vesna Gvozdenovic, Dmytro Ivanysh, Kostyantyn Leschenko, Konstantin Nikolayev, Ramiro Rela, and Ante Kegalj. Past team members including Thomas Hartman, Yury Shatz, Jacob Sisk, Ali Arik, and Richard Brown (Thomson Reuters) contributed invaluable insights and efforts that are bearing fruit in the publication of this book. Contributions from interns Robin Tu, Davis Matthews, Eric Bet, Alan Liu, and Alan Morningstar are apparent in the book, while dozens of others were instrumental in the data's production and QA—too many to list all of their names. We have been incredibly lucky to assemble a global team of A-players.
Over the years we've also benefited from the support and guidance of Steve Goodall, Paul Zak, Richard Friesen, Mark Harbour, Frank Murtha, Gene Dongieux, Dennis Thomas, Doug Samuels, Tom Samuels Jr., Victor Lacy, Jeff Ehrlich, and Scott Martin. The team at Panoptic Fund Administration—Georgia Goodman, Matt Pringle, and Jeff Lambert—are delightful people and were a constant source of encouragement during our trading days.
On the Thomson Reuters' side, James Cantarella and Dennis Goett kept our partnership progressing. The infectious enthusiasm of Thomson Reuters' Sunny Qu, Christopher Kleparek, Steve Dean, Nathan Attrell, Adam Garrett, Love Srivastava, Kazuhisa Matsuda, Joy Thaler as well as dozens of others has been deeply gratifying. Many others have provided insightful guidance and real-world feedback including the Amareos team members Jerome Favresse, Philippe El-Asmar, Ryan Shea, and EOTpro's Bill Dennis.
We also extend our appreciation to the loved ones who didn't see us for many days, evenings, and weekends. For the children who wondered what their preoccupied parents were up to, we hope they will one day feel as inspired and driven by their work as we do by ours. And on a personal note, much love to Sarah, Dr. Peterson's amazing wife, for her unflagging optimism and patience during the writing of this book.
We are extremely indebted to the hundreds of academics and researchers—such as Brian Knutson, Camelia Kuhnen, Jiancheng Shen, Feng Li, Paul Tetlock, and Joseph Engelberg—whose studies provide support and context to our findings. Without their dedication and passion, human knowledge would not advance.
And appreciation goes out to this book's readers. Your willingness to question, challenge, and understand the world from a new perspective is fundamental to progress. We hope you find this book as fascinating and enjoyable to read as it was for our team to produce.