Time-Series forecasting means predicting the future dependent variable (y) based on the past independent variable (x). If the model predicts a dependent variable (y) based on one independent variable (x), it is called univariate forecasting. Whereas, In Multivariate forecasting, the model predicts a dependent variable (y) based on more than one independent variable (x).
This Example implements a time series model for Google's stock market data. In this example, Multivariate time series forecasting is performed by determining the opening price of the stock using the historical opening, closing, highest, lowest and the adjusted closing price. This example uses the LSTM (Long Short-Term Memory) model to predict the opening price of the stock by taking the input shape defined by the window length and these 5 features.
A univariable forecast model reduces this complexity to a minimum – a single factor and ignores the other dimensions such as prediction of the opening price of the stock is based only on the historical opening price. Whereas, A multivariate stock market prediction model can consider the relationship between multiple variables. They offer a more detailed abstraction of reality than univariate models. Multivariate models thus tend to provide more accurate predictions than univariate models.
This example uses Google's stock market dataset downloaded from Yahoo Finance
Time-Frame Considered: 16 Years of data starting from 2004/08/19 to 2020/07/17.
Structure of Dataset
- Date - specifies trading date
- Open - opening price
- High - maximum price during the day
- Low - minimum price during the day
- Close - close price adjusted for splits
- Adj Close - adjusted close price adjusted for both dividends and splits
- Volume - the number of shares that changed hands during a given day