Over the last decades more and more attention has been paid to the problem how to fit a parametric model of time series with time-varying parameters. A typical example is given by autoregressive models with time-varying parameters (tvAR processes). We propose a procedure to fit such time-varying models to general nonstationary processes. The estimator is a maximum Whittle likelihood estimator on sieves. The results do not assume that the observed process belongs to a specific class of time-varying parametric models. We discuss in more details the fitting of tvAR(p) processes for which we treat the problem of the selection of the order p, and propose an iterative algorithm for the computation of the estimator. Comparison with model selection by AIC is provided through simulations. This is a work joint with Rainer Dahlhaus.