This paper describes in detail a flexible approach to nonstationary time se
ries analysis based on a Dynamic Harmonic Regression (DHR) model of the Uno
bserved Components (UC) type, formulated within a stochastic state space se
tting. The model is particularly useful for adaptive seasonal adjustment, s
ignal extraction and interpolation over gaps, as well as forecasting or bac
kcasting. The Kalman Filter and Fixed Interval Smoothing algorithms are exp
loited for estimating the various components, with the Noise Variance Ratio
and other hyperparameters in the stochastic state space model estimated by
a novel optimization method in the frequency domain. Unlike other approach
es of this general type, which normally exploit Maximum Likelihood methods,
this optimization procedure is based on a cost function defined in terms o
f the difference between the logarithmic pseudo-spectrum of the DHR model a
nd the logarithmic autoregressive spectrum of the time series. The cost fun
ction not only seems to yield improved convergence characteristics when com
pared with the alternative ML cost function, but it also has much reduced n
umerical requirements. Copyright (C) 1999 John Wiley & Sons, Ltd.