International Journal of Pure and Applied Mathematics Volume 118 No. 22 2018, 941-946 ISSN: 1314-3395 (on-line version) url: http://acadpubl.eu/hub Special Issue ijpam.eu

GOOGLE TRENDS AND STOCK RETURNS – A STUDY OF INVESTOR SENTIMENTS USING

1Hari Krishnan.A.V, 2Gopakumar.V, 3Varsha Sureshkumar School of Business, Amrita Vishwa Vidyapeetham, Coimbatore. [email protected], [email protected], [email protected]

Abstract: This paper tries to check for the presence or capitalization in the exchange. The adjusted daily absence of a relationship between the individual returns closing price for all the 50 stocks of the Nifty50 index of the stocks in NIFTY50 and trends data for was extracted for a period of 5 years starting December the word ‘buy ’. We have employed 2012 and ending December 2017 from the NIFTY Granger causality test to investigate the association website. This was then averaged into the weekly between data and individual returns. For closing price for analysis. the study, the adjusted closing prices of Nifty 50 shares for a period of 5 years is used to compute the weekly 2. Literature Review stock yield and the Google trend data from India for the keyword ‘buy’ is taken. It was Reference [1] examined the influence of information observed that the returns of some individual stocks contained in news on the stock market, by sourcing showed a bi-directional causality while some showed a news articles from Lexis Nexis, a searchable database unidirectional causality. Among NIFTY 50 stocks, of digitized print media. Results showed that the many did not show any causal relationship between the content in the recording revealed a substantial weekly returns and the relevant Google Trend keyword: connection with the stock yields. ‘buy’. Reference [2] applied the technique of collecting data from social media platforms like Facebook, Keywords: Google trend data, Unit root test, ranger Twitter and Google. The study performed a sequence causality test, Buy, Nifty 50 returns. analysis and transmission mechanism of how social media is a good reflector towards the capital markets. It 1. Introduction also put forth the relevance of reach of data from social media as a tool in monitoring the society’s behaviour. Investor sentiment acts as a good indicator for other Reference [3] tested for the presence of any investors for trading in stock markets traditionally. relationship between online search intensity and stock With the advent of the Internet and easy availability of trading behaviour. The test was carried out in Japanese information, market sentiment has recently been stock markets for 189 companies. All of them were observed online too, where investor sentiments are Japanese stocks, which were searched from 2008 to studied based on the search keywords about companies. 2011 in google.com. The conclusion drawn was that the The keyword ‘buy’ is usually used along with a relationship between search intensity and stock price is company name in websites like google.com when a positive but weak. But the relationship between search person searches for information, indicating an interest intensity and trading volume was positive and strong. to buy stocks of that company. Prospective investments Reference [4] examined if stock returns could be decisions are usually taken with the help of technology. forecasted by using data from Google Trends. Previous Google search is one such major tool for collecting studies stated that the returns were high for the first 1 to such data. The data from Google search is aggregated 2 weeks with Google search volumes, followed by a and available as Google Trends, which is an open- subsequent price reversal. The dataset used for this source and searchable database. By using the search study pertains to 2008 to 2013. The key conclusion of keyword ‘buy’ along with the company name, data is the paper was that higher Google search volumes for a extracted from Google Trends for a period. We then particular stock yielded negative returns. The paper test for any possible relationships between the word also attempted a trading strategy by selling the stocks ‘buy’ and Nifty50 stocks. with higher search volumes and buying those with less NIFTY is a broad-based index representing 50 frequent Google search volumes. large and liquid stocks on the National Stock Exchange, Reference [5] tested the relationship between India. Nifty50 stocks were chosen for the study because Twitter feeds and financial markets by collecting data it represents more than 60% of free float market on the volume of data churned out and performing a

941 International Journal of Pure and Applied Mathematics Special Issue

sentiment analysis for 30 companies from the Dow Causality test, a statistical technique used to predict the Jones Industrial Average (DJIA) index for 15 months. relationship between variables using time series data. The study found that Twitter sentiment had a positive One prerequisite for using Granger Causality test is that relationship with the stock returns when the volume is the data has to be stationary. So using unit root test, at peak. It also identified that Granger Causality and weekly returns of Nifty50 and Google Trend data are Pearson Correlation were lower in the time-series for tested for statistical stationarity. The unit root test is the given sample time frame. directed to find whether the dataset is stationary or not. Reference [6] presented an overview of the Statistical stationarity implies that the properties of mechanisms operating between social media tools and statistics (mean, variance and autocorrelation) are the capital markets explaining the rationale using perpetual for the given particular period of time. theories of behavioural finance. It also contemplated on Equation (1) and (2) explains the causal relationship less rational factors (investors’ sentiment/public mood) between ‘Buy’ and ‘NReturns’ as a powerful indicator of asset pricing and capital = market volatility. ∑ ∝ + ∑ + Reference [7] identified the emergence of cyclical (1) patterns, as a result of linearity. The NIFTY data was = ∑ ∝ + used from 1994 to 2013.The study found a cyclical ∑ + (2) pattern where Indian stock markets were observed to

have shifted between periods of efficiency and Where, inefficiency, and settling to becoming efficient from BUY= ‘buy’ search term used in 2003. Google trends Reference [8] analyzed changes in the volume of NRETURNS = Nifty 50 index weekly returns search terms in Google. The findings were patterns that can be interpreted as ‘early warning signs’ of stock , , , = coefficients of the model (i.e., the market moves. contributions of each laggedobservation) Data from January 2004 and February 2011 was , = residuals (prediction errors) for each time used. It was found that adding huge behavioural data series. sets (financial trading and search query volumes) can bring up new understandings into the different phases 4. Hypothesis of large-scale collective decision making Reference [9] used Granger Causality to The subsequent hypothesis was formulated which is comprehend the association between stock returns and tested using Granger Causality test. selected macroeconomic variables like oil prices and H01a: GT does not Granger cause RET exchange rates from India and US for the years 2000 to H01b: RET does not Granger cause GT 2015. It was found that the GDP growth rate of India and USA are significant predictors of NIFTY returns. Where, Similarly, reference [10] used Granger Causality to GT = ‘buy’ search term used in study the relationship between exchange rate returns Google trends and stock indices returns. The paper established that the RET = Nifty50 individual stocks weekly returns indices (commodity, IT, MNC and energy) significantly caused exchange rate returns. Figure 1.

3. Methodology 50 40 The study has taken weekly closing data of Nifty 50 30 stocks for the period starting December 2012 to 20 December 2017.Weekly index returns of Nifty50 individual stocks were then calculated by the following 10 log normal formula 0 = ln ( / ) 12131313141414141515151516161617171717 Where, = Nifty 50 index closing price of present Bosch HCL Technologies week

= Nifty 50 index closing price of previous week

This study has taken the Google Trend data using the keywords ‘buy’ weekly from December 2012 to December 2017. The Granger

942 International Journal of Pure and Applied Mathematics Special Issue

Pairwise Granger Causality Tests Figure 2. Date: 01/11/18 Time: 22:32 Sample: 1 263 120 Lags: 2 100 80 Null Hypothesis: Obs F-Statistic Prob. 60 40 LGT does not Granger Cause LRET 257 0.36259 0.6962 20 LRET does not Granger Cause LGT 7.03172 0.0011 0 Table 3. 12131313141414141515151516161617171717

Pairwise Granger Causality Tests Reliance Industries Hindustan Unilever Date: 01/27/18 Time: 22:09 Sample: 1 262 Lags: 2 Figure1 shows the Google Trends chart for Bosch and HCL Technologies for the period of 2012 to 2017. Null Hypothesis: Obs F-Statistic Prob. Figure 2 shows the Google Trends chart for Reliance Industries and Hindustan Unilever for the IOCRET does not Granger Cause IOCGT 258 3.35925 0.0363 IOCGT does not Granger Cause IOCRET 1.79785 0.1678 period of 2012 to 2017. The dataset was downloaded from the Google Trends in CSV format and then it was used for the Table 4. analysis. Google Trends is a representation of search interest Pairwise Granger Causality Tests relative to the highest value for the specified time and Date: 01/27/18 Time: 22:11 period. A value of 100 indicate the maximum Sample: 1 262 popularity of the term. A value of 50 indicates that the Lags: 2 term is semi-popular. Similarly, a score of ‘zero’ Null Hypothesis: Obs F-Statistic Prob. implies the term was searched by less than 1% of the population. MSRET does not Granger Cause MSGT 258 3.24441 0.0406 MSGT does not Granger Cause MSRET 0.40423 0.6679 5. Results and Discussion

The Granger causality results for lag 2 is shown in the Table 5. Tables below Pairwise Granger Causality Tests Date: 01/11/18 Time: 22:34 Table 1. Sample: 1 263 Lags: 2 Pairwise Granger Causality Tests Date: 01/09/18 Time: 20:39 Null Hypothesis: Obs F-Statistic Prob. Sample: 1 263 Lags: 2 ITGT does not Granger Cause ITRET 257 2.62075 0.0747 ITRET does not Granger Cause ITGT 6.38394 0.0020 Null Hypothesis: Obs F-Statistic Prob.

WGT does not Granger Cause WRET 257 1.07488... 0.3428... Table 6. WRET does not Granger Cause WGT 3.40337... 0.0347...

Pairwise Granger Causality Tests Table 2. Date: 01/27/18 Time: 22:13 Sample: 1 262 Lags: 2

Null Hypothesis: Obs F-Statistic Prob.

BOSCHRET does not Granger Cause BOSCHGT 254 0.03542 0.9652 BOSCHGT does not Granger Cause BOSCHRET 3.94287 0.0206

943 International Journal of Pure and Applied Mathematics Special Issue

Table 7. Google search trends (Table 1-5). Bosch and HCL displayed the opposite causality where Google Trends Pairwise Granger Causality Tests were causing stock returns (Table 6 and 7). Reliance Date: 01/27/18 Time: 22:15 Industries and HUL were observed to have a Sample: 1 262 Lags: 2 bidirectional causal relationship for the study (Table 8 and 9). There were 41 companies that did not show any Null Hypothesis: Obs F-Statistic Prob. kind of causality between Google trends and their respective stock returns. Table 10 shows the directional HCLRET does not Granger Cause HCLTECHGT 258 0.86569 0.4220 HCLTECHGT does not Granger Cause HCLRET 3.13435 0.0452 relationship using Granger causality for the selected 50 companies.

Table 10. Table 8. No of Causality Direction Pairwise Granger Causality Tests Companies Date: 01/27/18 Time: 22:21 RETURN Granger Cause Sample: 1 262 5 Lags: 2 GT GT Granger Causes Null Hypothesis: Obs F-Statistic Prob. 2 RETURN RILRET does not Granger Cause RILGT 258 7.39003 0.0008 RILGT does not Granger Cause RILRET 3.08323 0.0475 Bi-DIRECTIONAL 2 No Causality 41

Table 9. 6. Conclusion

Pairwise Granger Causality Tests Date: 01/27/18 Time: 22:23 The study examined the association between Google Sample: 1 262 Trends data and the Nifty50 individual stock returns. Lags: 2 Results showed that for certain stocks such as Wipro, Null Hypothesis: Obs F-Statistic Prob. ITC, Lupin, IOCL, Maruti Suzuki, the stock returns had

HULRET does not Granger Cause HULGT 258 4.89779 0.0082 a relationship with Google Trends data,. However, HULGT does not Granger Cause HULRET 4.94018 0.0079 Bosch and HCL Google Trends Granger caused return and for HUL, RIL both Google Trends data and stock

WRET:Wipro Returns returns had a bidirectional relationship for a period from December 2012 to December 2017. WGT:Wipro Google Trends ITRET:ITC Returns The Google Trends data pertaining to search word ‘buy’ was in use for this study. There ITGT:ITC Google Trends LRET: Lupin Returns is scope for studies using other keywords like “sell” and their relationship with LGT: Lupin Google Trends individual stock returns. IOCRET: Indian Oil Corporation (IOC) Returns IOCGT: Indian Oil Corporation Google Trends MSRET: Maruti Suzuki Returns References MSGT: Maruti Suzuki Google Trends BOSCHRET: BOSCH Returns [1] Clive B. Walker, “The direction of media influence: Real-estate news and the stock market”, BOSCHGT: BOSCH Google Trends Journal of Behavioral and Experimental Finance 10 HCLRET: HCL Returns (2016) 20–31 HCLGT: HCL Google Trends RILRET: Reliance Industries Returns [2] Laurens Bijl, Glenn Kringhaug, Peter Molnár RILGT: Reliance Industries Google Trends and EirikSandvik , “Google searches and stock HULRET: Hindustan Unilever (HUL) Returns returns”, International Review of Financial Analysis 45 HULGT: Hindustan Unilever Google Trends (2016) 150–156

[3] FumikoTakeda, Takumi Wakao, “Google search The same testing protocol was followed for the intensity and its relationship with returns and trading remaining 41 companies. After examining the volume of Japanese stocks”, Pacific-Basin Finance association between Google Trends data and the Journal 27 (2014) 1–18 individual stock returns, it was found that the results were mixed in . [4] Hyungyoungchoi and Hal Varian, “Predicting r companies like Wipro, ITC, Lupin, IOC and the Present with Google Trends”, The Economic Maruti Suzuki the stock returns Granger Caused Record, vol. 88, Special Issue, June, 2012, 2–9

944 International Journal of Pure and Applied Mathematics Special Issue

[5] Gabriele Ranco, Darko Aleksovski, Guido Caldarelli, Miha Grˇcar and Igor Mozeti, The Effects of Twitter Sentiment on Stock Price Returns

[6] Jaroslav Bukovina, Social media big data and capital markets—An overview, Journal of Behavioral and Experimental Finance 11 (2016) 18–26

[7] Gourishankar S Hiremath and JyotiKumari, “Stock Returns Predictability And The Adaptive Market Hypothesis In Emerging Markets: Evidence From India”, SpringerPlus (2014) 3:428

[8] Tobias Preis; Helen Susannah Moat; H. Eugene Stanley (2013). "Quantifying Trading Behavior in Financial Markets Using Google Trends". Scientific Reports. 3: 1684 . [9] B. Nikita,P. Balasubramanian, Lakshmi Yermal, “Impact of key macroeconomic variables of India and USA on movement of the Indian stock return in case of S&P CNX nifty” [10] Prashant Krishnamurthy, P. Balasubramanian, Deepti Mohan, “Study on relationship between exchange rate return and various stock indices returns”

945 946