AI-kartheek / Apple-Stock-Price-Forecasting

Created a Deep Learning model using Keras Stacked LSTM that helps in forecasting the Apple Stock Price accurately.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Apple Stock Price Forecasting

Overview

Stacked LSTM in Keras API is used to train Apple Stock (Close) Data to analyse and forecast the future stocks in Apple company.

  • Model trained on Apple Stock Data that had been collected from Tiingo from Date 2016-07-28 till 2021-07-26 (or) download the same dataset used in this project.
  • Trained Model (saved models/Stacked LSTM for Apple Stocks.h5) takes previous 100 days stock (Close) data as input and can forecast on (Close) stock on specified N number of days.
  • Model trained on 717 records and tested on 340 records.
  • Model trained on 15 epochs with early stopping and model check point on decreasing validation loss, there by Trian_loss: 8.7085e-04 - Val_loss: 0.0366.

Installation

The Code is written in Python 3.8.5. If you don't have Python installed you can find it here. If you are using a lower version of Python you can upgrade using the pip package, ensuring you have the latest version of pip.

Activate virtual environment if created and to install the required packages and libraries, run this command in the project directory after cloning the repository:

pip install -r requirements.txt

All the Code Explanation of this Project had been explained here right from Data Collection till Forecasting.

Notebook Summary

  • Collect Stock Data
  • Load Data
  • Train Test Split
  • Data Sequencing
  • MinMax Scaling
  • Reshape into 3D data
  • Model Creation
  • Load Saved Model
  • Analyse RMSE
  • Plotting Results
  • Forecast on future 30 days

About

Created a Deep Learning model using Keras Stacked LSTM that helps in forecasting the Apple Stock Price accurately.


Languages

Language:Jupyter Notebook 100.0%