This article presents the winning solution to the CATS time series prediction competition. The solution is based on classical optimal linear estimation theory. The proposed method models the long and short term dynamics of the time series as stochastic linear models. The computation is based on a Kalman smoother, in which the noise densities are estimated by cross-validation. In time series prediction the Kalman smoother is applied three times in different stages of the method. Key words: CATS benchmark, Bayesian filtering, optimal filtering, Kalman filter, Kalman smoother