#Demonetization and Its Impact on the Indian Economy – Insights from Social Media Analytics

. In recent times, twitter has emerged as a central site where people express their views and opinions on happenings surrounding their lives. This paper tries to study the general public sentiment surrounding a major breakthrough event for the Indian economy i.e. demonetization by capturing 1,44,497 tweets about demonetization. The paper also tries to find the impact of demonetization on various sectors of the economy and whether there exists any correlation be-tween the public sentiments expressed over twitter and the stock market performance of Nifty 50 companies. The industries were classified into cash dependent and independent sectors and the impact on both were separately studied. It was found there exists no significant correlation between the sentiments expressed over twitter about demonetization and the performance of various sectors in the economy and twitter sentiments alone do not necessarily predict the performance of financial market.


Introduction
The advent and rapidly increasing popularity of social media has transformed various facets of our lives, be it business, politics, communication patterns around the globe, news consumption, communities, dating, parenting etc.As per latest data, nearly 50% (3.77 billion) of population uses internet while 37% (2.79 billion) use it actively which will continue to rise in near future [1].Unlike conventional media which permitted information transfer only in one direction, digital mediums allow two-way form of communication, ensures faster dissemination and retrieval of information and hence, increasingly attracting the attention of business and research community intrigued with their affordance and reach [2].Stock market movement and its prediction has always remained a key area of study, which is of great interest to stock investors, traders and applied researchers [3].According to behavioral economics hypothesis, there exists correlation between public mood and market performance [4].However, quantification of public mood is not an easy task.Before the internet era, dissemination of information regarding company's stock price, direction and general sentiments and consequently, market reaction took longer time.However, with internet and social media, getting information viral is just a click away.As such, short term sentiments play a significant role in short term performance of financial market instruments such as stocks, indexes and bonds [5].Twitter, with an active monthly user base of 319 million in 2016, is one such social media platform which is being frequently used to study public mood and sentiment and there exists considerable support for the claim that it provides valid measurement of the same [6][7].Interested users post their views in form of short 140 character messages, often leading to ad hoc establishment of shared or trending 'hashtags' which forms the basis of data extraction and analysis [8].
This research revolves around a recent event which is a major breakthrough for the Indian economy i.e. demonetization by analyzing 1,44,497 tweets centered on this topic collected over a period of two months following demonetization.Each tweet captured had 16 attributes which captured user specific and user generated content specific data, which was used for subsequent analysis.The objective of this paper are as follows: Firstly, to perform sentiment analysis on the tweets extracted and analyze public mood and sentiment.Secondly, analyze the movement of stock prices of Nifty 50 companies during the same period and find a correlation, if it exists, between public sentiment and stock prices.

Literature Review
The literature review has been organized into two subcategories beginning with the correlation of stock prices with public sentiments and use of twitter to gauge public sentiments.

Correlation of stock prices with public sentiments
There have been multiple studies in the past which investigate the correlation between public sentiments (as captured from web data) and financial markets.A study [9] observed twitter data for emotional outbursts over a period of 5 months and found that when people expressed negative sentiments such as fear, worry, less hope etc. stock market indicators such as Dow Jones, NASDAQ and S&P 500 went down the next day.
[10] also confirmed that there exists strong correlation between stock price movement and public sentiments as captured from twitter.Another research [11] studied the impact of investor sentiments on different economic sectors and found that certain sectors indexes like industry, banking, food and beverages saw more influence of investor sentiments in comparison to other sectors such as retail, telecom etc.In a recent study [12], the authors argued that the correlation between Twitter sentiment and Dow Jones Industrial Average (DJIA) index for the observed duration of 15 months is low.However, during certain 'events' which are marked by increased activity of twitter users such as quarterly announcements, macroeconomic policy announcement etc. there is significant correlation between the twitter sentiments and abnormal returns during the peaks of twitter volume.Thus, past studies confirm that web data have a bearing on stock prices.

Use of Twitter for gauging public sentiments
A study [13] argued that twitter is an effective way to gauge societal interest and general public's opinion.Sentiments expressed over Twitter are being studied in numerous context.Another research work [14] studied the relationship between electoral events and expressed public sentiment during 2012 US Presidential elections and founded that tweet volume is hugely driven by campaign events.In October 2011, NM Incite and Nielson study [15] proved the correlation between twitter volume and TV ratings.Twitter has also been used to understand consumers' attitude towards global brands and how it can be leveraged while designing companies' marketing and advertising strategy [16].
Hence, the prior research confirms that Twitter is a rich source of data for mining public opinion.Its open architecture and integration to API allows easy access to data making it relevant for study.

Proposition
In the light of the above discussion, we can effectively state that short term public sentiments act as determinants of performance of financial market and Twitter as a social media platform can be effectively used to capture such sentiments.In this paper, we have focused on a recent event which took the whole nation by surprise i.e. demonetization leading to 86% of the currency in circulation getting extinguished at a moment's notice [17].In a dramatic move to crackdown on unaccounted for and counterfeit cash, the Prime Minister of India announced the demonetization of Rs.500 and Rs.1000 currency notes with effect from November 8, 2016 making them invalid as legal tender.What followed the sudden announcement was acute cash crunch among citizens and businesses which resulted in a lot of social discussions.The move drew both positive as well as negative reaction with one group of people lauding the bold step to fight black money while the other group criticizing how ill-planned the move was.Social media platforms were set abuzz with people's reactions pouring in from across the nation with demonetization accounting for 6 out of 10 trending topics between November 8-24 [18].There are divided opinions on whether demonetization had an overall positive or negative impact.As per one school of thoughts, the economy witnessed a contraction in money supply, fall in public expenditure leading to corresponding fall in production and incomes.It caused short-term impact on various sectors of the economy-payment, real estate, retail, agriculture and related sectors, BFSI, consumption related sectors like consumer durables, FMCG etc., entertainment, coal industry and tourism [19,20,21].Unorganized sectors which accounts 45% of production, suffered an immediate impact with decline in both transactions and output.It had a spill-over effect on organized sectors which also saw an immediate impact, although less [22].In a contrast to this view, the World Bank CEO, pointed that demonetization will prove effective in the long term fostering a clean and digitized economy [23].
In view of these discussions, the current study focuses on the following questions:  What is the buzz over social media about demonetization? What are the general public sentiments surrounding demonetization? What is the impact on industries, if any, due to demonetization, captured by observing stock price fluctuations of Nifty 50 companies during the period? Whether the impact is restricted to companies that have heavy dependence on cash? Is there any correlation between the sentiments expressed in social media and industry performance as measured through stock price fluctuations?

Data Collection
The collection of twitter data (tweets and metadata) has been done from Twitter website using R programming language and the twitteR package.This allows us to capture 1% of publically available data on twitter [8].The keywords used were '#demonetization' and "#demonetisation'. 1, 44,497 tweets centered on these topic were collected from 12th November, 2016 to 12th January, 2017.Out of this, the total number of unique tweets was 45493.The collected data was cleansed or processed to be made ready for analysis.Figure 1 shows the process of data cleansing.

Fig. 1. Process of data cleansing
Figure 2 shows the tweet rate over an interval of 10 days.It can be seen that the maximum number of tweets were posted in the initial days of announcement of demonetization.The tweet rate follows a downward trend as the social media buzz starts to fade with the initial inconvenience situation settling in.In the same duration, the stock price data of Nifty 50 companies was collected from the National Stock Exchange (NSE).The Nifty 50 stock accounts for 14 sectors of the economy which include Cigarettes, Pharmaceuticals, Information Technology, Cements, Automobile, Financial Services, Metals, Energy, Telecom, Consumer Goods, Construction, Industrial Manufacturing, Media & Entertainment and Shipping [24].In our study, we have also captured stock price data of Real Estate sector by collecting data of 4 major players namely DLF, Oberoi Realty Ltd, Jaypee Infratech and Ansal Properties & Infrastructure Ltd.This has been done as real estate was touted to take the worst hit due to high involvement of black money and cash transactions, especially in case of resale and land transactions [25].

5
Research methodology and findings

Exploratory data analysis
As part of the exploratory analysis, we looked at the most frequent words among the tweets with the help of wordcloud.The larger the word in the wordcloud, the higher will be its usage frequency.Figure 3 shows the wordcloud generated from the collected tweets.The most frequently used words are 'narendramodi', 'Modi', 'PMOIndia'.'BlackMoney', 'India', 'Support', 'ArvindKejriwal', 'IAmwithModi' etc.A deeper look shows people's massive support to PM Narendra Modi's fight against black money.There are few negative sentiments as reflected in words like 'issue', 'failure', 'cash', 'pain', 'failed', 'old', 'died', 'queue' etc. mostly centered around the initial inconvenience caused due to cash crunch.Overall, the move successfully garnered public support.The other theme that emerges from the wordcloud is the focus on digital transactions as reflected in words like 'Paytm', 'card' , 'axisbank' , 'digitalIndia' which is rightly so as mobile wallet companies benefitted hugely from demonetization.Paytm, one of the largest players in mobile wallet space, saw its traffic increase by 435% and app download by 200% [26].

Sentiment analysis
Sentiment analysis or opinion mining has gained popularity as a more cost and time efficient and non-intrusive method of text analytics as compared to traditional market survey methods like surveys and opinion polls.For performing the sentiment analysis, Syuzhet package available in R has been used.The get_ncr_sentiment method which implements Saif Mohammad's NRC Emotion lexicon comprising of words and their associations with 8 emotions (anger, fear, anticipation, trust, surprise, sadness, joy, and disgust) and two sentiments (negative and positive) [27].Figure 4 shows the percentage of emotions in our tweet sample.As can be seen, trust has the highest percentage (22.15%)among all emotions followed by anticipation (15.94%) and anger (13.03%).Hence, overall trust of people on PM Modi and his efforts to fight corruption outweighs the negatives caused due to initial inconvenience.Figure 5 shows the variation in the scale of positive and negative tweets per day.This has been calculated by summing the positive/ negative valence as measured using NRC Emotion lexicon of all individual tweets grouped by date.As can be seen, the positive sentiments are higher than the negative sentiments on all days.Average sentiment for a day was calculated by averaging the valence (Positive valence + (Negative valence* -1)) of all tweets on that particular day.Majority tweets (90.16%) reflect positive sentiments.One can witness a downward trend in the number of positive tweets.This can also be attributed to the declining number of tweets as the post demonetization effects started to settle.

Correlation analysis between stock prices of Nifty 50 companies and twitter sentiments
In our study, we have focused on the correlation between stock accounts for 15 sectors of the economy (fourteen sectors being represented by Nifty 50 companies and real estate being the fifteenth).In order to calculate correlation between industry performances and twitter sentiments, we first normalized the values of stock prices of the companies within the sector and hence, taking the average of stock prices of the companies for a particular day.For calculating the normalized value, following formula has been used where z represents the normalized value of stock price, µ represents the mean of the stock prices of the companies and σ represents the standard deviation of the distribution.

z= (x-µ) / σ (1)
Table 1 explains how normalized values have been calculated.For a particular date, the stock prices of the companies listed under that particular sector (information technology in our case) were normalized and then averaged to find a single value for that sector for that particular day.This was done for all the sectors over our observed duration of two months.For calculating the correlation between the stock prices and sentiments, we have eliminated the days where stock market was closed (weekends and public holidays).The results of the Pearson correlation coefficient between the average sentiment of the day and normalized value of the stock prices for the industry are illustrated in table 2. It can be seen that there is no significant correlation between the sentiments expressed over twitter about demonetization and the performance of various sectors in the economy.

Inferences
Our initial assumption was that there will not be any significant correlation between the performances of stocks of companies belonging to sectors that have minimal or no dependence on cash.As can be seen from table 3, the assumption holds true for such cases.However, even for cases in which sectors have heavy dependence on cash transactions, no significant correlation is observed apart from cements which shows medium correlation.Figure 7 and 8 shows the percentage change in the average stock prices from previous day of the companies within cash dependent and cash independent sectors respectively, though the public sentiments did not really correlate with the changes.

Industrial manufacturing Metals
As can be observed, no clear trend is applicable across either cash dependent or cash independent sectors except for certain industries like real estate which showed steep decline in stock prices.Another interesting finding is that the fluctuations in stock price of cash independent sector is more than cash dependent sector.However, it is difficult to segregate whether the fluctuations are caused solely due to demonetization.There were other short term phenomenon which affected industry performance.Some sectors like pharmaceuticals saw an increase in stock prices as old currency was accepted by chemists till 15th December, leading to significant increase in short term sale in anticipation of more problem in future [28].Core sectors like cement, steel etc. which are not dependent on cash were negatively impacted as people deferred long term investments.Sectors like IT, FMCG etc. remained unaffected.[29] has argued that demonetization has not impacted overall market much as investors perceive the impact as temporary.Besides, there are other factors apart from demonetization such as US Presidential elections, rise is US bond yields etc. which have impacted the overall market performance.
Thus, our study shows that twitter sentiments alone do not necessarily determine the performance of financial market.There are other factors (economic, political, short term phenomenon impacting consumer behavior etc.) which need to be taken into account for determining the performance of stocks.

Limitations
The research in a novel approach in estimating the impact of twitter sentiments on the industrial performance post any major economic policy announcement.It assumes a direct relationship between the sentiments expressed over social media and stock prices which remains one if its limitations.Other factors which may have affected the stock prices have not been taken into account as it was not feasible to segregate the impact of all other factors.The study also suffers from self-selection bias as we have only considered the tweets with hashtags-'#demonetization' or '#demonetisation'.Contributors to the discussion who may not use similar words or hashtags would not be within the scope of the current analysis.Another limitation of the study is that user base of twitter may not necessarily comprise of industry experts of all sectors.However, despite these limitations, the research highlights intriguing relationship between public sentiments and performance of stock market post a macroeconomic phenomenon which may be taken forward in future research.

Fig. 2 .
Fig. 2. Tweet Rate over a period of 10 days

Table 1 .
Calculation of normalized value of stock prices for a sample industry for a given date

Table 2 .
Result of correlation analysis between twitter sentiments and average industry stock price