280 likes | 368 Views
Forecasting based on creeping trend with harmonic weights. Creeping trend can be used if variable changes irregularly in time. We use OLS to estimate parameters of partial trends. Step I. Determine the smoothing constant 1< k <n. T he most often used k=3 .
E N D
Forecasting based on creeping trend with harmonic weights Creeping trend can be used if variable changes irregularly in time. We use OLS to estimate parameters of partial trends.
Step I Determine the smoothing constant 1<k<n. The most often used k=3. The quality of smoothing depends on the smoothing constant. How to select the smoothing constant? Let’s have a look at your data. Detect the first turning point.
Step I cont. If great variation in a short time can be observed, small value of smoothing constant need to be selected. If small variation in a short time can be observed, great value of smoothing constant may be selected. Greater value of smoothing constant causes greater smoothing of data (with great values of smoothing constant, time series data react slowly to any changes that may occur).
Step II Estimation of parameters with OLS for partial trends (smoothing constant, k, is the number of cases for each partial trend).
Step III Determine smoothed values , (fitted values). For a given t from 2 to n-1, there is a set of approximants calculated from the partial trend equation.
Step IV Determine mean smoothed value for t. Mean smoothed value is the mean of smoothed values for time period t.
Step V Determine trend growth for mean smoothed values
Step VI Give weight for trend growth. Weights are in ascending order – this way the newest information are the most important. Weight must sum up to 1. formula for calculating weights:
Step VI cont. (weight can be found in statistical tables of harmonic weights if the number of growths is settled).
Step VII Determine mean trend growth as the weighted average of trend growth with harmonic weights.
Step VIII Forecast for time period T
Step IX Confidence interval for forecast requires calculating uT
Step IX cont. uαdepends on normality of residuals. • If we didn’t reject the null hypothesis (residuals distribution is roughly normal), and n>30 u can be found in normal distribution tables. For sample size n<30 we should use t-Student distribution table (level of significance alpha and n-2 degrees of freedom)
Step IX cont. uαdepends on normality of residuals. 2. If we did reject the null hypothesis (residuals distribution is not normal), or we didn’t check the normality of residuals, uαcan be calculated from Tchebyshev inequality:)
Step IX cont. Standard error of the trend growth mean trend growth harmonic weight trend growth for time period t
Step IX cont. Confidence interval for forecast (at the level of confidence 1-alpha) standard error of the trend growth forecast for T
Example – step I • The following data present the monthly sales (from January to June). The creeping trends method with harmonic weight will let us to construct the forecast for September (T=9). • Smoothing constant k=3 (the most often used, in this case it is hard to say which k would be appropriated).
Month January February March April May June t 1 2 3 4 5 6 yt(in thousands zł) 53 67 58 79 88 85 Example – step I
i Time interval from ti to ti+2 Time series fragment yi, yi+1, yi+2 Y Partial trend equation 1 t = 1, 2, 3 y1 y2 y3 53 67 58 y1 (t)= 53,74 + 2,5t 2 t = 2, 3, 4 y2 y3 y4 67 58 79 y2 (t)= 49,32 + 6t 3 t = 3, 4, 5 y3 y4 y5 58 79 88 y3 (t)= 14,25 + 15t 4 t = 4, 5, 6 y4 y5 y6 79 88 85 y4 (t)= 68,16 + 3t Example – step II Partial trends for k = 3
Example – step III and IV Smoothed (fitted) values (step III) and mean smoothed values (stepIV)
Example – step V Trend growths for mean smoothed values
Example – step VI Harmonic weights
Example VI cont. Harmonic weights – if you don’t want to calculate them, find in harmonic weights tables
Example – step VII Mean trend growth
Example – step VIII Forecast for T=9 Expected sales for September will be 101 451 zl.