The above algorithm is tested for different values of K. For each K, a minimization algorithm helps to restore the time series. Since we have 8 location parameters and 8 scale parameters we work on a minimization space of 16 dimensions. In this space an optimum combination of these parameters is able to enhance the performance of the algorithm, given that the calendar effects exist on the time series. Since the calendar effects do not follow the normal distribution (see Table 1), we standardize each calendar effect in a robust way estimating the robust location and the robust scale parameters using the Least Median of Squares (LMS) method proposed by Rousseeuw and Leroy (1987). The LMS location parameter minimizes the median of the squared errors, and the scale parameter is a function of the median of the squared residuals