Skip to content

Walmart stock price prediction using keras (LSTM and GRU comparison)

Notifications You must be signed in to change notification settings

haksorus/walmart-time-series

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 

Repository files navigation

Walmart stock price prediction (LSTM vs GRU)

image

About work

In this project I used two recurrent neural network (RNN) to predict Walmart stock price:

  • with long short term memory (LSTM)
  • with gated recurrent unit (GRU)

Also, model inference was compared (LSTM vs GRU)

Data

Dataset was collected from investing.com

It consists data from 2013 to 2022 year (Walmart daily stock price values and other additional features)

If you want to use it, you can find my dataset here

LSTM vs GRU

image

For each of this units, I've trained a simple RNN using MAE loss and Adam optimizer in 50 epochs

After training both of networks inference (prediction + 30-day forecast) was compared

In this case, LSTM works better (MAE = 1.42) than GRU (MAE = 2.49)

Demo

LSTM inference:

image

GRU inference:

image

About

Walmart stock price prediction using keras (LSTM and GRU comparison)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages