# Can I use xreg with stl decomposition to handle moving holiday?

I am trying to decompose and forecast a weekly time series which is believed to be affected by moving holidays (e.g. Chinese New Year, which happens in different weeks of a year). I would like create a regressor variable to reflect the holiday effect on the series. Is it correct to use the regressor variable as xreg in forecasting stl object / stlf?

Also, I would like to know the difference between the following methods, and whether they are doing the job I wanted.

1) decompose using stl, then forecast the decomposed object, i.e.

   model<-stl(tseries,"periodic")
forecast<-forecast(model,h=10,method="arima",xreg=xreg,newxreg=newxreg)


2) use stlf directly, i.e.

forecast<-stlf(tseries,h=10,method="arima",xreg=xreg,newxreg=newxreg)


The only difference is that stlf() sets s.window=7 by default so the seasonal component will change slowly over time, whereas you have set it to be unchanging in the first block of code by specifying s.window="periodic".