c_des_2.gif

By default c_1=.2 and c_2=.3 , or else they are input into the trend: find S_1,S_2,...S_K and b_1,b_2,...b_K. Then, S_1=y_1. Then, b_1={y_2-y_1} \over {x_2-x_1}. Then, S_{i+1}=a_i*(S_i+b_i(x_{i+1}-x_i))+(1-a_i)*(y_ {i+1}). Then, b_{i+1}=d_i * b_i + (1-d_i) * [(S_{i+1}-S_i) \over x_{i+1}-x_i ]. Where a_i=(1-c_1)^x_{i+1}-x_i, and d_i=(1- c_2)^x_{i+1}-x_i. Then Y_forecast(x)=S_K+(x-x_K)b_K. Note: when Xlist is missing, x_{i+1}-x_i=1, and the corresponding coefficients a_i=(1-c_1) for i=1. ...,K-1 and b_i=(1-c_2)