Git Product home page Git Product logo

time-series-forecasting-with-ml-rnn-lstm's Introduction

Stock Market Analysis: Time Series Forecasting with ML Methods & RNN-LSTM Model

Objective:

  • To identify trends & insights from the data
  • To use traditional multivariate ML methods for forecasting
  • To implement RNN-LSTM algorithm to forecast the trends
  • To compare the results of ML methods vis-a-vis RNN-LSTM algorithm

About the Dataset:

Stock Market Dataset has been obtained from Data World.

  • Date Pulled: 08/29/2017 11:30pm
  • Total Snapshots per Index: 2,083
  • First Date Captured: September 2, 1977
  • Last Date Captured: August 29, 2017

A Brief Introduction about the Dataset:

The stock market is a large indicator of the health of the economy. Understanding the stock market, helps in predicting its trends. For this study, Nasdaq, Dow Jones, and S&P 500 market indexes are examined.

Dow Jones Index:

The Dow Jones Industrial Average (DJIA) is a widely-watched benchmark index in the U.S. for blue-chip stocks. DJIA is a price-weighted index that tracks 30 large, publicly-owned companies trading on the New York Stock Exchange and the NASDAQ. The index was created by Charles Dow in 1896 to serve as a proxy for the broader U.S. economy.

NASDAQ:

The Nasdaq Composite Index is a large market-cap-weighted index of more than 2,500 stocks, American depositary receipts (ADRs), and real estate investment trusts (REITs), among others.

SP500:

The S&P 500 Index or the Standard & Poor's 500 Index is a market-capitalization-weighted index of the 500 largest U.S. publicly traded companies. The index is widely regarded as the best gauge of large-cap U.S. equities.

Insights From Data

The insights are found from DJIA's 30 largest publicly owned companies.

Top 10 Companies Based on Price

It is found that Boeing tops the chart , followed by Goldman Sachs Based on Price

Companies with employees greater than or equal to 100,000

Companies greather than = to 1 lakhs

Top 10 Companies with highest number of Employees

Walmart has the highest number of employees Highest Emp Top 10

Volume Analysis of Companies

Apple has the highest volume, followed by General Electric Volume Analysis of Comapnies

Top 15 Companies based on Amount

Amount here referes to Price * Volume, Apple has the highest amount followed by JPMorgan Chase Top 15 based on Amount

Dow Jones Index over the years

DJ across years

NASDAQ Index over the years

NASDAQ values over the years

SP500 Index over the years

SP500 values over the years

Multivariate Time Series Forecasting:

  • As part of forcasting VAR, VMA, VARMA & VARMAX were implemented
  • The Dataset was integrated to the first order to bring stationarity
  • Augumented Dickey Fuller, Granger Causality test was done to justify the approach
  • Johansen Co-integration test revealed that long term forecasting can be made with the data

Waveform Visualization of Data:

VARMAX out 2

VARMAX Model Output: Prediction vs Actual

VARMAX out 1

Forecasting with RNN-LSTM Model:

  • Data was made stationary & was scaled to suit the RNN-LSTM model
  • 70:30 was the train-test split
  • With 70 units RNN-LSTM model was created

Loss Function Curve of RNN-LSTM Model

LOSS CURVE RNN

Comparison Analysis

RNN-LSTM gives the best forecast, followed by VAR Model. Comaprison ML   RNN

time-series-forecasting-with-ml-rnn-lstm's People

Contributors

arpithaananth avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.