Giter Club home page Giter Club logo

cryptocurrency-analysis-python's Introduction

Cryptocurrency Analysis

Table of Contents

Introduction

A cryptocurrency is a digital or virtual currency designed to work as a medium of exchange. It uses cryptography to secure and verify transactions as well as to control the creation of new units of a cryptocurrency. Essentially, cryptocurrencies are limited entries in a database that no one can change unless specific conditions are fulfilled.
Holding Bitcoin means to have a share in this venture. If Bitcoin ever replaces monetary reserves of central banks or becomes the dominant currency for international trades – just to name two examples — the value of one Bitcoin will be far beyond 10,000 Dollar. Buying and keeping cryptocurrencies is a bet on the success of this silent revolution of money. Its like a security of a large ecosystem.
This study was done for personal purpose to understand the investment opportunity in cryptocurrency, so its not a full-fledged study. Anyone is free to reuse the codes for their personal needs.

Studies

  • Time Series Forecasting with Recurrent Neural Network (RNN)
  • Sentiment Analysis of Tweets
  • Applying Turtle Trading Strategy

Time Series Forecasting with RNN

  • Recurrent Neural Network (RNN) - Recurrent Neural Network is an algorithm designed for sequential data. Because of their internal memory, RNN’s are able to remember important things about the input they received, which enables them to be very precise in predicting what’s coming next. That is why it is highly suited for sequential data like time series.
  • Long Short-Term Memory network (LSTM) - The Long Short-Term Memory network or LSTM network is a type of recurrent neural network used in deep learning because very large architectures can be successfully trained. It is trained using Backpropagation Through Time. We have used LSTM recurrent neural network to predicte the future prices of bitcoin.
    We used deeplearning Keras module of python for attaining this neural network.
    From this we can identify a trend on how the future price of bitcoin may look like and take a calculated investment decision.

Note -> Scripts are available in the notebook - Bitcoin Time Series Forecasting using RNN.ipynb


Sentiment Analysis of Tweets

Twitter is an online social network with over 330 million active monthly users as of February 2018. Twitter employs a message size restriction of 280 characters or less which forces the users to stay focused on the message they wish to disseminate. This very characteristic makes messages on twitter very good candidates for the Machine Learning (ML) task of sentiment analysis. Using sentiment analysis on tweets we will get a general view about the minds of people. More the people having a positive outlook towards cryptocurrency means people will invest more and it will not crash soon. This is specifically useful during bubble phases of the coin which happened in end of 2017. On side note -> When one sees that the general sentiment of people are more negative that’s when one should take out one's investment.

TwitterScraperDatewise.py

  • Helps in extracting Tweets according to the keyword ie., here mainly bitcoin, ethereum, ripple etc.
  • It gets all the top tweets on the particular topic for each day and saves it in a txt file format.
  • It uses selenium to surf through the net and scrape the tweets.

Cryptocurrency Sentiment Analysis.ipynb

It plots two plots:

  • Positive, Neutral, Negative and No. of tweets line plot
  • Polarity vs Closing Price

These plots help in understanding the sentiments better. We can also derive relationships between the market value and sentiment, and to a great extend it shows a similar trends.


Turtle Trading Strategy

It is a system developed by Richard Dennis and William Eckhardt in 1983 to help in trading stocks. It is a very old formula, and it may not be relevant in the case of cryptocurrency. Nevertheless, it will surely give an idea about insight on when to Buy and Sell cryptocurrency based on closing prices.

Bitcoin_Turtle_Strategy.ipynb

Here we plot two plots :

  • Close, Rolling Max and Rolling Min line chart
  • Close Price time series chart with Buy and Sell points mentioned

Note -> Some of the obtained graphs are available in 'Graphs' folder
Note -> Some sample data are available in 'Database' folder

Conclusion

From these studies we will get a brief idea on when to invest your money in cryptocurrency and when not to. Use the information wisely.
Quoting Warren Buffet "Never invest in something you don't understand". As simple as that. Read a lot on cryptocurrency, understand it and be your own judge.

cryptocurrency-analysis-python's People

Contributors

sanjoshaju avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.