AATCUOP is a 4th year college project that is an attempt to create an automated system for cryptocurrency trading, utilizing sentiment analysis of Twitter to build a predictive model. It also has the capabilities to trade on stocks.
- Clone the repository:
$ git clone https://github.com/phelantomas/SentimentTrader.git
- Install iexfinance to trade stocks.
$ git clone https://github.com/addisonlynch/iexfinance.git
$ cd iexfinance
$ python setup.py install
$ cd ..
- Go into the main project
$ cd CollegeProject
- Requires PyQt4, to install for Linux:
$ sudo apt-get install python-qt4
.
For mac:$ brew install cartr/qt4/pyqt
. - Install requirements from the requirements.txt file:
$ sudo pip install -r requirements.txt
.
4.1. For Mac, afterwards:$ easy_install pandas
- Download the NLTK corpora for Linux and Mac:
$ python
>>> import nltk
>>> nltk.download
Then follow the prompts to finish installing.
>>> quit()
For Mac, simply follow the steps here if the above doesn't work. - Setup up tweepy: You will need a twitter account and developer keys in order to make use of the twitter API. Follow the setup here. Once the keys are got, update the keys in the tweepy_config.py file.
- Select a cryptocurrency to predict. Once the applications requirements are installed, you will need to configure the application with your desired cryptocurrency. By default it chooses Bitcoin. If you want to change this you will need to edit the sentiment_config.py file.
- Run:
$ python main.py
By default it works with bitcoin, however, this can be easily changed with a slight modification to the sentiment_config.py file.
To change cryptocurrency, simply replace the details of this file with that of your desired cryptocurrency, for example, litecoin:
To swap to stocks, change type to STOCK, and the rest to the desired stock, for example, Bank of America:
Once done, just run the main.py file, and it will now be running for your selected option.
You can download pre-made data sets for Bitcoin, Litecoin, and Ethereum here. Once downloaded, place into the Features folder.
[1] Website with links to all documentation here.