Rohithzr / predict_stock_py

This is a submission for the "Predicting Stock Prices challenge" by @Sirajology on Youtube. [runner-up]

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

predict_stock_py

This is a submission for the "Predicting Stock Prices challenge" by @Sirajology on Youtube.

Overview

The python script "predict_stock.py" does the following:

  1. Asks the user for a stock quote from NASDAQ (e.j: AAPL, FB, GOOGL)
  2. Uses Tweepy to retrieve tweets about that stock.
  3. Uses TextBlob to determine if the majority of the tweets are positive using sentiment analisys.
  4. If the last is True, downloads the last year of prices for that stock, and trains a neural net with that data to predict the price for tomorrow.

The folder "demo" contains a test training 'Table 3' to the same network that is used to predict the price.

Dependencies

Usage

Install all the necesary dependencies. Then just run:

python predict_stock.py

It will ask you for a NASDAQ quote, e.j: AAPL, then if the sentiment is positive and the stock you entered exists it will start training the network and give you a result.

Credits

Credits to Siraj and to this blog post.

Disclaimer

Do not use this code to invest in the stock market, if you are interested in stocks start by reading "The Intelligent Investor" by Benjamin Graham.

About

This is a submission for the "Predicting Stock Prices challenge" by @Sirajology on Youtube. [runner-up]


Languages

Language:Python 100.0%