A hybrid model for time series forecasting