Skip to content

Scorpi35/Stock_Price_Prediction-LSTM

Repository files navigation

StockPrice with LSTM

Project Description

Predicting stock price demands lots of input features. Instead of determing every possible input feature, we can analyze the pattern in which stock price is moving and predict the price. Addressing this very problem, we decided to use LSTM (a type of RNN) to anayze the pattern in which stock is regulating and predict future stock prices. Conclusively,it's a time series prediction.

Dataset

Programming language and libraries

  • Language:- Python
  • Libraries:- sklearn, keras, numpy, matplot, pandas

Algorithm

  1. Data collection
  2. Data cleansing
  3. Training neural network with Sequential Model (LSTM)
  4. Prediction of stock prices up to the required date

Training Description

  • Model:- LSTM (Sequential), 4 LSTM layer, 4 Dropout layer, 1 Dense layer
  • Activation:- Sigmoid
  • Optimizer:- Adam
  • Epoch:- 150
  • Batch Size:- 32

Results

  • Accuracy (Cross-Validation):- 0.45
  • Accuaracy (Tes):- 0.40

Screenshots

User Input

alt text

Cross-Validation Visualization

alt text

Test Visualization

alt text

7 days Prediction

alt text

How to run the program?

Installing required dependencies

  • Run pip install -r requirements.txt

Running the program

  • Run python Prediction.py
  • Enter date upto which stock prices have to be predicted.

About

Stock Price Prediction Using LSTM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages