Saturday, October 1, 2022

stock market prediction using google trends

Can Google Trends help you forecast the stock market when there are many robust models available employing machine learning techniques? Let’s check.

When it comes to investing in the stock market, investors do so in anticipation of future trends. As a result, they try to predict the stock market. There are different methods to predict the stock market; Some use technical analysis, some use statistical analysis, and yet, others only invest in moving averages.

There are complex and robust models available that use artificial intelligence and machine learning approaches to predict the stock market. However, can we predict the stock market using Google Trends? In this article we will try to understand it.

As we all know that the stock market is driven by the mood of the investors. As a result, while conducting the study, we deduced that the attitude of retail investors is positively correlated with Google search volume. Let us start by calculating the bullish and bearish sentiments.

stock market prediction using google trends

Source: Google Trends

As you can see, there is a significant bounce during strong market progress and a sharp decline during selloff. We also need similar Google search traffic data on the bearish side to develop a sentiment index based on Google Trends.

stock market prediction using google trends

Source: Google Trends

When investors are stressed, they are more likely to search for phrases such as how to sell a stock, how to sell a stock and how to short sell. The bearish Google search volume can be seen in the graphic above. There has been some notable growth here as well. However, it is challenging to judge purely on the above two graphs. As a result, we calculate the spread between bullish and bearish search volume.

stock market prediction using google trends

As seen in the graph above, Bullish Search traffic began in July 2006, rebounded in July 2007, and enjoyed the last surge in January 2008 before starting its downward path. Similar patterns can be seen in January 2018, January 2020 and most recently in July 2021.

stock market prediction using google trends

In the graph above, we have shown the spread between Bullish and Bearish search volume (values ​​on the right axis) and Nifty 50 price movement (values ​​on the left axis). The mean (9.17) of the spread between the Bullish and Bearish search volumes is shown by the red line in the middle. You can see here that when the spread falls below its median, the stock market tends to rise, and vice versa.

To further understand its importance, assume an investor invests Rs 1 lakh in Nifty 50, CCIL All Sovereign Bond Index and a sentiment-based portfolio. Sentiment-based portfolios are constructed and maintained on the logic that when the spread is smaller than its median, we invest in Nifty 50; When the spread is higher than its median, we invest in the CCIL All Sovereign Bond Index.

stock market prediction using google trends