A nonparametric model for stationary time series