SlideShare a Scribd company logo
Stock Price Prediction
INTRODUCTION
● A stock market is a public market for
the trading of company stock.
● Stock market allows us to buy and sell
units of stocks (ownership) of a
company.
● If the company’s profits go up,then we
own some of the profits and if they go
down, then we lose profits with them.
● If more sellers than buyers, stock
prices tend to fall. Conversely, when
more buyers than sellers, stock prices
tend to rise
INTRODUCTION
ProfitLoss
Red is purchased stock
Green is sold stock
HOW TO READ A STOCK TABLE?
Date- day on
which the stock
is traded
High- high is the
highest price at which
a stock traded during
the course of the day
Close- refers to the
last price at which a
stock trades during a
regular trading session
Open- price of the
first trade for any
listed stock is its
daily opening price.
Low- lowest price at
which a stock trades
over the course of a
trading day.
Volume- the number
of shares or contracts
traded in a security or
an entire market during
a given period of time
● To accurately predict the
future closing value of a given
stock across a given period of
time in the future.
● Use different machine
learning and deep learning
models available and
compare them in terms of
graphical analysis.
5
PROBLEM STATEMENT
Actual Close
Predicted Close
Today’s
Close price
Predicted
Close price
of Next day
The data used in this project is of the Alphabet Inc3
from January 1, 2005 to July
30, 2017, this is a series of data points indexed in time order or a time series. Our
goal was to predict the closing price for any given date after training
6
DATASET
● Process of selecting a subset of relevant features for use in model construction.
● Feature selection methods include and exclude attributes present in the data without
changing them.
● Here, in our case ‘Date’,‘High’ and ‘Low’ attributes are dropped.
7
FEATURE IMPORTANCE
Dropped
● Process of selecting a subset of relevant features for use in model construction.
● Feature selection methods include and exclude attributes present in the data without
changing them.
● Here, in our case ‘Date’,‘High’ and ‘Low’ attributes are dropped.
8
FEATURE IMPORTANCE
Denormalized Dataset
9
Normalized Dataset
10
SO, WHAT ARE THE DIFFERENT MODELS
AVAILABLE?
APPROACHES TO SOLVE
● Linear Regression
● Recurrent Neural Network + LSTM
11
LINEAR REGRESSION
● Linear regression is an
approach for predictive
modeling to showcase the
relationship between a scalar
dependent variable ‘Y’, (in
our case, we have ‘Close’
attribute) and one or more
independent variables ‘X’
(‘Trading day’ attribute).
12
Close
trading days
Now, you can predict Closing
price along this line
LINEAR REGRESSION
13
Weights Bias
Predicted
Close Vector
Day
Vector
Initially, we will take some random weights and bias to initialize.
This equation
represents this line
LINEAR REGRESSION
14
● Initially, we have some
random weight and bias, so
it will look like this.
● Next step, calculate the
error.
LINEAR REGRESSION
15
● Initially, we have some
random weight and bias, so
it will look like this.
● Next step, calculate the
error.
Mean Squared Error
LINEAR REGRESSION
LINEAR REGRESSION
17
Mean Squared Error
● we keep on repeating this
process till we achieve the
minimum error.
Weight = Weight - (n x Error )
Bias = Bias - (n x Error )
LINEAR REGRESSION
RECURRENT NEURAL NETWORK
Information related to
previous predicted
Closing price
Today’s opening
price
Current state
hidden layer
output
Predicted
Closing price
Current state
Hidden layer
output
RECURRENT NEURAL NETWORK
So, it does not allow it to learn from past data as was expected.
Vanishing Gradient Problem
Less effect on the current calculation of weight
Day1
Prediction
Day2
Prediction
Day3
Prediction
Day4
Prediction
Day5
Prediction
Day6
Prediction
Day7
Prediction
RECURRENT NEURAL NETWORK + LSTM
LSTM (Long Short Term Memory)
LSTMs are explicitly designed to
avoid the long-term dependency
problem. Remembering
information for long periods of
time is practically their default
behavior, not something they
struggle to learn! Recurrent Neural Network
LSTM
RECURRENT NEURAL NETWORK + LSTM
LSTM (How it works?)
● The key to LSTM is the Memory cell
state which stores the information. It runs
straight down the entire chain.
● LSTM has the ability to remove or add
information to these cell state, regulated
by structures called gates.
● Gates are composed of sigmoid neural
net layer and a multiplication operation.
● Sigmoid layer outputs zero or one.
Sigmoid
layer
Multiplication
operation
RECURRENT NEURAL NETWORK + LSTM
LSTM (How it works?)
● There are three gates to protect and
control the cell states.
○ forget gate
○ input gate
○ output gate
forget gate
Input gate Output gate
RECURRENT NEURAL NETWORK + LSTM
LSTM (How it works?)
● First, forget gate looks at ht-1
and xt
and
outputs a number between 0 and 1.
● 1 represents “keep the information” and 0
represents “remove the information”.
Current closing
Price
Past information
of this state
RECURRENT NEURAL NETWORK + LSTM
LSTM (How it works?)
● First, forget gate looks at ht-1
and xt
and
outputs a number between 0 and 1.
● 1 represents “keep the information” and 0
represents “remove the information”.
● Second, input gate decides which values
will be updated, in order to do that a tanh
layer creates a vector of Ct
(bar).
● Combining these two, create an update to
the state.
required for
updating the
weight
RECURRENT NEURAL NETWORK + LSTM
LSTM (How it works?)
● First, forget gate looks at ht-1
and xt
and
outputs a number between 0 and 1.
● 1 represents “keep the information” and 0
represents “remove the information”.
● Second, input gate decides which values
will be updated, in order to do that a tanh
layer creates a vector of Ct
(bar).
● Combining these two, create an update to
the state.
● Third, It’s time to update the old cell Ct-1
to
Ct.
New Cell
state
RECURRENT NEURAL NETWORK + LSTM
LSTM (How it works?)
● First, forget gate looks at ht-1
and xt
and
outputs a number between 0 and 1.
● 1 represents “keep the information” and 0
represents “remove the information”.
● Second, input gate decides which values
will be updated, in order to do that a tanh
layer creates a vector of Ct
(bar).
● Combining these two, create an update to
the state.
● Third, It’s time to update the old cell Ct-1
to
Ct.
● Fourth, output will based on our cell
state.
● a sigmoid layer will decides what parts of
the cell state we’re going to output.
Output
Layer
Current
hidden layer
information
RECURRENT NEURAL NETWORK + LSTM
CONCLUSION
Linear Regression
Recurrent Neural Network + LSTM
● Model does not fit properly
● Model fits properly
Stock price prediction is a complex problem and difficult
to predict.
Machine learning model doesn’t perform well as
compared to Deep Learning model.
30
THANK YOU!

More Related Content

PPTX
Final PPT.pptx
PPTX
Stock Market Prediction
PPTX
Stock Market Prediction
PPTX
Stock Price Prediction PPT
PPTX
Machine learning: Stock Price Prediction
PPTX
Stock Market Prediction using Machine Learning
PPTX
Stock market prediction technique:
DOCX
Stock Market Analysis and Prediction
Final PPT.pptx
Stock Market Prediction
Stock Market Prediction
Stock Price Prediction PPT
Machine learning: Stock Price Prediction
Stock Market Prediction using Machine Learning
Stock market prediction technique:
Stock Market Analysis and Prediction

What's hot (20)

PDF
IRJET- Future Stock Price Prediction using LSTM Machine Learning Algorithm
PPTX
Stock Price Prediction
PPT
STOCK MARKET PRREDICTION WITH FEATURE EXTRACTION USING NEURAL NETWORK TEHNIQUE
PDF
Stock Market Prediction.pptx
PDF
Stock Market Price Prediction Using Technical Analysis
PDF
IRJET- Stock Market Prediction using Machine Learning
PDF
STOCK MARKET PREDICTION USING MACHINE LEARNING METHODS
PPT
STOCK MARKET PREDICTION
PPTX
Stock market prediction using data mining
PDF
Deep Learning for Stock Prediction
PDF
Stock Price Trend Forecasting using Supervised Learning
PPTX
Presentation1
PPT
STOCK MARKET PREDICTION
PPTX
Machine learning prediction of stock markets
PPTX
stock market prediction
PDF
Stock Market Analysis
PPTX
Financial forecastings using neural networks ppt
PDF
Google Stock Price Forecasting
PPTX
Currency recognition system using image processing
DOC
Aditya report finaL
IRJET- Future Stock Price Prediction using LSTM Machine Learning Algorithm
Stock Price Prediction
STOCK MARKET PRREDICTION WITH FEATURE EXTRACTION USING NEURAL NETWORK TEHNIQUE
Stock Market Prediction.pptx
Stock Market Price Prediction Using Technical Analysis
IRJET- Stock Market Prediction using Machine Learning
STOCK MARKET PREDICTION USING MACHINE LEARNING METHODS
STOCK MARKET PREDICTION
Stock market prediction using data mining
Deep Learning for Stock Prediction
Stock Price Trend Forecasting using Supervised Learning
Presentation1
STOCK MARKET PREDICTION
Machine learning prediction of stock markets
stock market prediction
Stock Market Analysis
Financial forecastings using neural networks ppt
Google Stock Price Forecasting
Currency recognition system using image processing
Aditya report finaL
Ad

Similar to Stock price prediction using Neural Net (20)

PDF
Predicting Stock Price Movements with Low Power Consumption LSTM
PDF
The Validity of CNN to Time-Series Forecasting Problem
PDF
Icbai 2018 ver_1
PPTX
MPS PPT_1 For Long Short Term Memory For Stock Price Prediction
PDF
STOCK MARKET PREDICTION USING NEURAL NETWORKS
PDF
IRJET- Stock Price Prediction using Long Short Term Memory
PDF
IRJET- Stock Market Cost Forecasting by Recurrent Neural Network on Long Shor...
PDF
IRJET- Data Visualization and Stock Market and Prediction
PPTX
stock price prediction using machine learning
PPTX
Mini Project With Seminar In LSTM For Stock Price Prediction
PDF
Stock Market Prediction Using Deep Learning
PDF
Stock price prediction using stock eod of day price
PPTX
Application_of_Deep_Learning_Techniques.pptx
PPTX
Stock Price Prediction.pptxshsjjejejejejejej
PDF
2025-TFG1_RNeuronalesRecurrentes-y-Aplicaciones
PDF
Stock Market Prediction using Machine Learning
PPTX
Seminar.pptx
PDF
Rachit Mishra_stock prediction_report
PDF
AlgoB – Cryptocurrency price prediction system using LSTM
PPTX
Deep Learning Module 2A Training MLP.pptx
Predicting Stock Price Movements with Low Power Consumption LSTM
The Validity of CNN to Time-Series Forecasting Problem
Icbai 2018 ver_1
MPS PPT_1 For Long Short Term Memory For Stock Price Prediction
STOCK MARKET PREDICTION USING NEURAL NETWORKS
IRJET- Stock Price Prediction using Long Short Term Memory
IRJET- Stock Market Cost Forecasting by Recurrent Neural Network on Long Shor...
IRJET- Data Visualization and Stock Market and Prediction
stock price prediction using machine learning
Mini Project With Seminar In LSTM For Stock Price Prediction
Stock Market Prediction Using Deep Learning
Stock price prediction using stock eod of day price
Application_of_Deep_Learning_Techniques.pptx
Stock Price Prediction.pptxshsjjejejejejejej
2025-TFG1_RNeuronalesRecurrentes-y-Aplicaciones
Stock Market Prediction using Machine Learning
Seminar.pptx
Rachit Mishra_stock prediction_report
AlgoB – Cryptocurrency price prediction system using LSTM
Deep Learning Module 2A Training MLP.pptx
Ad

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Electronic commerce courselecture one. Pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PPT
Teaching material agriculture food technology
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation_ Review paper, used for researhc scholars
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
MYSQL Presentation for SQL database connectivity
Electronic commerce courselecture one. Pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Empathic Computing: Creating Shared Understanding
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Understanding_Digital_Forensics_Presentation.pptx
Teaching material agriculture food technology
sap open course for s4hana steps from ECC to s4
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Review of recent advances in non-invasive hemoglobin estimation
Chapter 3 Spatial Domain Image Processing.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing

Stock price prediction using Neural Net

  • 2. INTRODUCTION ● A stock market is a public market for the trading of company stock. ● Stock market allows us to buy and sell units of stocks (ownership) of a company. ● If the company’s profits go up,then we own some of the profits and if they go down, then we lose profits with them. ● If more sellers than buyers, stock prices tend to fall. Conversely, when more buyers than sellers, stock prices tend to rise
  • 3. INTRODUCTION ProfitLoss Red is purchased stock Green is sold stock
  • 4. HOW TO READ A STOCK TABLE? Date- day on which the stock is traded High- high is the highest price at which a stock traded during the course of the day Close- refers to the last price at which a stock trades during a regular trading session Open- price of the first trade for any listed stock is its daily opening price. Low- lowest price at which a stock trades over the course of a trading day. Volume- the number of shares or contracts traded in a security or an entire market during a given period of time
  • 5. ● To accurately predict the future closing value of a given stock across a given period of time in the future. ● Use different machine learning and deep learning models available and compare them in terms of graphical analysis. 5 PROBLEM STATEMENT Actual Close Predicted Close Today’s Close price Predicted Close price of Next day
  • 6. The data used in this project is of the Alphabet Inc3 from January 1, 2005 to July 30, 2017, this is a series of data points indexed in time order or a time series. Our goal was to predict the closing price for any given date after training 6 DATASET
  • 7. ● Process of selecting a subset of relevant features for use in model construction. ● Feature selection methods include and exclude attributes present in the data without changing them. ● Here, in our case ‘Date’,‘High’ and ‘Low’ attributes are dropped. 7 FEATURE IMPORTANCE Dropped
  • 8. ● Process of selecting a subset of relevant features for use in model construction. ● Feature selection methods include and exclude attributes present in the data without changing them. ● Here, in our case ‘Date’,‘High’ and ‘Low’ attributes are dropped. 8 FEATURE IMPORTANCE
  • 10. 10 SO, WHAT ARE THE DIFFERENT MODELS AVAILABLE?
  • 11. APPROACHES TO SOLVE ● Linear Regression ● Recurrent Neural Network + LSTM 11
  • 12. LINEAR REGRESSION ● Linear regression is an approach for predictive modeling to showcase the relationship between a scalar dependent variable ‘Y’, (in our case, we have ‘Close’ attribute) and one or more independent variables ‘X’ (‘Trading day’ attribute). 12 Close trading days Now, you can predict Closing price along this line
  • 13. LINEAR REGRESSION 13 Weights Bias Predicted Close Vector Day Vector Initially, we will take some random weights and bias to initialize. This equation represents this line
  • 14. LINEAR REGRESSION 14 ● Initially, we have some random weight and bias, so it will look like this. ● Next step, calculate the error.
  • 15. LINEAR REGRESSION 15 ● Initially, we have some random weight and bias, so it will look like this. ● Next step, calculate the error. Mean Squared Error
  • 17. LINEAR REGRESSION 17 Mean Squared Error ● we keep on repeating this process till we achieve the minimum error. Weight = Weight - (n x Error ) Bias = Bias - (n x Error )
  • 19. RECURRENT NEURAL NETWORK Information related to previous predicted Closing price Today’s opening price Current state hidden layer output Predicted Closing price Current state Hidden layer output
  • 20. RECURRENT NEURAL NETWORK So, it does not allow it to learn from past data as was expected. Vanishing Gradient Problem Less effect on the current calculation of weight Day1 Prediction Day2 Prediction Day3 Prediction Day4 Prediction Day5 Prediction Day6 Prediction Day7 Prediction
  • 21. RECURRENT NEURAL NETWORK + LSTM LSTM (Long Short Term Memory) LSTMs are explicitly designed to avoid the long-term dependency problem. Remembering information for long periods of time is practically their default behavior, not something they struggle to learn! Recurrent Neural Network LSTM
  • 22. RECURRENT NEURAL NETWORK + LSTM LSTM (How it works?) ● The key to LSTM is the Memory cell state which stores the information. It runs straight down the entire chain. ● LSTM has the ability to remove or add information to these cell state, regulated by structures called gates. ● Gates are composed of sigmoid neural net layer and a multiplication operation. ● Sigmoid layer outputs zero or one. Sigmoid layer Multiplication operation
  • 23. RECURRENT NEURAL NETWORK + LSTM LSTM (How it works?) ● There are three gates to protect and control the cell states. ○ forget gate ○ input gate ○ output gate forget gate Input gate Output gate
  • 24. RECURRENT NEURAL NETWORK + LSTM LSTM (How it works?) ● First, forget gate looks at ht-1 and xt and outputs a number between 0 and 1. ● 1 represents “keep the information” and 0 represents “remove the information”. Current closing Price Past information of this state
  • 25. RECURRENT NEURAL NETWORK + LSTM LSTM (How it works?) ● First, forget gate looks at ht-1 and xt and outputs a number between 0 and 1. ● 1 represents “keep the information” and 0 represents “remove the information”. ● Second, input gate decides which values will be updated, in order to do that a tanh layer creates a vector of Ct (bar). ● Combining these two, create an update to the state. required for updating the weight
  • 26. RECURRENT NEURAL NETWORK + LSTM LSTM (How it works?) ● First, forget gate looks at ht-1 and xt and outputs a number between 0 and 1. ● 1 represents “keep the information” and 0 represents “remove the information”. ● Second, input gate decides which values will be updated, in order to do that a tanh layer creates a vector of Ct (bar). ● Combining these two, create an update to the state. ● Third, It’s time to update the old cell Ct-1 to Ct. New Cell state
  • 27. RECURRENT NEURAL NETWORK + LSTM LSTM (How it works?) ● First, forget gate looks at ht-1 and xt and outputs a number between 0 and 1. ● 1 represents “keep the information” and 0 represents “remove the information”. ● Second, input gate decides which values will be updated, in order to do that a tanh layer creates a vector of Ct (bar). ● Combining these two, create an update to the state. ● Third, It’s time to update the old cell Ct-1 to Ct. ● Fourth, output will based on our cell state. ● a sigmoid layer will decides what parts of the cell state we’re going to output. Output Layer Current hidden layer information
  • 29. CONCLUSION Linear Regression Recurrent Neural Network + LSTM ● Model does not fit properly ● Model fits properly Stock price prediction is a complex problem and difficult to predict. Machine learning model doesn’t perform well as compared to Deep Learning model.