Skip to content

Using recurrent neural networks with LSTM cells to predict stock prices. Takes into account twitter trends.

Notifications You must be signed in to change notification settings

and-rewsmith/RNN_LSTM_Stock_Model

Repository files navigation

Recurrent Neural Network (LSTM) Stock Model

Description

This model uses stock data and twitter sentiment to generate a prediction of future market trends. It gathers sentiment from scraping the Twitter website. Unfortunately, one cannot use the Twitter API as tweets are only available in a window spanning back two weeks. This tool solves this problem.

General process is as follows:

  1. Get stock data from Quandl (day-to-day data)

  2. Get stock twitter sentiment for each day

  3. Join data

  4. Feed it into a Long-term Short-term (LSTM) Neural Network

  5. Graph past/future predictions

Directory Structure

Version1__base: Contains a basic implementation. No twitter sentiment analysis.

Version2__twitter_sentiment: Contains full functionality. Makes predictions with sentiment analysis included.

got/got3: Get Old Tweets. This repository can be found here.

img: Contains demo graphs.

misc: For implementations I might use later. For brainstorming.

model.py: The Recurrent Neural Network I am using to train and make predictions.

read_tickers.py: Python script to get all of the tickers in NASDAQ.

scratch.py: Playground script.

Performance Examples

Example_performance_7

Example_performance_8

Example_performance_3

Example performance 4

Example performance 5

Example performance 6

Example performance 2

Example performance 1

About

Using recurrent neural networks with LSTM cells to predict stock prices. Takes into account twitter trends.

Resources

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages