Hupperich-Manuel / LSTM-XGBoost-Hybrid-Forecasting

LSTM-XGBoost Time Series Forecasting
GNU General Public License v3.0
108 stars 33 forks source link

Predicting prices for the next few days #4

Closed ruiluhuang closed 1 year ago

ruiluhuang commented 1 year ago

Hello!I have a question. Is it possible for this model to predict prices for the next few days?

Hupperich-Manuel commented 1 year ago

Hi! Thanks for the question. Sure if you dig into the code, you will see the following two parameters: WINDOW_LSTM = 30 #The window used for the input data PREDICTION_SCOPE = 0 #How many period to predict, being 0=1 There you are able to define the amount of past data used as a input (which has the highest autocorrelation). On the other hand with the _PREDICTIONSCOPE parameter you can set how many days in the future you want to predict.

Note that as more days in the future you predict it is highly probable that the distribution of prices widens. In more technical terms, the MAE will be very high and therefore a point prediction or a hedging strategy, makes less sense.

Kind regards

ruiluhuang commented 1 year ago

Hi! Thanks for the question. Sure if you dig into the code, you will see the following two parameters: WINDOW_LSTM = 30 #The window used for the input data PREDICTION_SCOPE = 0 #How many period to predict, being 0=1 There you are able to define the amount of past data used as a input (which has the highest autocorrelation). On the other hand with the _PREDICTIONSCOPE parameter you can set how many days in the future you want to predict.

Note that as more days in the future you predict it is highly probable that the distribution of prices widens. In more technical terms, the MAE will be very high and therefore a point prediction or a hedging strategy, makes less sense.

Kind regards

Thank you very much for your kind reply! I am learning about time series forecasting and this project helps me a lot!

Best wishes