# STL decomposition: how to choose the amount of smoothing in trend post-smoothing?

STL decomposes a time series into trend, seasonal, and remainder components. As Cleveland et al. point out in their famous paper, sometimes, after the decomposition has been done, it is convenient to perform a trend post-smoothing. This is done by smoothing $T_t + R_T$ by loess (where $T_t$ and $R_T$ indicate the trend and the remainder component estimated by STL). Sometimes we need to perform a trend post-smoothing because the trend component is not smooth enough. When this happens, we can't re-run the STL procedure with a higher value of $n_{(t)}$, the smoothing parameter of the trend component, because this will worsen the estimate of the seasonal component.

Using the authors' own words (pages 17-19):

We recommend the following approach to the trend component. Consider it to be a component whose estimation is needed to form an estimate of the seasonal; in other words, regard the primary goal of STL to be the estimation of the seasonal component. If a component is needed that describes certain low-frequency variation in the data, then we can carry out a post-trend smoothing. This means that a low-pass filter, such as loess, is applied to $T_t + R_T$, the data with the seasonal component removed, to get a component with the desired variation. As we will see we are often forced to do this since our choice of $n_{(t)}$ often is restricted by the needs of the decomposition and cannot necessarily be chosen so that the trend component describes a certain prescribed component of variation of data.

I'd like to know how to choose the amount of smoothing in trend post-smoothing. Of course, I could try different values of the smoothing parameter manually until the estimate seems to describe the deseasonalized data reasonably well. Since I don't feel very self-confident, I'd like to apply a more rigorous technique. Can I use a usual cross-validation for this purpose? I'm afraid of using a cross-validation as usual because the observation are not independent in a time series.