Penalized splines have become a popular tool to model the trend component in economic time series. The outcome of the spline predominantly depends on the choice of a penalization parameter that controls the smoothness of the trend. This paper derives the penalization of splines by frequency domain aspects and points out their link to rational square wave filters. As a novel contribution this paper focuses on the so called excess variability at the margins that describes the undesired increasing variability of the trend estimation to the ends of the series. It will be shown that the too high volatility at the margins can be reduced considerably by a time varying penalization, which yields more reliable estimations for the most recent periods.