top of page
Search

# Predict The Stock Prices of IBM by Using A Multi-Layer RNN/GRU/LSTM model | Sequence Learning

Problem Statement

A recurrent neural network deals with sequence problems because their connections form a directed cycle. RNN is widely used for time series forecasting because of these characteristics. Many state of the art results have been achieved using RNN/GRU/LSTM. In this problem, we will try to predict the stock prices of IBM by using a multi-layer RNN/GRU model.

Dataset Description Dataset:

IBM_2006-01-01_to_2018-01-01.csv

The folder IBM_2006-01-01_to_2018-01-01.csv contains files of IBM stocks, labeled by their stock ticker name. Files have the following columns: Date - in format: yy-mm-dd Open - price of the stock at market open (this is NYSE data so all in USD) High - Highest price reached in the day Low Close - Lowest price reached in the day Volume - Number of shares traded Name - the stock's ticker name

.ipynb file 1

Question 1.1:

Build a four-layer model using RNN & GRU with the following architecture:

RNN - Units: 50 , activation = â€˜tanhâ€™

GRU - Units 50 , activation = â€˜tanhâ€™

Dropout after every layer of 0.2

Modelâ€™s Summary is given below:

Model: "sequential_5" _________________________________________________________________ Layer (type) Output Shape Param # ================================================================= simple_rnn_1 (SimpleRNN) (None, 60, 50) 2600 _________________________________________________________________ dropout_1 (Dropout) (None, 60, 50) 0 _________________________________________________________________ simple_rnn_2 (SimpleRNN) (None, 60, 50) 5050 _________________________________________________________________ dropout_2 (Dropout) (None, 60, 50) 0 _________________________________________________________________ gru_1 (GRU) (None, 60, 50) 15150 _________________________________________________________________ dropout_3 (Dropout) (None, 60, 50) 0 _________________________________________________________________ gru_2 (GRU) (None, 50) 15150 _________________________________________________________________ dropout_4 (Dropout) (None, 50) 0 _________________________________________________________________ dense_1 (Dense) (None, 1) 51 =================================================================

Total params: 38,001

Trainable params: 38,001

Non-trainable params: 0

Hint:

```add(SimpleRNN(50, return_sequences=True, input_shape=(X_train.shape[1],1),  activation='tanh'))

If you need any programming assignment help in Machine Learning programming, Machine Learning project or Machine Learning homework or need solution of above problem then we are ready to help you.

Send your request at realcode4you@gmail.com and get instant help with an affordable price.

We are always focus to delivered unique or without plagiarism code which is written by our highly educated professional which provide well structured code within your given time frame.

If you are looking other programming language help like C, C++, Java, Python, PHP, Asp.Net, NodeJs, ReactJs, etc. with the different types of databases like MySQL, MongoDB, SQL Server, Oracle, etc. then also contact us.