GluonTS stock market S&P500 prediction deep learning light-weight Jupyter Notebook. The data used is from the early 1950s to March 24, 2020 which has two columns: timestamp, value
Time Stamp contains the date and time 00:00:00 of the trading day Value contains the CLOSE price for the trading day.
We will be predicting the CLOSE price for the trading days for 365 days from March 24, 2020 see the output below at 2000 epochs and a epoch loss rate of 1.98
Dependencies:
- Install GluonTS & MXNet https://gluon-ts.mxnet.io/install.html
- Install Jupyter Notebook + Python==<3.6
- Download dataset from Kaggle https://www.kaggle.com/codykrecicki/sp-500-1950-to-march-2020historicaldata
How to open notebook:
- Use the command python3 -m notebook in your terminal
- File -> Open -> sp500forcastmodel1.ipynb
- Press the |> button thats says run, click it each time.
To change the time series prediction plot so you can see the predictions from a shorter previous time period than from 1950 like the examples below. Find to_pandas(test_entry)[-30000:].plot(figsize=(20,13),linewidth=1)\n", in the code and change [-30000] to another lesser negative number (play around with it to understand it). See examples below.
Bugs to be fixed: x-axis is not showing the correct dates on the forcasted plot, doesn't effect outcome of time series prediction.
Things to be added: Output forcast data into a table & csv file with future date time stamp and close price.