Time Series Report

Embed Size (px)

Citation preview

  • 8/11/2019 Time Series Report

    1/26

    The aim of our project is to fit an appropriate ARIMA model onto the 2012 Straits Times Index

    values.

    State the background of the time series.

    A stock indexor stock market indexis a method of measuring the value of a section of the

    stock market. It is computed from the prices of selected stocks (sometimes a weighted average).

    It is a tool used by investors and financial managers to describe the market, and to compare the

    return on specific investments.http://en.wikipedia.org/wiki/Stock_market_index

    The Straits Times Index STI has a history dating back to 1966. Following a major sectoral re-

    classification of listed companies by the Singapore Exchange, which saw the removal of the

    "industrials" category, the STI replaced the Straits Times Industrials Index (STII) and began

    trading on 31 August 1998 at 885.26 points, in continuation of where the STII left off. At the

    time, it represented 78% of the average daily traded value over a 12-month period and 61.2%

    of total market capitalization on the exchange. The STI was constructed by SPH, the Singapore

    Exchange and SPH's consultant, ProfessorTse Yiu Kuen from the Singapore ManagementUniversity (formerly from the National University of Singapore). It came under formal review at

    least once annually and was also reviewed on an ad-hoc basis when necessary.

    http://en.wikipedia.org/wiki/Straits_Times_Index

    How do you come up with an initial model (by looking at ACF, PACF, differencing,

    transformation)?

    After studying the ACF and PACF of our original data set, we observed that the ACF dies down

    slowly. Hence the original data set is not stationary. We applied one time differencing and

    observed that both the ACF and PACF of our differenced data set cut off after lag 9. We

    conclude that AR(9) or MA(9) may be an appropriate model for our differenced data set.

    Furthermore, since ACF and PACF is significant at lag 9 only, Special AR(9) model (where 1=

    2=, ...,= 8= 0) or Special MA(9) model (where 1= 2=, ...,= 8= 0) could also be

    appropriate models for our differenced data set as well.

    AR(9):

    (1 + 0.15573 B- 0.07098 B2- 0.06979 B

    3- 0.06655 B

    4- 0.03887 B

    5+ 0.06604 B

    6+ 0.02201 B

    7-

    0.0854 B8- 0.2308 B

    9)Xt = Zt

    MA(9) :

    Xt= ( 1 - 0.17472 B + 0.07831 B2+ 0.01724 B3+ 0.02087 B4+ 0.05457 B5- 0.01909 B6- 0.01998B

    7+ 0.05289 B

    8+ 0.23791 B

    9)Zt

    Special AR(9): (1 - 0.21022 B9)Xt= Zt

    Special MA(9):Xt= (1 + 0.22238 B9)Zt

    http://en.wikipedia.org/wiki/Stock_market_indexhttp://en.wikipedia.org/wiki/Stock_market_indexhttp://en.wikipedia.org/wiki/Stock_market_indexhttp://en.wikipedia.org/w/index.php?title=Tse_Yiu_Kuen&action=edit&redlink=1http://en.wikipedia.org/wiki/Straits_Times_Indexhttp://en.wikipedia.org/wiki/Straits_Times_Indexhttp://en.wikipedia.org/wiki/Straits_Times_Indexhttp://en.wikipedia.org/w/index.php?title=Tse_Yiu_Kuen&action=edit&redlink=1http://en.wikipedia.org/wiki/Stock_market_index
  • 8/11/2019 Time Series Report

    2/26

    How do you improve your model by considering ACFs in the residuals and using ARIMA

    models?

    All four models ( AR(9), MA(9), Special AR(9) and Special MA(9)) passed the ljung box test and

    are appropriate models for our differnced data set.

    When we compare the AIC of the four models ( AR(9), MA(9), Special AR(9) and Special MA(9)),

    we see that Special MA(9) has the smallest AIC, hence it is the most appropriate model of the

    four to be fitted to our differenced values.

    Upon further observation, we see that both the residual ACF and PACF of Special MA(9) cut off

    at lag 1. The residual Zt of Special MA(9) could either follow a model of AR(1) or MA(1). [Refer to

    Lecture Notes Chapter 4 (part4), page 6] We would need to plot the sample ACF values using

    SAS code to determine from the ljung box test and AIC the appropriateness and fit of the two

    models respectively.

    How do you arrive at the final model ?

    Assuming both the AR(1) model and MA(1) models pass the ljung box test when fitted to the

    residual values of Special MA(9) model and:

    [Case 1]: the AR(1) model has an AIC smaller than that of MA(1),

    We choose AR(1) to be a better fit for the residual values and fit the differenced values with

    ARMA(1,9) model(to improve the model since the ACF of the residual has peaks, not WN, plot

    of residual included below). The best fit model of our original data set will be special

    ARIMA(1,1,9). [(1 + 0.1732 B)Yt = (1 + 0.24543 B9)Zt, where Yt = Xt- Xt-1 = (1 - B)Xt]

    [Case 2]: the MA(1) model has an AIC smaller than that of AR(1),We choose MA(1) to be a better fit for the residual values and fit the differenced values with

    MA(10) model (to improve the model since the ACF of the residuals has peaks, not WN, ACF

    plot of residual included below). The best fit model of our original data set will be special

    ARIMA(0,1,10). [Yt= (1 - 0.15001 B + 0.24712 B9+ 0.04448 B

    10)Zt , where Yt = Xt- Xt-1 = (1 - B)Xt]

    datawork4;/*plot original time series*/procgplotdata=stock;symboli=spline c=red;plotAdj_Close*ID;

    run;

  • 8/11/2019 Time Series Report

    3/26

    /*plot the ACF and PACF of original time series*/

    procarimadata=stock;identifyvar=Adj_Close nlag=30outcov=exp1;run;

    The ARIMA Procedure

    Name of Variable = Adj_Close

    Mean of Working Series 2975.718Standard Deviation 106.346Number of Observations 253

    Autocorrelations

    Lag Covariance Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 Std Error

    0 11309.477 1.00000 | |********************| 01 10866.444 0.96083 | . |******************* | 0.0628692 10485.753 0.92717 | . |******************* | 0.1060683 10075.181 0.89086 | . |****************** | 0.1343364 9653.982 0.85362 | . |***************** | 0.1559485 9185.450 0.81219 | . |**************** | 0.173436

    6 8728.255 0.77176 | . |*************** | 0.1878697 8309.761 0.73476 | . |*************** | 0.2000088 7890.652 0.69770 | . |************** | 0.2104079 7502.768 0.66341 | . |************* | 0.21936110 6985.098 0.61763 | . |************ | 0.22715211 6531.153 0.57749 | . |************ | 0.23369612 6048.025 0.53477 | . |*********** | 0.23927013 5581.638 0.49354 | . |********** | 0.24394814 5140.348 0.45452 | . |*********. | 0.24786415 4704.111 0.41594 | . |******** . | 0.25113616 4310.430 0.38113 | . |******** . | 0.25384517 3957.379 0.34992 | . |******* . | 0.256096

    Adj_Close

    2600

    2700

    2800

    2900

    3000

    3100

    3200

    ID

    0 100 200 300

  • 8/11/2019 Time Series Report

    4/26

    18 3603.108 0.31859 | . |****** . | 0.25797919 3291.822 0.29107 | . |****** . | 0.25953020 2974.525 0.26301 | . |***** . | 0.26081721 2665.236 0.23566 | . |***** . | 0.26186322 2370.327 0.20959 | . |**** . | 0.26270023 2114.714 0.18699 | . |**** . | 0.26336024 1860.333 0.16449 | . |*** . | 0.26388425 1629.584 0.14409 | . |*** . | 0.26428926 1408.572 0.12455 | . |** . | 0.26460027 1234.630 0.10917 | . |** . | 0.26483128 1109.667 0.09812 | . |** . | 0.26500929 990.440 0.08758 | . |** . | 0.26515330 872.198 0.07712 | . |** . | 0.265267

    "." marks two standard errors

    The ARIMA Procedure

    Inverse Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    1 -0.47190 | *********| . |2 -0.01676 | . | . |

    3 0.00431 | . | . |4 -0.07019 | . *| . |5 0.04999 | . |* . |6 0.02819 | . |* . |7 -0.04010 | . *| . |8 0.11484 | . |**. |9 -0.21143 | ****| . |10 0.15731 | . |*** |11 -0.06601 | . *| . |12 0.01331 | . | . |13 0.02845 | . |* . |14 -0.04155 | . *| . |15 0.01637 | . | . |16 0.04255 | . |* . |17 -0.07605 | .**| . |18 0.08337 | . |**. |

    19 -0.07078 | . *| . |20 0.02653 | . |* . |21 -0.00458 | . | . |22 0.01739 | . | . |23 -0.01367 | . | . |24 0.00226 | . | . |25 -0.03087 | . *| . |26 0.03889 | . |* . |27 0.00010 | . | . |28 0.00655 | . | . |29 -0.02645 | . *| . |30 0.01055 | . | . |

    Partial Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    1 0.96083 | . |******************* |2 0.05179 | . |* . |3 -0.04708 | . *| . |4 -0.03581 | . *| . |5 -0.07592 | .**| . |6 -0.01650 | . | . |7 0.02701 | . |* . |8 -0.01435 | . | . |9 0.01480 | . | . |10 -0.16993 | ***| . |

  • 8/11/2019 Time Series Report

    5/26

    The ARIMA Procedure

    Partial Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    11 0.01941 | . | . |12 -0.04443 | . *| . |13 -0.00999 | . | . |14 0.02182 | . | . |15 -0.02391 | . | . |16 0.01288 | . | . |17 0.02824 | . |* . |18 -0.03622 | . *| . |19 0.04985 | . |* . |20 -0.04472 | . *| . |21 -0.00915 | . | . |22 -0.00547 | . | . |23 0.01542 | . | . |24 -0.00606 | . | . |25 -0.00335 | . | . |26 -0.02004 | . | . |27 0.04291 | . |* . |28 0.02714 | . |* . |

    29 0.01394 | . | . |30 -0.02090 | . | . |

    Autocorrelation Check for White Noise

    To Chi- Pr >Lag Square DF ChiSq --------------------Autocorrelations--------------------

    6 1178.08 6

  • 8/11/2019 Time Series Report

    6/26

    Observation(s) eliminated by differencing 1

    Autocorrelations

    Lag Covariance Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 Std Error

    0 412.982 1.00000 | |********************| 01 -59.160544 -.14325 | ***| . | 0.0629942 34.677066 0.08397 | . |**. | 0.0642743 12.419977 0.03007 | . |* . | 0.0647084 25.439203 0.06160 | . |* . | 0.0647635 21.561830 0.05221 | . |* . | 0.0649956 -20.122190 -.04872 | . *| . | 0.0651617 6.304886 0.01527 | . | . | 0.0653068 21.731745 0.05262 | . |* . | 0.0653209 85.722637 0.20757 | . |**** | 0.06548810 -6.478523 -.01569 | . | . | 0.06804911 12.119983 0.02935 | . |* . | 0.06806312 9.923122 0.02403 | . | . | 0.06811313 33.774442 0.08178 | . |**. | 0.06814714 -4.241604 -.01027 | . | . | 0.06853515 -39.391957 -.09538 | .**| . | 0.06854116 27.716807 0.06711 | . |* . | 0.06906617 4.525703 0.01096 | . | . | 0.06932418 -9.141073 -.02213 | . | . | 0.06933119 -30.217333 -.07317 | . *| . | 0.069359

    20 8.227113 0.01992 | . | . | 0.06966521 0.260349 0.00063 | . | . | 0.06968722 -18.925956 -.04583 | . *| . | 0.06968823 16.901145 0.04092 | . |* . | 0.06980724 6.330901 0.01533 | . | . | 0.06990225 21.346249 0.05169 | . |* . | 0.06991526 -17.803437 -.04311 | . *| . | 0.07006727 -30.583081 -.07405 | . *| . | 0.07017228 -29.167309 -.07063 | . *| . | 0.07048229 23.411696 0.05669 | . |* . | 0.07076230 -12.212801 -.02957 | . *| . | 0.070942

    "." marks two standard errors

    The ARIMA Procedure

    Inverse Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    1 0.19486 | . |**** |2 -0.10189 | .**| . |3 -0.09142 | .**| . |4 -0.04078 | . *| . |5 -0.03066 | . *| . |6 0.04418 | . |* . |7 0.05151 | . |* . |8 -0.07969 | .**| . |9 -0.24040 | *****| . |10 -0.09986 | .**| . |11 -0.01536 | . | . |12 -0.01524 | . | . |13 -0.05440 | . *| . |14 0.04872 | . |* . |15 0.10342 | . |**. |16 -0.02388 | . | . |17 -0.04144 | . *| . |18 0.02634 | . |* . |19 0.05569 | . |* . |20 0.04485 | . |* . |21 0.06982 | . |* . |22 0.04916 | . |* . |

  • 8/11/2019 Time Series Report

    7/26

    23 -0.09061 | .**| . |24 -0.10207 | .**| . |25 -0.03212 | . *| . |26 0.05952 | . |* . |27 0.08664 | . |**. |28 0.04202 | . |* . |29 -0.04503 | . *| . |30 -0.01740 | . | . |

    Partial Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    1 -0.14325 | ***| . |2 0.06478 | . |* . |3 0.05188 | . |* . |4 0.06902 | . |* . |5 0.06571 | . |* . |6 -0.04551 | . *| . |7 -0.01323 | . | . |8 0.05214 | . |* . |9 0.22805 | . |***** |10 0.04709 | . |* . |

    The ARIMA Procedure

    Partial Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    11 -0.00050 | . | . |12 -0.00755 | . | . |13 0.05229 | . |* . |14 -0.00658 | . | . |15 -0.09704 | .**| . |16 0.02966 | . |* . |17 0.00637 | . | . |18 -0.07592 | .**| . |19 -0.09427 | .**| . |20 -0.00487 | . | . |

    21 -0.01111 | . | . |22 -0.07107 | . *| . |23 0.05740 | . |* . |24 0.08539 | . |**. |25 0.04078 | . |* . |26 -0.04392 | . *| . |27 -0.07080 | . *| . |28 -0.06395 | . *| . |29 0.04637 | . |* . |30 0.02077 | . | . |

    Autocorrelation Check for White Noise

    To Chi- Pr >Lag Square DF ChiSq --------------------Autocorrelations--------------------

    6 9.57 6 0.1438 -0.143 0.084 0.030 0.062 0.052 -0.04912 22.16 12 0.0358 0.015 0.053 0.208 -0.016 0.029 0.02418 27.82 18 0.0648 0.082 -0.010 -0.095 0.067 0.011 -0.02224 30.52 24 0.1680 -0.073 0.020 0.001 -0.046 0.041 0.01530 35.96 30 0.2093 0.052 -0.043 -0.074 -0.071 0.057 -0.030

    /*From the ACF and PACF of modified data, we know that the modified data isstationary.

  • 8/11/2019 Time Series Report

    8/26

    Now, we begin to predict the model of the modified data.First prediction is AR(9)*/

    estimatep=9q=0plot;run;

    The ARIMA Procedure

    Conditional Least Squares Estimation

    Standard ApproxParameter Estimate Error t Value Pr > |t| Lag

    MU 2.03858 1.79034 1.14 0.2560 0AR1,1 -0.15573 0.06277 -2.48 0.0138 1AR1,2 0.07098 0.06333 1.12 0.2635 2AR1,3 0.06979 0.06348 1.10 0.2727 3AR1,4 0.06655 0.06356 1.05 0.2962 4AR1,5 0.03887 0.06367 0.61 0.5421 5AR1,6 -0.06604 0.06361 -1.04 0.3002 6AR1,7 -0.02201 0.06363 -0.35 0.7298 7AR1,8 0.08540 0.06347 1.35 0.1797 8AR1,9 0.23080 0.06293 3.67 0.0003 9

    Constant Estimate 1.389074Variance Estimate 390.5831Std Error Estimate 19.76318AIC 2228.787SBC 2264.081Number of Residuals 252

    * AIC and SBC do not include log determinant.

    Correlations of Parameter Estimates

    Parameter MU AR1,1 AR1,2 AR1,3 AR1,4

    MU 1.000 -0.007 -0.004 -0.001 0.004AR1,1 -0.007 1.000 0.141 -0.070 -0.060AR1,2 -0.004 0.141 1.000 0.130 -0.075AR1,3 -0.001 -0.070 0.130 1.000 0.134

    AR1,4 0.004 -0.060 -0.075 0.134 1.000AR1,5 0.006 -0.078 -0.073 -0.069 0.141AR1,6 0.002 -0.053 -0.090 -0.070 -0.063AR1,7 0.003 0.049 -0.048 -0.092 -0.068AR1,8 0.005 0.005 0.045 -0.048 -0.089AR1,9 0.005 -0.052 0.005 0.048 -0.053

    Correlations of Parameter Estimates

    Parameter AR1,5 AR1,6 AR1,7 AR1,8 AR1,9

    MU 0.006 0.002 0.003 0.005 0.005AR1,1 -0.078 -0.053 0.049 0.005 -0.052AR1,2 -0.073 -0.090 -0.048 0.045 0.005AR1,3 -0.069 -0.070 -0.092 -0.048 0.048AR1,4 0.141 -0.063 -0.068 -0.089 -0.053

    The ARIMA Procedure

    Correlations of Parameter Estimates

    Parameter AR1,5 AR1,6 AR1,7 AR1,8 AR1,9

    AR1,5 1.000 0.141 -0.069 -0.072 -0.078AR1,6 0.141 1.000 0.132 -0.076 -0.059AR1,7 -0.069 0.132 1.000 0.129 -0.071AR1,8 -0.072 -0.076 0.129 1.000 0.140AR1,9 -0.078 -0.059 -0.071 0.140 1.000

  • 8/11/2019 Time Series Report

    9/26

    Autocorrelation Check of Residuals

    To Chi- Pr >Lag Square DF ChiSq --------------------Autocorrelations--------------------

    6 . 0 . -0.011 -0.002 0.002 -0.010 -0.004 0.02012 1.68 3 0.6422 -0.002 -0.010 0.016 0.072 -0.003 0.00718 6.74 9 0.6638 0.071 -0.031 -0.090 0.041 0.004 -0.05424 11.16 15 0.7410 -0.051 -0.015 -0.039 -0.040 0.087 0.04830 15.01 21 0.8224 0.030 -0.047 -0.068 -0.029 0.064 -0.02836 20.40 27 0.8134 -0.067 -0.004 0.068 0.001 0.008 -0.09642 26.24 33 0.7921 -0.132 0.010 0.014 -0.028 -0.005 -0.03148 27.92 39 0.9066 -0.034 -0.011 0.013 -0.052 -0.031 -0.020

    Autocorrelation Plot of Residuals

    Lag Covariance Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 Std Error

    0 390.583 1.00000 | |********************| 01 -4.209177 -.01078 | . | . | 0.0629942 -0.780602 -.00200 | . | . | 0.0630013 0.923379 0.00236 | . | . | 0.0630024 -3.938433 -.01008 | . | . | 0.0630025 -1.679679 -.00430 | . | . | 0.063008

    6 7.964565 0.02039 | . | . | 0.0630107 -0.689568 -.00177 | . | . | 0.0630368 -4.044645 -.01036 | . | . | 0.0630369 6.328491 0.01620 | . | . | 0.06304310 28.314461 0.07249 | . |* . | 0.06305911 -1.251031 -.00320 | . | . | 0.06338912 2.861593 0.00733 | . | . | 0.06339013 27.820577 0.07123 | . |* . | 0.06339314 -11.999885 -.03072 | . *| . | 0.06371015 -35.332000 -.09046 | .**| . | 0.06376916 15.971980 0.04089 | . |* . | 0.06427617 1.504888 0.00385 | . | . | 0.06437918 -20.944722 -.05362 | . *| . | 0.06438019 -19.796349 -.05068 | . *| . | 0.064557

    The ARIMA Procedure

    Autocorrelation Plot of Residuals

    Lag Covariance Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 Std Error

    20 -5.846228 -.01497 | . | . | 0.06471521 -15.338245 -.03927 | . *| . | 0.06472822 -15.769069 -.04037 | . *| . | 0.06482323 33.975576 0.08699 | . |**. | 0.06492324 18.884379 0.04835 | . |* . | 0.06538325 11.565357 0.02961 | . |* . | 0.06552526 -18.441724 -.04722 | . *| . | 0.06557827 -26.521192 -.06790 | . *| . | 0.06571328 -11.487942 -.02941 | . *| . | 0.06599129 25.048909 0.06413 | . |* . | 0.06604330 -11.027101 -.02823 | . *| . | 0.066289

    "." marks two standard errors

    Inverse Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    1 0.02533 | . |* . |2 -0.03822 | . *| . |3 -0.00290 | . | . |

  • 8/11/2019 Time Series Report

    10/26

    4 0.02388 | . | . |5 -0.02089 | . | . |6 -0.02543 | . *| . |7 0.01980 | . | . |8 0.00671 | . | . |9 -0.04795 | . *| . |10 -0.08399 | .**| . |11 0.01306 | . | . |12 0.00525 | . | . |13 -0.06339 | . *| . |14 0.02102 | . | . |15 0.09870 | . |**. |16 -0.03540 | . *| . |17 -0.02223 | . | . |18 0.05271 | . |* . |19 0.06802 | . |* . |20 0.01232 | . | . |21 0.02802 | . |* . |22 0.04662 | . |* . |23 -0.06742 | . *| . |24 -0.06343 | . *| . |25 -0.04137 | . *| . |26 0.06032 | . |* . |27 0.05916 | . |* . |

    The ARIMA Procedure

    Inverse Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    28 0.00297 | . | . |29 -0.05555 | . *| . |30 0.03155 | . |* . |

    Partial Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    1 -0.01078 | . | . |2 -0.00211 | . | . |

    3 0.00232 | . | . |4 -0.01004 | . | . |5 -0.00451 | . | . |6 0.02025 | . | . |7 -0.00130 | . | . |8 -0.01040 | . | . |9 0.01581 | . | . |10 0.07327 | . |* . |11 -0.00135 | . | . |12 0.00680 | . | . |13 0.07188 | . |* . |14 -0.02719 | . *| . |15 -0.09225 | .**| . |16 0.03673 | . |* . |17 0.00753 | . | . |18 -0.05505 | . *| . |19 -0.06049 | . *| . |20 -0.01824 | . | . |21 -0.03542 | . *| . |22 -0.05136 | . *| . |23 0.07631 | . |**. |24 0.06388 | . |* . |25 0.04223 | . |* . |26 -0.06061 | . *| . |27 -0.06086 | . *| . |28 -0.00673 | . | . |29 0.06021 | . |* . |30 -0.03344 | . *| . |

  • 8/11/2019 Time Series Report

    11/26

    Model for variable Adj_Close

    Estimated Mean 2.038583Period(s) of Differencing 1

    The ARIMA Procedure

    Autoregressive Factors

    Factor 1: 1 + 0.15573 B**(1) - 0.07098 B**(2) - 0.06979 B**(3) - 0.06655 B**(4) - 0.03887B**(5) + 0.06604 B**(6) + 0.02201 B**(7) - 0.0854 B**(8) - 0.2308 B**(9)

    /*Second prediction is MA(9)*/

    estimatep=0q=9plot;run;

    The ARIMA Procedure

    Conditional Least Squares Estimation

    Standard ApproxParameter Estimate Error t Value Pr > |t| Lag

    MU 1.91649 1.53904 1.25 0.2142 0MA1,1 0.17472 0.06263 2.79 0.0057 1MA1,2 -0.07831 0.06356 -1.23 0.2191 2MA1,3 -0.01724 0.06373 -0.27 0.7870 3MA1,4 -0.02087 0.06375 -0.33 0.7437 4MA1,5 -0.05457 0.06366 -0.86 0.3921 5MA1,6 0.01909 0.06382 0.30 0.7651 6MA1,7 0.01998 0.06384 0.31 0.7546 7MA1,8 -0.05289 0.06367 -0.83 0.4070 8MA1,9 -0.23791 0.06276 -3.79 0.0002 9

    Constant Estimate 1.916492Variance Estimate 391.3721Std Error Estimate 19.78313AIC 2229.295SBC 2264.59Number of Residuals 252

    * AIC and SBC do not include log determinant.

    Correlations of Parameter Estimates

    Parameter MU MA1,1 MA1,2 MA1,3 MA1,4

    MU 1.000 0.005 0.003 0.004 -0.001MA1,1 0.005 1.000 -0.197 0.086 0.021MA1,2 0.003 -0.197 1.000 -0.205 0.082

    MA1,3 0.004 0.086 -0.205 1.000 -0.204MA1,4 -0.001 0.021 0.082 -0.204 1.000MA1,5 -0.002 0.007 0.014 0.086 -0.203MA1,6 0.003 0.055 -0.004 0.018 0.086MA1,7 0.003 -0.026 0.058 -0.006 0.020MA1,8 0.003 -0.039 -0.026 0.058 -0.006MA1,9 0.003 0.101 -0.039 -0.025 0.055

    Correlations of Parameter Estimates

    Parameter MA1,5 MA1,6 MA1,7 MA1,8 MA1,9

  • 8/11/2019 Time Series Report

    12/26

    MU -0.002 0.003 0.003 0.003 0.003MA1,1 0.007 0.055 -0.026 -0.039 0.101MA1,2 0.014 -0.004 0.058 -0.026 -0.039MA1,3 0.086 0.018 -0.006 0.058 -0.025MA1,4 -0.203 0.086 0.020 -0.006 0.055MA1,5 1.000 -0.203 0.085 0.015 0.007MA1,6 -0.203 1.000 -0.204 0.083 0.022

    The ARIMA Procedure

    Correlations of Parameter Estimates

    Parameter MA1,5 MA1,6 MA1,7 MA1,8 MA1,9

    MA1,7 0.085 -0.204 1.000 -0.206 0.086MA1,8 0.015 0.083 -0.206 1.000 -0.197MA1,9 0.007 0.022 0.086 -0.197 1.000

    Autocorrelation Check of Residuals

    To Chi- Pr >Lag Square DF ChiSq --------------------Autocorrelations--------------------

    6 . 0 . 0.008 0.013 0.017 0.024 -0.008 -0.02812 1.44 3 0.6966 0.010 0.027 -0.003 0.005 0.032 0.041

    18 7.74 9 0.5602 0.093 -0.023 -0.105 0.044 0.031 -0.01824 11.24 15 0.7353 -0.072 -0.008 -0.015 -0.046 0.054 0.04630 14.88 21 0.8289 0.042 -0.049 -0.064 -0.035 0.051 -0.02736 19.33 27 0.8577 -0.055 -0.002 0.063 -0.001 -0.007 -0.09042 23.80 33 0.8800 -0.113 0.004 -0.003 -0.032 -0.011 -0.03148 25.14 39 0.9581 -0.027 -0.023 -0.009 -0.043 -0.018 -0.029

    Autocorrelation Plot of Residuals

    Lag Covariance Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 Std Error

    0 391.372 1.00000 | |********************| 01 3.149001 0.00805 | . | . | 0.0629942 4.953927 0.01266 | . | . | 0.0629983 6.474995 0.01654 | . | . | 0.063008

    4 9.496673 0.02427 | . | . | 0.0630255 -3.181975 -.00813 | . | . | 0.0630636 -11.069498 -.02828 | . *| . | 0.0630677 4.018638 0.01027 | . | . | 0.0631178 10.450316 0.02670 | . |* . | 0.0631249 -1.209690 -.00309 | . | . | 0.063168

    10 1.780698 0.00455 | . | . | 0.06316911 12.345174 0.03154 | . |* . | 0.06317012 16.007940 0.04090 | . |* . | 0.06323313 36.226116 0.09256 | . |**. | 0.06333814 -8.922122 -.02280 | . | . | 0.06387215 -41.124110 -.10508 | .**| . | 0.06390516 17.360529 0.04436 | . |* . | 0.06458717 12.191241 0.03115 | . |* . | 0.06470718 -7.137362 -.01824 | . | . | 0.06476719 -28.368083 -.07248 | . *| . | 0.06478720 -3.243665 -.00829 | . | . | 0.06510821 -5.754024 -.01470 | . | . | 0.06511222 -17.814209 -.04552 | . *| . | 0.06512623 21.006306 0.05367 | . |* . | 0.065252

    The ARIMA Procedure

    Autocorrelation Plot of Residuals

    Lag Covariance Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 Std Error

  • 8/11/2019 Time Series Report

    13/26

    24 18.005885 0.04601 | . |* . | 0.06542725 16.255105 0.04153 | . |* . | 0.06555526 -19.068616 -.04872 | . *| . | 0.06565927 -25.197150 -.06438 | . *| . | 0.06580328 -13.685256 -.03497 | . *| . | 0.06605229 19.808825 0.05061 | . |* . | 0.06612530 -10.720517 -.02739 | . *| . | 0.066279

    "." marks two standard errors

    Inverse Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    1 0.00559 | . | . |2 -0.05030 | . *| . |3 -0.03519 | . *| . |4 -0.01643 | . | . |5 0.01551 | . | . |6 0.03176 | . |* . |7 -0.00923 | . | . |8 -0.03185 | . *| . |9 0.00032 | . | . |10 -0.01266 | . | . |11 -0.02124 | . | . |12 -0.01448 | . | . |

    13 -0.08255 | .**| . |14 0.00277 | . | . |15 0.10479 | . |**. |16 -0.03283 | . *| . |17 -0.04208 | . *| . |18 0.00297 | . | . |19 0.05727 | . |* . |20 0.01802 | . | . |21 0.03367 | . |* . |22 0.03734 | . |* . |23 -0.06468 | . *| . |24 -0.04006 | . *| . |25 -0.03200 | . *| . |26 0.04885 | . |* . |27 0.05852 | . |* . |28 0.01939 | . | . |

    29 -0.04668 | . *| . |30 0.02729 | . |* . |

    The ARIMA Procedure

    Partial Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    1 0.00805 | . | . |2 0.01259 | . | . |3 0.01635 | . | . |4 0.02386 | . | . |5 -0.00892 | . | . |6 -0.02905 | . *| . |7 0.01014 | . | . |8 0.02703 | . |* . |9 -0.00240 | . | . |10 0.00486 | . | . |11 0.02976 | . |* . |12 0.03862 | . |* . |13 0.09269 | . |**. |14 -0.02485 | . | . |15 -0.11213 | .**| . |16 0.04213 | . |* . |17 0.03452 | . |* . |

  • 8/11/2019 Time Series Report

    14/26

    18 -0.01268 | . | . |19 -0.07000 | . *| . |20 -0.01824 | . | . |21 -0.02166 | . | . |22 -0.03548 | . *| . |23 0.06286 | . |* . |24 0.03567 | . |* . |25 0.03139 | . |* . |26 -0.05159 | . *| . |27 -0.06003 | . *| . |28 -0.02235 | . | . |29 0.04909 | . |* . |30 -0.02871 | . *| . |

    Model for variable Adj_Close

    Estimated Mean 1.916492Period(s) of Differencing 1

    Moving Average Factors

    Factor 1: 1 - 0.17472 B**(1) + 0.07831 B**(2) + 0.01724 B**(3) + 0.02087 B**(4) + 0.05457B**(5) - 0.01909 B**(6) - 0.01998 B**(7) + 0.05289 B**(8) + 0.23791 B**(9)

    /*Special AR(9)*/estimatep=(9)q=0plot;

    The ARIMA Procedure

    Conditional Least Squares Estimation

    Standard ApproxParameter Estimate Error t Value Pr > |t| Lag

    MU 1.95747 1.57454 1.24 0.2150 0AR1,1 0.21022 0.06224 3.38 0.0008 9

    Constant Estimate 1.545972Variance Estimate 398.1214Std Error Estimate 19.95298AIC 2225.8SBC 2232.859Number of Residuals 252

    * AIC and SBC do not include log determinant.

    Correlations of ParameterEstimates

    Parameter MU AR1,1

    MU 1.000 0.001AR1,1 0.001 1.000

    Autocorrelation Check of Residuals

    To Chi- Pr >Lag Square DF ChiSq --------------------Autocorrelations--------------------

    6 10.26 5 0.0682 -0.164 0.082 0.038 0.039 0.045 -0.03912 12.67 11 0.3156 -0.017 0.086 0.014 0.030 0.009 0.01918 19.15 17 0.3201 0.086 -0.031 -0.097 0.058 0.011 -0.05224 21.83 23 0.5306 -0.062 0.003 0.001 -0.053 0.050 0.02330 25.20 29 0.6676 0.044 -0.045 -0.055 -0.035 0.053 -0.02936 29.05 35 0.7500 -0.051 -0.016 0.060 -0.023 -0.001 -0.079

  • 8/11/2019 Time Series Report

    15/26

    42 32.76 41 0.8170 -0.099 0.014 -0.014 -0.039 -0.008 -0.02548 33.70 47 0.9274 -0.010 -0.032 -0.008 -0.038 -0.012 -0.016

    The ARIMA Procedure

    Autocorrelation Plot of Residuals

    Lag Covariance Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 Std Error

    0 398.121 1.00000 | |********************| 01 -65.366374 -.16419 | ***| . | 0.0629942 32.603933 0.08189 | . |**. | 0.0646703 14.940745 0.03753 | . |* . | 0.0650804 15.381681 0.03864 | . |* . | 0.0651665 17.991398 0.04519 | . |* . | 0.0652576 -15.451303 -.03881 | . *| . | 0.0653817 -6.639673 -.01668 | . | . | 0.0654728 34.107442 0.08567 | . |**. | 0.0654899 5.584597 0.01403 | . | . | 0.065932

    10 11.951682 0.03002 | . |* . | 0.06594411 3.522713 0.00885 | . | . | 0.06599812 7.632738 0.01917 | . | . | 0.06600313 34.269625 0.08608 | . |**. | 0.06602514 -12.323899 -.03096 | . *| . | 0.06646915 -38.722491 -.09726 | .**| . | 0.066526

    16 23.217002 0.05832 | . |* . | 0.06708817 4.196816 0.01054 | . | . | 0.06728918 -20.594806 -.05173 | . *| . | 0.06729619 -24.644566 -.06190 | . *| . | 0.06745320 1.259091 0.00316 | . | . | 0.06767821 0.482492 0.00121 | . | . | 0.06767922 -21.116842 -.05304 | . *| . | 0.06767923 19.794871 0.04972 | . |* . | 0.06784424 9.230394 0.02318 | . | . | 0.06798825 17.370086 0.04363 | . |* . | 0.06801926 -17.996147 -.04520 | . *| . | 0.06813027 -21.822135 -.05481 | . *| . | 0.06824928 -13.932749 -.03500 | . *| . | 0.06842429 21.116544 0.05304 | . |* . | 0.06849530 -11.658968 -.02928 | . *| . | 0.068658

    "." marks two standard errors

    Inverse Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    1 0.17113 | . |*** |2 -0.10290 | .**| . |3 -0.08439 | .**| . |4 -0.05480 | . *| . |5 -0.03403 | . *| . |6 0.04889 | . |* . |7 0.02735 | . |* . |8 -0.06199 | . *| . |

    The ARIMA Procedure

    Inverse Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    9 -0.05651 | . *| . |10 -0.06404 | . *| . |11 -0.02105 | . | . |12 -0.01325 | . | . |

  • 8/11/2019 Time Series Report

    16/26

    13 -0.06337 | . *| . |14 0.02765 | . |* . |15 0.10443 | . |**. |16 -0.02950 | . *| . |17 -0.04429 | . *| . |18 0.04107 | . |* . |19 0.06490 | . |* . |20 0.03732 | . |* . |21 0.05904 | . |* . |22 0.02865 | . |* . |23 -0.09052 | .**| . |24 -0.08107 | .**| . |25 -0.03768 | . *| . |26 0.06187 | . |* . |27 0.08018 | . |**. |28 0.02427 | . | . |29 -0.04660 | . *| . |30 -0.00557 | . | . |

    Partial Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    1 -0.16419 | ***| . |2 0.05646 | . |* . |3 0.06133 | . |* . |

    4 0.05096 | . |* . |5 0.05371 | . |* . |6 -0.03351 | . *| . |7 -0.04181 | . *| . |8 0.07745 | . |**. |9 0.04603 | . |* . |10 0.03334 | . |* . |11 0.01185 | . | . |12 0.00735 | . | . |13 0.07713 | . |**. |14 -0.00684 | . | . |15 -0.12081 | .**| . |16 0.01251 | . | . |17 0.03209 | . |* . |18 -0.05060 | . *| . |19 -0.07543 | .**| . |

    The ARIMA Procedure

    Partial Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    20 -0.01168 | . | . |21 -0.01384 | . | . |22 -0.05157 | . *| . |23 0.06517 | . |* . |24 0.05686 | . |* . |25 0.04720 | . |* . |26 -0.04250 | . *| . |27 -0.06681 | . *| . |28 -0.04394 | . *| . |29 0.05005 | . |* . |30 0.00625 | . | . |

    Model for variable Adj_Close

    Estimated Mean 1.957466Period(s) of Differencing 1

    Autoregressive Factors

  • 8/11/2019 Time Series Report

    17/26

    Factor 1: 1 - 0.21022 B**(9)

    /Special *MA(9)*/estimatep=0q=(9)plot;

    Conditional Least Squares Estimation

    Standard ApproxParameter Estimate Error t Value Pr > |t| Lag

    MU 1.90525 1.52299 1.25 0.2121 0MA1,1 -0.22238 0.06193 -3.59 0.0004 9

    Constant Estimate 1.905255Variance Estimate 396.8763Std Error Estimate 19.92175AIC 2225.01SBC 2232.069Number of Residuals 252

    * AIC and SBC do not include log determinant.

    The ARIMA Procedure

    Correlations of ParameterEstimates

    Parameter MU MA1,1

    MU 1.000 0.004MA1,1 0.004 1.000

    Autocorrelation Check of Residuals

    To Chi- Pr >Lag Square DF ChiSq --------------------Autocorrelations--------------------

    6 10.76 5 0.0564 -0.169 0.085 0.034 0.033 0.052 -0.03612 13.25 11 0.2771 -0.016 0.088 -0.000 0.035 0.010 0.01618 18.87 17 0.3360 0.086 -0.032 -0.093 0.061 0.002 -0.00924 22.10 23 0.5142 -0.075 0.007 0.002 -0.054 0.052 0.02030 25.33 29 0.6610 0.042 -0.043 -0.055 -0.033 0.052 -0.02936 29.09 35 0.7485 -0.049 -0.017 0.062 -0.019 -0.002 -0.07742 32.94 41 0.8109 -0.101 0.013 -0.013 -0.040 -0.006 -0.02648 33.86 47 0.9246 -0.011 -0.031 -0.009 -0.037 -0.011 -0.017

    Autocorrelation Plot of Residuals

    Lag Covariance Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 Std Error

    0 396.876 1.00000 | |********************| 01 -67.081734 -.16902 | ***| . | 0.0629942 33.810903 0.08519 | . |**. | 0.0647693 13.424455 0.03383 | . |* . | 0.0652124 13.141605 0.03311 | . |* . | 0.0652825 20.501082 0.05166 | . |* . | 0.0653486 -14.423539 -.03634 | . *| . | 0.0655107 -6.349037 -.01600 | . | . | 0.0655908 34.744757 0.08755 | . |**. | 0.0656059 -0.045870 -.00012 | . | . | 0.066067

    10 14.000886 0.03528 | . |* . | 0.066067

  • 8/11/2019 Time Series Report

    18/26

    11 3.781957 0.00953 | . | . | 0.06614212 6.297616 0.01587 | . | . | 0.06614813 34.214659 0.08621 | . |**. | 0.06616314 -12.525273 -.03156 | . *| . | 0.06660715 -36.842747 -.09283 | .**| . | 0.06666616 24.187405 0.06094 | . |* . | 0.06717717 0.797138 0.00201 | . | . | 0.06739618 -3.621449 -.00912 | . | . | 0.06739619 -29.641861 -.07469 | . *| . | 0.06740120 2.733820 0.00689 | . | . | 0.06772921 0.835777 0.00211 | . | . | 0.06773222 -21.475741 -.05411 | . *| . | 0.067732

    The ARIMA Procedure

    Autocorrelation Plot of Residuals

    Lag Covariance Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1 Std Error

    23 20.587592 0.05187 | . |* . | 0.06790324 8.036447 0.02025 | . | . | 0.06806025 16.567370 0.04174 | . |* . | 0.06808426 -17.090045 -.04306 | . *| . | 0.06818627 -21.908089 -.05520 | . *| . | 0.06829428 -13.224902 -.03332 | . *| . | 0.06847129 20.686524 0.05212 | . |* . | 0.06853530 -11.690233 -.02946 | . *| . | 0.068692

    "." marks two standard errors

    Inverse Autocorrelations

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    1 0.16976 | . |*** |2 -0.10170 | .**| . |3 -0.08918 | .**| . |4 -0.05809 | . *| . |5 -0.03009 | . *| . |6 0.05150 | . |* . |7 0.02915 | . |* . |8 -0.05943 | . *| . |9 -0.04581 | . *| . |

    10 -0.06193 | . *| . |11 -0.02244 | . | . |12 -0.01428 | . | . |13 -0.05972 | . *| . |14 0.02865 | . |* . |15 0.10378 | . |**. |16 -0.02895 | . *| . |17 -0.05070 | . *| . |18 0.00714 | . | . |19 0.06524 | . |* . |20 0.03831 | . |* . |21 0.05890 | . |* . |22 0.03033 | . |* . |23 -0.08714 | .**| . |24 -0.08003 | .**| . |25 -0.03874 | . *| . |26 0.06441 | . |* . |27 0.08262 | . |**. |28 0.02781 | . |* . |29 -0.04461 | . *| . |30 -0.00457 | . | . |

    The ARIMA Procedure

    Partial Autocorrelations

  • 8/11/2019 Time Series Report

    19/26

    Lag Correlation -1 9 8 7 6 5 4 3 2 1 0 1 2 3 4 5 6 7 8 9 1

    1 -0.16902 | ***| . |2 0.05829 | . |* . |3 0.05912 | . |* . |4 0.04440 | . |* . |5 0.05898 | . |* . |6 -0.02756 | . *| . |7 -0.04022 | . *| . |8 0.07944 | . |**. |9 0.03170 | . |* . |10 0.03171 | . |* . |11 0.01592 | . | . |12 0.00755 | . | . |13 0.07713 | . |**. |14 -0.00650 | . | . |15 -0.11858 | .**| . |16 0.01601 | . | . |17 0.02686 | . |* . |18 -0.01084 | . | . |19 -0.07494 | . *| . |20 -0.01517 | . | . |21 -0.01474 | . | . |22 -0.05286 | . *| . |23 0.06136 | . |* . |24 0.05411 | . |* . |25 0.04822 | . |* . |

    26 -0.04540 | . *| . |27 -0.06856 | . *| . |28 -0.04729 | . *| . |29 0.04802 | . |* . |30 0.00510 | . | . |

    Model for variable Adj_Close

    Estimated Mean 1.905255Period(s) of Differencing 1

    Moving Average Factors

    Factor 1: 1 + 0.22238 B**(9)

    /*From the observations, all four models passed the ljung box test (using m=48, the closest to 50).However, the AIC of Special MA(9)(=2225.01)is the smallest by a slight margin.Hence, Special MA(9)is likely to be better than the other three models.*/

    forecastlead=60interval=daily id=date out=exp3;run;/*exp2 is the differenced data*//* We forecast the Straits Times Index over the next 2 months*/

    The ARIMA Procedure

    Forecasts for variable Adj_Close

    Obs Forecast Std Error 95% Confidence Limits

    254 3167.8120 19.9218 3128.7661 3206.8579255 3169.6930 28.1736 3114.4737 3224.9123256 3173.7574 34.5055 3106.1278 3241.3869257 3172.4467 39.8435 3094.3548 3250.5385258 3175.0070 44.5464 3087.6977 3262.3164259 3178.5079 48.7981 3082.8654 3274.1505260 3180.2651 52.7080 3076.9593 3283.5709

  • 8/11/2019 Time Series Report

    20/26

    261 3182.9325 56.3472 3072.4940 3293.3711262 3179.4147 59.7653 3062.2769 3296.5525263 3181.3199 64.5361 3054.8315 3307.8083264 3183.2252 68.9777 3048.0313 3318.4191265 3185.1305 73.1502 3041.7588 3328.5021266 3187.0357 77.0971 3035.9281 3338.1433267 3188.9410 80.8516 3030.4747 3347.4072268 3190.8462 84.4394 3025.3481 3356.3443269 3192.7515 87.8807 3020.5084 3364.9946270 3194.6567 91.1924 3015.9230 3373.3905271 3196.5620 94.3878 3011.5652 3381.5588272 3198.4672 97.4786 3007.4126 3389.5219273 3200.3725 100.4744 3003.4463 3397.2987274 3202.2777 103.3834 2999.6500 3404.9055275 3204.1830 106.2127 2996.0099 3412.3561276 3206.0883 108.9686 2992.5137 3419.6629277 3207.9935 111.6565 2989.1507 3426.8363278 3209.8988 114.2812 2985.9116 3433.8859279 3211.8040 116.8470 2982.7881 3440.8199280 3213.7093 119.3576 2979.7726 3447.6459281 3215.6145 121.8165 2976.8586 3454.3705282 3217.5198 124.2267 2974.0399 3460.9997283 3219.4250 126.5911 2971.3111 3467.5390284 3221.3303 128.9121 2968.6673 3473.9933285 3223.2355 131.1920 2966.1039 3480.3672286 3225.1408 133.4330 2963.6170 3486.6646287 3227.0461 135.6369 2961.2025 3492.8896

    288 3228.9513 137.8057 2958.8572 3499.0455289 3230.8566 139.9408 2956.5777 3505.1354290 3232.7618 142.0438 2954.3611 3511.1626291 3234.6671 144.1161 2952.2046 3517.1295292 3236.5723 146.1591 2950.1058 3523.0389293 3238.4776 148.1739 2948.0621 3528.8931294 3240.3828 150.1616 2946.0714 3534.6943295 3242.2881 152.1234 2944.1316 3540.4446296 3244.1934 154.0602 2942.2408 3546.1459297 3246.0986 155.9730 2940.3971 3551.8001298 3248.0039 157.8626 2938.5989 3557.4089299 3249.9091 159.7298 2936.8444 3562.9738300 3251.8144 161.5755 2935.1322 3568.4965

    The ARIMA Procedure

    Forecasts for variable Adj_Close

    Obs Forecast Std Error 95% Confidence Limits

    301 3253.7196 163.4003 2933.4609 3573.9783302 3255.6249 165.2050 2931.8291 3579.4206303 3257.5301 166.9901 2930.2355 3584.8247304 3259.4354 168.7564 2928.6790 3590.1918305 3261.3406 170.5044 2927.1582 3595.5231306 3263.2459 172.2346 2925.6723 3600.8195307 3265.1512 173.9476 2924.2201 3606.0822308 3267.0564 175.6439 2922.8006 3611.3122309 3268.9617 177.3240 2921.4129 3616.5104310 3270.8669 178.9884 2920.0562 3621.6777311 3272.7722 180.6374 2918.7295 3626.8149312 3274.6774 182.2714 2917.4320 3631.9229313 3276.5827 183.8910 2916.1630 3637.0024

    Complete SAS Code:

    datawork4;/*plot original time series*/procgplotdata=stock;

  • 8/11/2019 Time Series Report

    21/26

    symboli=spline c=red;plotAdj_Close*ID;run;procarimadata=stock;identifyvar=Adj_Close nlag=30outcov=exp1;run;procarimadata=stock;identifyvar=Adj_Close(1) nlag=30outcov=exp2;run;/*AR(9)*/estimatep=9q=0plot;/*MA(9)*/estimatep=0q=9plot;/*Special AR(9)*/estimatep=(9)q=0plot;/*Special MA(9)*/estimatep=0q=(9)plot;/*Special MA(9)forecast*/forecastlead=60interval=daily id=date out=exp3;/*exp2 is the differenced data*/run;quit;

    Using Time Series Forecasting System:

  • 8/11/2019 Time Series Report

    22/26

    Graph of predicted values using AR(9) ) [for reference]:

    Graph of predicted values using MA(9) [for reference]:

    Graph of predicted values using Special AR(9) ) [for reference]:

  • 8/11/2019 Time Series Report

    23/26

  • 8/11/2019 Time Series Report

    24/26

    Plot of ACF and PACF of residual, model = SMA(9)

    Based on the plot, the ACF and PACF both cut off at lag 1, hence, we can improve the model

    by fitting the residual as MA(1) or AR(1), which respectively change the model to special

    ARIMA(0,1,10) and special ARIMA(1,1,9)

    SAS Code (for improved models)

    datawork4;/*plot original time series*/procgplotdata=stock;symboli=spline c=red;plotAdj_Close*ID;run;procarimadata=stock;identifyvar=Adj_Close nlag=30outcov=exp1;run;procarimadata=stock;identifyvar=Adj_Close(1) nlag=30outcov=exp2;run;/*Special ARMA(1,9)*/estimatep=(1) q=(9) plot;/*Special MA(10)*/estimatep=0q=(1)(9)(10) plot;run;quit;

  • 8/11/2019 Time Series Report

    25/26

    Result for improved model of ARIMA (1,1,9)

  • 8/11/2019 Time Series Report

    26/26

    Result for improved model of ARIMA (0,1,10)

    Both Special ARIMA (1,1,9) and Special ARIMA (0,1,10) passed the ljung box test.

    Comparing Special ARIMA (1,1,9) and Special ARIMA (0,1,10), the AICs are 2219.524 and

    2222.096 respectively. Hence we choose special ARIMA (1,1,9) which has the smaller AIC.