Cryptocurrency Price Prediction Using Long Short Term Memory

  • Slides: 19
Download presentation
Cryptocurrency Price Prediction Using Long Short Term Memory Modeling and Social Media Sentiment O.

Cryptocurrency Price Prediction Using Long Short Term Memory Modeling and Social Media Sentiment O. P Akomolafe, Oluwafikayo Sanni Presenting: Oluwafikayo Sanni 3 rd Biennial Conference on TOKI (Transition From Observation To Knowledge To Intelligence) 15 th to 16 th August 2019 New Engineering Lecture Theatre, University of Lagos

Introduction • Cryptocurrencies are digital assets designed to work as mediums of exchange which

Introduction • Cryptocurrencies are digital assets designed to work as mediums of exchange which use cryptography to • Secure their transactions • Control the creation of additional units • Verify the transfer of assets. • Cryptocurrencies work using a decentralized/distributed ledger system called a blockchain

Introduction • There currently exists more than 1800 cryptocurrencies of which the most popular

Introduction • There currently exists more than 1800 cryptocurrencies of which the most popular three are • Bitcoin • Ripple • Ethereum • Each and every token has a value attached to it. This value is in terms of fiat currency and exchange rates for other tokens • A distributed global market exists where you can trade cryptocurrencies for fiat values assigned or other cryptocurrencies • This market is decentralized and spans multiple platforms. It exists in a state of constant change

Literature Review TOPIC AUTHOR & YEAR CONTRIBUTION LIMITATIONS Cryptocurrency Price Prediction Using News and

Literature Review TOPIC AUTHOR & YEAR CONTRIBUTION LIMITATIONS Cryptocurrency Price Prediction Using News and Social Media Sentiment Lamon, Nielsen & Redondo Used supervised learning algorithm for text-based sentiment analysis. Daily news and social media data were labeled with actual price changes one day in the future for each coin, rather than on positive or negative sentiment. Simple binary classifiers were built. Some of which had up to a 75. 8% accuracy predicting price increases. Colianni et al 2015 Reported up 90% accuracy in predicting price fluctuations using similar supervised learning algorithms on test data sets Data was labeled using an online text sentiment API. It could predict price increase or decreases but couldn’t tell by how much Laskowski, Kim, & Ieee 2016 This work found a direct correlations between the number of mentions on twitter and the price of bitcoin Limited scope to only bitcoin and dogecoin prices. It only found correlations between mentions of twitter and prices of bitcoin and dogecoin Classification Based Financial Markets Prediction using Deep Neural Networks Dixon, Klabjan, & Bang 2017 Properly describes how to apply DNNs to Algorithmic Trading Financial Time Series Data Cryptocurrency price prediction using news and social media sentiment Lamon etal 2015 Uses multiple models and tries to perform price prediction on cryptocurrencies using social media sentiment and historical prices. 2017 Algorithmic Trading of Cryptocurrency Based on Twitter Sentiment Analysis Rapid Prototyping of a Text Mining Application for Cryptocurrency Market Intelligence Some also had as low has 16. 1% accuracy prediciting price reductions “Sentiment” is evaluated as magnitude of price change rather than actual sentiment polarity of string.

Research Motivation Predicting cryptocurrency prices and market directions is not a new problem, however

Research Motivation Predicting cryptocurrency prices and market directions is not a new problem, however existing solutions in literature generally have 1. Wide margins of errors in prediction 2. Conservative loss functions and auto-regressive models, 3. A general inability to scale to predict prices and market directions for multiple tokens while keeping performance relatively stable. This work aims to provide an optimized solution that provides low margins of errors in predictions and scalable performance for multiple crypto-currencies

Our Approach Social Media Sentiment Extraction and Analysis Search Keyword with Date De-limiter Generate

Our Approach Social Media Sentiment Extraction and Analysis Search Keyword with Date De-limiter Generate Average Daily Sentiment Twitter API Regular Expression Filtering and Data Cleaning Sentiment Polarity Detection with Text. Blob Daily Time Series Tweets Time Series Daily Sentiment Data

Our Approach Model Flow

Our Approach Model Flow

Our Approach ~Data Collected: Social Media sentiment Data and Historical price data were collected

Our Approach ~Data Collected: Social Media sentiment Data and Historical price data were collected for 3 tokens, Bitcoin, Ethereum & Ripple 311, 810 tweets over a period of 1280 days between June 15 2015 and December 15 2018. This included 128, 000 tweets for bitcoin, 77, 084 tweets for ethereum and 106, 726 tweets for ripple Prediction features from our Data include Date, Open, High, Low, Close, Volume, Market. Cap, Daily Sentiment and Tweet Num

Our Approach ~ Training Hyperparameters: We used a linear activation function, a dropout of

Our Approach ~ Training Hyperparameters: We used a linear activation function, a dropout of 0. 25 and an adam optimizer, 40 neurons are used and our choice of loss function was the mean square error ~ Training the LSTM was carried over 25 randomizations, each randomization reduced the loss function over 50 epochs. We used random seeds between 775 & 800. Weights were initialized with the simple weight guessing algorithm for each randomization

Our Approach ~ Penalizing Conservative Models We automatically excluded all randomizations of the models

Our Approach ~ Penalizing Conservative Models We automatically excluded all randomizations of the models whose loss function (MSE) could not be reduced below 0. 05. This was an arbitrary number chosen by the us ~ Averaging the Target Function After training the 25 random initializations of the LSTM and weeding out the models with loss functions that fell above our arbitrary threshold. Our we averaged the loss functions obtained from all the initializations to get our target function, we used on our test set.

Result Summary TOKEN 1% ACC 2% ACC 5% ACC 10% ACC 20% ACC 30%

Result Summary TOKEN 1% ACC 2% ACC 5% ACC 10% ACC 20% ACC 30% ACC INC MOE DEC MOE INC ACC DEC ACC Bitcoin (BTC) 15. 94% 33. 75% 65. 94% 87. 81% 98. 12% 99. 69% 3. 72% 6. 04% 26. 56% 26. 25% Ripple (XRP) 9. 68% 20. 63% 54. 06% 85. 63% 97. 19 99. 69% 5. 72% 5. 71% 18. 44% 27. 19% Ethereum (ETH) 18. 4% 33. 44% 69. 69% 88. 75% 99. 06% 100% 4. 44% 4. 78% 18. 44% 28. 75%

Result Comparison The Table Below Shows Optimal Results in Previous Works Token INC ACC

Result Comparison The Table Below Shows Optimal Results in Previous Works Token INC ACC DEC ACC INC MOE DEC MOE Model Bitcoin (BTC) 43. 19% 61. 9% 42. 24% 65. 24% Logistic Regression Ethereum (ETH) 75. 8% 16. 1% 48. 23% 9. 74% Bernoulli Naive Baye’s

Result Comparison, Bitcoin Accuracy

Result Comparison, Bitcoin Accuracy

Result Comparison, Ethereum Accuracy

Result Comparison, Ethereum Accuracy

Result Comparison, Bitcoin Prediction; Margin of Error

Result Comparison, Bitcoin Prediction; Margin of Error

Result Comparison, Ethereum Prediction; Margin of Error

Result Comparison, Ethereum Prediction; Margin of Error

Conclusion In predicting absolute number of price reductions and increments, our model performed very

Conclusion In predicting absolute number of price reductions and increments, our model performed very poorly when compared the best of the existing models. Our Model however possess a comparative advantage of having a higher accuracy when it comes to predicting the margins of these fluctuations. Our model also has a relatively uniform performance for all three tokens. Meaning its behaviour could be scalable for predicting other tokens with proper training

References • Dixon, M. , Klabjan, D. , & Bang, J. H. (2017). Classification-based

References • Dixon, M. , Klabjan, D. , & Bang, J. H. (2017). Classification-based financial markets prediction using deep neural networks. Algorithmic Finance, 6(3– 4), 67– 77. https: //doi. org/10. 3233/AF-170176 • Jiang, Z. , & Liang, J. (2016). Cryptocurrency Portfolio Management with Deep Reinforcement Learning. ar. Xiv. Retrieved from http: //arxiv. org/abs/1612. 01277 • Kaastra, I. , & Boyd, M. (1996). Designing a neural network forecasting financial and economic time series. Neurocomputing, 10(3), 215– 236. https: //doi. org/10. 1016/0925 -2312(95)00039 -9 • Laskowski, M. , Kim, H. M. , & Ieee. (2016). Rapid Prototyping of a Text Mining Application for Cryptocurrency Market Intelligence. Proceedings of 2016 Ieee 17 th International Conference on Information Reuse and Integration (Ieee Iri), 448– 453. https: //doi. org/10. 1109/iri. 2016. 66

References • Xing, F. Z. , Cambria, E. , & Welsch, R. E. (2017).

References • Xing, F. Z. , Cambria, E. , & Welsch, R. E. (2017). Natural language based financial forecasting: a survey. Artificial Intelligence Review, pp. 1– 25. https: //doi. org/10. 1007/s 10462 -017 -9588 -9 • Evita Stenqvtst, Jacob Lnn Predicting Bitcoin price fluctuation with Twitter sentiment analysis • Kareem Hegazy and Samuel Mumford. Comparitive Automated Bitcoin Trading Strategies. CS 229 Project, 2016 http: //www. divaportal. org/smash/get/diva 2: 1110776/FULLTEXT 01. pdf • Dixon, Klabjan, & Bang. Classification Based Financial Markets Prediction using Deep Neural Networks. https: //papers. ssrn. com/sol 3/papers. cfm? abstract_id=2756331&rec=1&srcabs=2755473 &alg=1&pos=8 • Lamon, Nielsen & Redondo, Cryptocurrency Price Prediction Using News and Social Media Sentiment (2015) http: //cs 229. stanford. edu/proj 2017/final-reports/5237280. pdf