Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

FIT5147 Data Exploration and Visualisation

Semester 1, 2022

FIT5147 Project Proposal and Data Exploration Project

Project Title: Explore the impact of stock tweets on the stock market

1.Introduction

Motivation

I am a person who likes to invest and often pay attention to the stock market, because there are many stock tweets on Twitter, I believe that these stock tweets may affect investors' investment  direction and investment decisions. Therefore, I want to know whether stock tweets affect stocks market.

Questions

Is there a correlation between a stock's tweet volume and stock price?

Is there a correlation between daily Twitter popularity and stock prices?

2.Data Wrangling

Gather

I have a dataset zip with a total of 8 datasets obtained from kaggle. Because my purpose is to analyze the impact of tweets on stock prices and the impact of daily tweets on daily stock prices.

Process and analyze the two datasets: prices_daily.csv and Raw_tweets_09_30.csv. Assessing The Data

I use python to look at the dataset for missing and invalid values and clean them, and use pandas functions to format the dates in the dataset.

Data Checking

 

These are big data sets, so I can clearly see some problems. I observe what variables I  have  in  my  data,  there  are  columns  of  id  and  bullish  about  tweets  in  the Raw_tweets_09_30.csv. Because I want to observe the number of tweets and stocks of stocks The relationship between prices, so I don't need the two columns id and bullish, I drop these columns. I'm not sure if every tweet has content, I choose to use is.null to check if my data is null value, shows that the bool of tweet_text is True, so there are null values in the tweet, I remove the data that is null in the tweet. The time of the tweet is every moment, I need to convert the time type to the time of the stock price Consistent.

I found that in the dataset, stocks do not open every day during this time period, because the stock market does not open on holidays and weekends, and there are no stock prices on some days. So I need to merge the date of the tweet and the date with the stock price , First I use python to convert the date format of tweets, create a column with a date with a stock price through an excel sheet, and create the number of tweets corresponding to the date with the stock price.

4. Data Exploration

Is there a correlation between a stock's tweet volume and stock price?

This is the correlation image of the DJIA index and the number of tweets. I chose to use a scatter plot to draw the graph. The advantage of the scatter plot is whether there is a quantitative correlation trend between variables, if there is a certain point or a few Points that deviate from most points, known as outliers, can be seen at a glance with a scatterplot. This allows further analysis of whether these outliers are likely to have a

large impact on the population in the modeling analysis.

 

I can look at the extremes of the chart data first. When the number of tweets is high, the price of DJIA is at a low point. When the number of tweets is between 10,000 and 20,000, this range has the most data points , the price of DJIA is erratic, there are highs and lows, so I can't simply judge the price of DJIA just by the amount of tweets, but here I can get a tweet when the number reaches a high point, the price of DJIA is low.

 

I add a variable VIX index to it, VIX is the index obtained by the weighted average of the implied volatility of index options. When the VIX is higher, it means that market participants expect the market volatility to be more intense and reflects their uneasy psychological  state;  on  the  contrary,  if the  VIX  is  lower,  it  reflects  the  market participants' expectation that the market volatility will tend to ease. , and therefore the VIX is also known as the investor panic indicator. It can be clearly seen that the VIX index and DJIA are positively correlated. The lower the DJIA, the lower the VIX index. Analyzing the stock market just by the volume of tweets won't work, or it's hard to tell if they're correlated.

Is there a correlation between daily Twitter popularity and stock prices?

 

Since I want to observe correlation between daily Twitter popularity and stock prices, I have time as abscissa and Count of tweets and DJIA as ordinate.

From August 13 to 14, 2019, there was a huge increase in the number of tweets, from  18,460 to 48,516, and the upward trend of DJIA was also obvious. But from August 2 to 5, 2019, the number of tweets did not change much, and the stock There is also an upward trend.

5. Conclusion

The result ofmy own graphs is that the number of tweets doesn't have a huge impact on the stock market.

Through this step-by-step cleaning of the data set, changing the time type to be consistent, and graphing my problem. The conclusion I have come to is that the amount of tweets may have an impact on stock prices. Because my current Insufficient ability to analyze the data in more detail. Every tweet related to the stock market must have negative and positive views. I should first compare the number of negative and positive views to see that day. The judgment of tweets on the stock market, and the two sides of tweet sentiment can better judge the stock market.

The stock market is a very complex thing. There are too many related factors that can affect its trend. It may be the amount of capital entering and leaving that day, whether there is good or bad news in the stock market, etc. I just go through The number of tweets to analyze the stock market is not a valid conclusion.

6. Reflection

I learned a lot in this project. I first thought of the data analysis project I most wanted to deal with. Through this idea, I went to the Internet to query the data set, and gradually processed and analyzed the data to get a result.

I still have a lot of things that I haven’t done well. For example, there are relevant codes for this project on kaggle, and many reports on the impact of tweet sentiment and quantity on the stock market can be found on Google. I have also watched their reports.

They use a lot ofknowledge and drawing skills that I don't have yet. They use regression equations and machine learning systems to judge the market sentiment, and then use the market sentiment to analyze the stock market price the next day. This is what I still do now If not, I still have a lot to learn, and I still have a long way to go in data analysis in the future.

7. Bibliography

DOMINIK GULACSY.    (2020)  . Twitter Investor Sentiment Analysis Dataset:

Stock      price      changes      and      twitter      data      analysis.      Retrieved      from

https://www.kaggle.com/datasets/dominikgulacsy/twitter-investor-sentiment-analysis-

dataset

esquisse      .(n).     Victor      Perrier.     Fanny      Meyer.      Retrieved      from

https://dreamrs.github.io/esquisse/index.html