Blockchain technology and cryptocurrency have gained popularity through social media platforms such as Reddit. This project explores if a correlation exists between discussions on Reddit's r/Ripple sub-reddit and XRP price during the time period July 30th, 2018 and February 1, 2019. The project seeks to answer the following questions:
- Do the number of sub-reddit posts correlate with future price change?
- Does post sentiment have any correlation with future price change?
- Are particular words more prevalent prior to future price change?
Data is scraped from the r/Ripple sub-reddit using Selenium in Python. Only daily discussion threads with the title format "Daily Ripple/XRP Discussion Thread ##/##/## [Questions and Price Predictions]" are scraped. All post text and responses are harvested including author name and date-time stamp. Historical XRP price data are gathered from coinmarketcap.com.
Exploratory data analysis revealed some similar trending between the number of sub-reddit posts and price. A specific example is illustrated during September 2018. On September 17th, the number of sub-reddit posts increased dramatically after a rumor stating that Ripple's new product, xRapid, may be going live shortly. This is followed by a major price change on September 19th.
To explore this relationship further, daily price change in percent is plotted against previous day's number of Reddit posts and average daily sentiment of posts. Sentiment analysis is performed using NLTK and TextBlob packages in Python. A correlation matrix is constructed and associated Pearson correlation values are calculated.
A similar procedure is conducted for weekly price change and previous week's number of posts and average weekly sentiment.
With a Pearson Correlation of .16, daily price change has a weak positive correlation with the prior day's number of posts. The result is statistically significant with a p-value of .03. Sentiment polarity and subjectivity has weakly negative Pearson correlations but are not statistically significant enough to reject the null hypothesis (i.e. no correlation exists between feature and price change). The most commonly used words the day prior to a daily price gain and price loss are shown in the word clouds below. The most frequent words used in both scenarios are similar (i.e. awesome, time, buy and XRP).
Pearson correlation values for prior week's number of posts, average sentiment polarity and subjectivity are -.18, -.32, and .19 respectively. However none of the correlations are statistically significant. The most commonly used words the week prior to a weekly price gain and price loss are shown in the word clouds below. The most frequent words used in both scenarios are similar (i.e. month, around, XRP and Bitcoin).
Future work may include looking at the relationship between distinct user posts and price change. A deeper dive into the next most used words prior to positive and negative price change are worth attention. The data is temporal and may project underlying trends in time instead of true correlation between variables. Further exploration into removing these trends will be investigated.