0% found this document useful (0 votes)
50 views1 page

Stock Price Prediction

The document discusses stock price prediction using machine learning by analyzing factors like market behavior and past stock prices. It describes loading training data from 2012-2016 containing daily stock metrics like open, close, high and low prices. The steps include normalizing the data, training an LSTM model to predict 2017 stock prices using previous days as input.

Uploaded by

Amanuel Desalegn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views1 page

Stock Price Prediction

The document discusses stock price prediction using machine learning by analyzing factors like market behavior and past stock prices. It describes loading training data from 2012-2016 containing daily stock metrics like open, close, high and low prices. The steps include normalizing the data, training an LSTM model to predict 2017 stock prices using previous days as input.

Uploaded by

Amanuel Desalegn
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

Stock Price Prediction

Stock Price Prediction using machine learning helps you discover the future value
of company stock and other financial assets traded on an exchange. The entire idea
of predicting stock prices is to gain significant profits. Predicting how the stock
market will perform is a hard task to do. There are other factors involved in the
prediction, such as physical and psychological factors, rational and irrational
behavior, and so on. All these factors combine to make share prices dynamic and
volatile. This makes it very difficult to predict stock prices with high accuracy
. Import the Libraries.
LoadLibraries

2. Load the Training Dataset.


The Google training data has information from 3 Jan 2012 to 30 Dec 2016. There are
five columns. The Open column tells the price at which a stock started trading when
the market opened on a particular day. The Close column refers to the price of an
individual stock when the stock exchange closed the market for the day. The High
column depicts the highest price at which a stock traded during a period. The Low
column tells the lowest price of the period. Volume is the total amount of trading
activity during a period of time.

LoadDataset

3. Use the Open Stock Price Column to Train Your Model.


OpenPrice

4. Normalizing the Dataset.


NormalizingData

. Creating X_train and y_train Data Structures.


TrainingData

ShapeOfData

6. Reshape the Data.


ReshapeData.

7. Building the Model by Importing the Crucial Libraries and Adding Different
Layers to LSTM.
DeepLearningLibraries

BuildingModel
. Fitting the Model.
FitModel.

9. Extracting the Actual Stock Prices of Jan-2017.


TestData

10. Preparing the Input for the Model.


ModelInput.

11. Predicting the Values for Jan 2017 Stock Prices.


PredictStocks

You might also like