Autocorrelations Analysis
Abstract
In this post I am going to run the total (ACF) and partial (PACF) auto-correlations analysis. ACF and PACF plots are used to infere the auto-regressive and/or moving average nature of time series. In general literature suggests the following mapping between ACF/PACF decay throughout lags and presence of auto-regressive and/or moving average components (see ref. [1] Table 3.1 at page 108):
acf.test | pacf.test | ARMA.flavour |
---|---|---|
tails off | cuts off after lag p | AR(p) |
cuts off after lag q | tails off | MA(q) |
tails off | tails off | ARMA(p,q) |
Analysis
Here below the ACF and PACF plots of the GSPC log return time series as determined afterwards the structural changes analysis and including outliers.
load(file="structured-product-1.RData")
invisible(lapply(ts.package, function(x) {
suppressPackageStartupMessages(library(x, character.only=TRUE)) }))
par(mfrow=c(1,3))
acf(GSPC_log_returns)
pacf(GSPC_log_returns)
periodogram(GSPC_log_returns)
suppressWarnings(LjungBoxTest(GSPC_log_returns, lag.max=30))
## m Qm pvalue
## 1 2.26 0.1324736
## 2 2.79 0.2473094
## 3 2.96 0.3983915
## 4 3.48 0.4807560
## 5 3.55 0.6158271
## 6 4.09 0.6645220
## 7 4.98 0.6625120
## 8 6.81 0.5576936
## 9 7.57 0.5781724
## 10 12.02 0.2837663
## 11 13.44 0.2654552
## 12 13.54 0.3311954
## 13 13.68 0.3969337
## 14 15.07 0.3736873
## 15 15.07 0.4467046
## 16 16.52 0.4170833
## 17 18.91 0.3334664
## 18 20.73 0.2933603
## 19 21.18 0.3269855
## 20 21.86 0.3482478
## 21 22.56 0.3676552
## 22 23.34 0.3829788
## 23 23.75 0.4179759
## 24 24.86 0.4136387
## 25 24.86 0.4702778
## 26 25.11 0.5124952
## 27 25.11 0.5680257
## 28 26.16 0.5642759
## 29 28.16 0.5093800
## 30 30.51 0.4395943
Based on those plots and LjungBox test, we can conclude that our observations do not show any significant auto-correlation. In other terms, each observation results as indipendently originated from past ones. The periodogram is useful to check for any relevant seasonal components and in this case it does not indicate any.
For completeness, I repeat the same analysis for log returns observations without outliers already determined in previous posts.
par(mfrow=c(1,3))
GSPC_log_returns_no_outliers <- GSPC_log_returns[-c(outliers_l, outliers_r)]
acf(GSPC_log_returns_no_outliers)
pacf(GSPC_log_returns_no_outliers)
periodogram(GSPC_log_returns_no_outliers)
suppressWarnings(LjungBoxTest(GSPC_log_returns_no_outliers, lag.max=30))
## m Qm pvalue
## 1 3.81 0.05093217
## 2 3.86 0.14497439
## 3 5.32 0.14962915
## 4 5.46 0.24285224
## 5 5.95 0.31099092
## 6 5.96 0.42813685
## 7 7.16 0.41222833
## 8 9.05 0.33817385
## 9 9.08 0.42998459
## 10 9.75 0.46269972
## 11 12.67 0.31540668
## 12 12.92 0.37503073
## 13 12.93 0.45302754
## 14 15.11 0.37035290
## 15 15.12 0.44314295
## 16 17.01 0.38486507
## 17 19.31 0.31118733
## 18 20.21 0.32103764
## 19 20.24 0.38051508
## 20 20.35 0.43647735
## 21 20.69 0.47784916
## 22 21.97 0.46170679
## 23 22.15 0.51108077
## 24 26.37 0.33469423
## 25 27.66 0.32379312
## 26 27.71 0.37302121
## 27 27.72 0.42563204
## 28 29.19 0.40305992
## 29 29.31 0.44884572
## 30 33.28 0.31061290
Same results and considerations as before.
Conclusions
Our observations history does not show significant correlation structures. That represents an important information by the time I will set-up the observations simulation, as it allows to determine what kind of procedure to use in order to properly represent the auto-correlation structure.
We will have to countercheck the simulation results against their ACF and PACF plots to verify history auto-correlation structure has being replicated congruently.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.