DSIJ Mindshare

Predicting the stock market using Google trends
Henil Shah
/ Categories: Trending, Mindshare

Predicting the stock market using Google trends

Can Google Trends help you anticipate the stock market when there are many strong models available that employ machine learning techniques? Let us investigate.

When it comes to stock market investment, investors do so in anticipation of a future trend. As a result, they attempt to forecast the stock market. There are different methods for predicting the stock market; some use technical analysis, some use statistical analysis, and still, others invest only in moving averages.  

There are complex and robust models available that anticipate the stock market using artificial intelligence and machine learning approaches. Can we, however, anticipate the stock market using Google Trends? In this article, we will attempt to comprehend the same.  

As we all know, the stock market is driven by investor mood. As a result, while conducting the study, we hypothesised that retail investor attitudes are positively correlated with Google search volumes. Let us begin by calculating the bullish and bearish emotions. 

 

 

Source: Google Trends 

 

As you can see, there are significant jumps during the robust market advance and a precipitous drop during the sell-off. We also need identical google search traffic data on the bearish side to develop a sentiment index based on Google Trends.  

 

Source: Google Trends 

 

When investors are stressed, they are more likely to search for phrases like sell stocks, how to sell stocks, and how to short sell. The bearish Google search volumes are seen in the graphic above. There are some significant increases here as well. However, drawing a judgement purely on the above two graphs is challenging. As a result, we calculated the spread between bullish and bearish search volume. 

 

 

 

As seen in the graph above, bullish search traffic began to inch from July 2006, had a breather in July 2007, and enjoyed the last surge in January 2008 before beginning their downward path. Similar patterns may be seen in January 2018, January 2020, and most recently in July 2021. 

 

  

 

In the graph above, we showed the spread between bullish and bearish search volume (values on the right axis) and Nifty 50 price movement (values on the left axis). The median (9.17) of the spread between bullish and bearish search volume is shown by the red line in the middle. You can see here that when the spread falls below its median, the stock market rises, and vice versa. 

 

To further comprehend its significance, consider that an investor invests Rs one lakh in the Nifty 50, the CCIL All Sovereign Bond Index, and a sentiment-based portfolio. The sentiment-based portfolio is built and maintained on the rationale that when the spread is smaller than its median, we invest in the Nifty 50; when the spread is greater than its median, we invest in the CCIL All Sovereign Bond Index. 

 

 

 

The graph above demonstrates that the sentiment-based portfolio is a clear winner. Though it lagged behind the Nifty 50 for the first three to four years, it eventually overtook it. The sentiment-based portfolio achieved a compound annual growth rate (CAGR) of 14.2 per cent, whereas the Nifty 50 and CCIL All Sovereign Bond Index returned 13.3 per cent and seven per cent, respectively. 

 

 

 

Even when it came to risk, the sentiment-based portfolio outperformed the Nifty 50 and the CCIL All Sovereign Bond Index. Despite being less volatile in terms of standard deviation, it was able to outperform the Nifty 50 index. Furthermore, its maximum drawdown is about half that of the Nifty 50 index. As a result, we may conclude that its risk-return profile is quite promising. 

 

Having said that, there is no method in the world that is completely foolproof and accurately anticipates the market, and the approach described in this article is no exception. However, forecasting the market using Google Trends is only an attempt to comprehend the possibilities of reading investor emotions and investing appropriately. 

Previous Article Upper circuit alert: Rama Steel Tubes Limited surges upon bagging new orders from UPPCL
Next Article Nifty ends flat; India VIX surges over 2 per cent
Print
1389 Rate this article:
4.0
Please login or register to post comments.
DALAL STREET INVESTMENT JOURNAL - DEMOCRATIZING WEALTH CREATION

Principal Officer: Mr. Shashikant Singh,
Email: principalofficer@dsij.in
Tel: (+91)-20-66663800

Compliance Officer: Mr. Rajesh Padode
Email: complianceofficer@dsij.in
Tel: (+91)-20-66663800

Grievance Officer: Mr. Rajesh Padode
Email: service@dsij.in
Tel: (+91)-20-66663800

Corresponding SEBI regional/local office address- SEBI Bhavan BKC, Plot No.C4-A, 'G' Block, Bandra-Kurla Complex, Bandra (East), Mumbai - 400051, Maharashtra.
Tel: +91-22-26449000 / 40459000 | Fax : +91-22-26449019-22 / 40459019-22 | E-mail : sebi@sebi.gov.in | Toll Free Investor Helpline: 1800 22 7575 | SEBI SCORES | SMARTODR