!pip install jovian --upgrade --quiet
 

Predicting Stock price using PyTorch neural network

Introduction

  • The act of trying to predict the future value of the stock based on the available time series data. The data points are publicly available from NSE platform.

  • We will take each day closing hours data called as OHLC(Open, High, Low and Close) value of the any given stock and predict values for the future date.

  • We will be picking up the LSTM Recurrent Neural system to accommodate this assignment. Shortly called as RNN is best suited for time series problem predictions such as predicting stock.

Architecture

  • Long Short Term Memory networks – usually just called “LSTMs” – are a special kind of RNN, capable of learning long-term dependencies. They were introduced by Hochreiter & Schmidhuber (1997), and were refined and popularized by many people in following work.1 They work tremendously well on a large variety of problems, and are now widely used. #1

  • 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. #1

LSTM Chain

Datasets

We will be using publicly available datasets of National Stock Exchange (NSE) from Kaggle to train / validate / predict the stock price.

Datasets from Kaggle can be downloaded using the opendatsets