Quantifying Trading Behavior in Financial Markets Using Google Trends Preis, et al. Scientific Reports 2013
After a long hiatus from summarizing papers while I finished my thesis (and read countless more papers), I figure I’d start this year off by summarizing an interesting behavioural finance paper! Tobia Preis from the University of Warwick and his team worked to quantify the usefulness of Google Trends data when applied as a trading strategy. Although this research was completed in 2013, it would have at the time been at the forefront of applied behavioural finance research to an active trading strategy, and the results remain relevant today in the world of data science.
We suggest that massive new data sources resulting from human interaction with the Internet may offer a new perspective on the behavior of market participants in periods of large market movements. By analyzing changes in Google query volumes for search terms related to finance, we find patterns that may be interpreted as ‘‘early warning signs’’ of stock market moves.
Many people have tried with varying levels of success to use this type of information to predict the stock market. There are many studies around analyzing Twitter sentiment in order to predict stock market moves or keywords from news articles. However, this is the first research that I have come across that uses Google Trends. This approach is interesting as Google Trends has the advantage of being directly related to public perception. In contrast from news articles that are written by a relatively small number of journalists, Google Trends uses input data from millions of people searching Google each day. This provides the potential for a powerful market sentiment predictor.
Methodology
The methodology used by the team is quite simple. They chose 98 stock market related keywords with the help of the Google Sets service, then analyzed the search volume of each keyword.
To uncover the relationship between the volume of search queries for a specific term and the overall direction of trader decisions, we analyze closing prices p(t) of the Dow Jones Industrial Average (DJIA) on the first trading day of week t. We use Google Trends to determine how many searches n(t – 1) have been carried out for a specific search term such as debt in week t– 1, where Google defines weeks as ending on a Sunday, relative to the total number of searches carried out on Google during that time.
Investment Strategy
The investment strategy for this research was also quite simple. Using stock price data from 2004 to 2011, the strategy purchases or sells a security when the volume of searches for a term increases or decreases over a one to six week time period.
The team uses the keyword debt as an example, as the term is historically tied to times of financial crisis such as in 2008. For this example, the strategy is explained as:
We implement this strategy by selling the DJIA at the closing price p(t) on the first trading day of week t, if ∆n(t-1, ∆t) > 0, and buying the DJIA at price p(t+1) at the end of the first trading day of the following week… If instead ∆n(t-1, ∆t) < 0, then we buy the DJIA at the closing price p(t) on the first trading day of week t and sell the DJIA at price p(t+1) at the end of the first trading day of the coming week.
This states that when the search volume of the debt increases, a sell signal is generated. Likewise, when the search volume of debt decreases, a buy signal is generated. This indicates that a high search volume for the term debt is negatively correlated with market movements.
Results
Given the debt example, the profit and loss generated for the strategy is detailed in figure 1.
The results from this strategy show that the Google Trends trading method outperforms a simple buy and hold strategy by a long shot! This strategy produces returns of over 326% while the buy and hold strategy provides only 16%. The example in this figure uses a three-week time period.
The same process was carried out or all 98 keywords, with the returns averaged over a six-week period. The results in figure 2 show the performance of each keyword in this strategy as standard deviations from a random trading strategy that follows a normal distribution. The research was tested on both US search volume data and global search volume data. The research shows the term debt has the best performance, where it and many other search terms all outperform a buy and hold strategy of the Dow Jones and SPY.
Cumulative returns of 98 investment strategies based on search volumes restricted to search requests of users located in the United States for different search terms, displayed for the entire time period of our study from 5 January 2004 until 22 February 2011—the time period for which Google Trends provides data. We use two shades of blue for positive returns and two shades of red for negative returns to improve the readability of the search terms. The cumulative performance for the ‘‘buy and hold strategy’’ is also shown, as is a ‘‘Dow Jones strategy’’, which uses weekly closing prices of the Dow Jones Industrial Average (DJIA) rather than Google Trends data (see gray bars). Figures provided next to the bars indicate the returns of a strategy, R, in standard deviations from the mean return of an uncorrelated random investment strategies, <R>RandomStrategy = 0. Dashed lines correspond to -3, -2, -1, 0, +1, +2, and +3 standard deviations of random strategies. We find that returns from the Google Trends strategies tested are significantly higher overall than returns from the random strategies (<R>US = 0.60; t = 8.65, df = 97, p < 0.001, one sample t-test).
Going Forward
Overall the results show that this trading strategy outperforms a simple buy and hold model and shows promise for good trading results. With the vast amount of behavioural data available today, this research provides a foundation to implement further behavioural factors into your trading strategies.
Our empirical results so far are consistent with a two-part hypothesis: namely that key increases in the price of the DJIA were preceded by a decrease in search volume for certain financially related terms, and conversely, that key decreases in the price of the DJIA were preceded by an increase in search volume for certain financially related terms. However, our trading strategy can be decomposed into two strategy components: one in which a decrease in search volume prompts us to buy (or take a long position) and one in which an increase in search volume prompts us to sell (or take a short position).
The team shows that Google Trends data is both accurate at reflecting the current sentiment of the stock market, while they also note that the data shows promise of being able to anticipate future trends.
The authors also leave with a note on why exactly Google Trends may provide useful behavioural data:
We offer one possible interpretation of our results within the context of Herbert Simon’s model of decision making. We suggest that Google Trends data and stock market data may reflect two subsequent stages in the decision-making process of investors. Trends to sell on the financial market at lower prices may be preceded by periods of concern. During such periods of concern, people may tend to gather more information about the state of the market. It is conceivable that such behavior may have historically been reflected by increased Google Trends search volumes for terms of higher financial relevance.