# STL Forecasting (ARIMA) with regressors?

I had a question about whether the forecast package in R allows you to use new data for forecasting when modeling with STL + Arima? I found a question from 7 years ago here, but was wondering if anything has changed since then? I've looked at the documentation and I'm a bit confused on xreg vs newxreg.

• Why not read the package documentation? – jbowman Jan 25 at 17:55
• I have RTM, and I'm not too clear on the difference between xreg and newxreg. – user235349 Jan 25 at 18:18
• This link robjhyndman.com/hyndsight/hts-with-regressors might help; basically, xreg are the values of the regressors used in fitting the model, i.e., the historical values of the regressors, and newxreg are the values of those same regressors used in generating forecasts, i.e., the future values of the regressors. – jbowman Jan 25 at 19:39
• (Using panda) It would appear that using xreg=NewDataDF and newxreg=NewDataDF, h=len(NewDataDF.index) in the forecasting arguments leads to the same forecast. – user235349 Jan 25 at 20:50
• I think newxreg defaults to xreg if there's no explicit argument passed. – jbowman Jan 25 at 23:09