Skip to content

This project is not meant to be used as an investment tool.

Notifications You must be signed in to change notification settings

patrick-bedkowski/Stock-Prediction-ML

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stock Prediction App

This project is not meant to be used as an investment tool.

Project uses ML techniques to predict future values of stocks. In order to do this, it involves LSTM Network Architecture and data from Yahoo Finance API.


Table of Contents

  1. Project Requirements
  2. Run Application
  3. Popular stock ticker symbols
  4. Insights overview
  5. Example Plot

Project Requirements


The following software requires following modules to be installed. Please see requirements.txt, or install all modules using the command:

pip install -r requirements.txt

Run Application

To use the software, run the following command:

python main.py <stock-ticker-symbol>

Popular stock ticker symbols


Company Ticker Symbol
Microsoft Corporation MSFT
Intel Corporation INTC
Apple AAPL
General Motors GN
Alphabet (GOOGLE) GOOG
NVIDIA Corporation NVDA



Insights overview


This stock prediction app analyzes the previous changes in the company's stock value. The model is trained on data reaching deep into past 10 years.

Model surprisingly manages to predict the shape of future stock plot, but it does not apply to every company. There are several factors that influence the deceitfulness of this prediction app. One of them is the changing popularity of the company.
See for example TESLA, which is most definitely a successful business whose main founder (Elon Musk) is a very popular celebrity on the social media. His latest posts (tweets) can affect the stock price of "his" company.

Here is the validation of the predicted model for the period of 2020.01 - 2021.07. Black lines indicates the real past values, green are the predicted ones for that period.

tesla_example

It is clearly visible that the model doesn't include some important factor(s) that lead to the false predictions. The event that is probably shown on the plot might have been introduction of the new tesla car or some other technology related to car's autonomy. Of course there are many more reasons why this stock validation was false (e.g. company innovations).


On the other hand, there are companies that experience increase in some repeatable periods. E.g Apple as a big tech company releases new products mostly at the same time intervals (e.g. )

Models Release date
iPhone 12 series October 13, 2020
iPhone 11 series September 10, 2019
iPhone XS series September 12, 2018
iPhone 8 series September 12, 2017

It might be the reason why the predicted validation of the past year's data came out well enough.


tesla_example


Another common factor that leads this model to false predictions, is the lack of the ability to predict future demand. Without a doubt we can see that the covid-19 pandemic affected many sectors of technology industry. One of the effects of the pandemic was an increased demand on technology hardware that caused Global Chip Shortage of 2020-21. Companies whose profits are based on production of such technologies experienced increase of its stocks value.
Events like this might introduce some misstatements into the prediction model.


Example Plot

Image shows General Motors stocks predition 30 days into the future.

stock_GM_27_07_2021

About

This project is not meant to be used as an investment tool.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages