Introduction

In this analysis, we explore the ASX dataset which features monthly averages of ASX all Oridinaries (Ords) Price Index, Gold Price (AUD), Crude Oil(Brent,USD/bbl) and Copper(USD/tonne) starting from January 2004.

Aim of this analysis:

ASX_data <- read_csv("ASX_data.csv")
## Rows: 161 Columns: 4
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: ","
## dbl (2): ASX price, Crude Oil (Brent)_USD/bbl
## num (2): Gold price, Copper_USD/tonne
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
head(ASX_data)
## # A tibble: 6 × 4
##   `ASX price` `Gold price` `Crude Oil (Brent)_USD/bbl` `Copper_USD/tonne`
##         <dbl>        <dbl>                       <dbl>              <dbl>
## 1       2935.         612.                        31.3               1650
## 2       2778.         603.                        32.6               1682
## 3       2849.         566.                        30.3               1656
## 4       2971.         539.                        25.0               1588
## 5       2980.         549.                        25.8               1651
## 6       3000.         536.                        27.6               1685

Descriptive Statistics

summary(ASX_data)
##    ASX price      Gold price     Crude Oil (Brent)_USD/bbl Copper_USD/tonne
##  Min.   :2778   Min.   : 520.9   Min.   : 25.02            Min.   :1588    
##  1st Qu.:4325   1st Qu.: 825.9   1st Qu.: 47.23            1st Qu.:4642    
##  Median :4929   Median :1363.6   Median : 70.80            Median :6650    
##  Mean   :4813   Mean   :1202.0   Mean   : 73.63            Mean   :5989    
##  3rd Qu.:5448   3rd Qu.:1546.8   3rd Qu.:106.98            3rd Qu.:7623    
##  Max.   :6779   Max.   :1776.3   Max.   :133.90            Max.   :9881

Time series Plots

#converting ASX dataframes to monthly time series objects
asx.ts <- ts(ASX_data$`ASX price`, start = c(2004,1) ,frequency = 12)
gold.ts <- ts(ASX_data$`Gold price`, start = c(2004,1) ,frequency = 12)
crudeoil.ts <- ts(ASX_data$`Crude Oil (Brent)_USD/bbl`, start = c(2004,1), frequency = 12)
copper.ts <- ts(ASX_data$`Copper_USD/tonne`, start = c(2004,1) ,frequency = 12)

ASX Series Plot

plot(asx.ts,type='o', pch=20, ylab="Ords",xlab="Year",main ="ASX (ORDS) Price Index Time Series Plot")

The ASX series plot shows an upward trend for the given time period. There are no signs of seasonality and changing variance. Moreover, an intervention point is present between 2007 and 2009. The succeeding points indicate the presence of an autoregressive pattern.

Gold Series Plot

plot(gold.ts, type='o', pch=20 ,ylab="Aud",xlab="Year",main ="Gold price Time Series Plot")

The gold series plot shows an upward trend for the given time period. There are no signs of seasonality and changing variance. Moreover, no intervention point can be observed. The succeeding points indicate the presence of an autoregressive pattern.

Crude Oil Series Plot

plot(crudeoil.ts,type='o', pch=20, ylab="USD/bbl",xlab="Year",main ="Crude oil price Time Series Plot")

The crude series plot shows no obvious trend for the given time period, no signs of seasonality and changing variance. Moreover, an intervention point is present around 2008. The succeeding points indicate the presence of an autoregressive pattern.

Copper Series Plot

plot(copper.ts,type='o', pch=20, ylab="USD/tonne",xlab="Year",main ="Copper price Time Series Plot")

The copper series plot shows no apparent trend for the given time period. There are no signs of seasonality and changing variance. Moreover, an intervention point is present between 2007 and 2009. The succeeding points indicate the presence of an autoregressive pattern.

ASX All series plot

To gain an insight into the relationship between our independent time series (Gold, Crude Oil, Copper) and the dependent series (All Ordinaries ASX), we present them together in a single plot which is appropriately scaled and centered.

data.ts = ts(ASX_data, start = 2004, frequency = 12) #converting data to time series object
data.scale=scale(data.ts) #scaling data

plot(data.scale, plot.type="s", col=c("black", "gold","skyblue","lightgreen"),
     main = "ASX All Series", xlab="Year", ylab="Scaled Data")
legend ("topleft", lty =1, text.width=1.5, col=c("black", "gold","skyblue","lightgreen"),
        c('All Ords', 'Gold', 'Oil', 'Copper'))

The ASX all series plot show an upward trend until the intervention point around 2008. Only the gold price shows a stable upward trend. Copper and Oil price follow similar patterns hence suggesting a correlation between both prices.

Stationarity Analysis

ACF and PACF plot

par(mfrow=c(1,2)) 
acf(asx.ts, main = "Sample ACF for ASX series", )
pacf(asx.ts, main = "Sample PACF for ASX series")

par(mfrow=c(1,2)) 
acf(gold.ts, main = "Sample ACF for GOLD series", )
pacf(gold.ts, main = "Sample PACF for GOLD series")

par(mfrow=c(1,2)) 
par(mar=c(4,4,4,4))
acf(crudeoil.ts, main = "Sample ACF for Crude Oil series", )
pacf(crudeoil.ts, main = "Sample PACF for Crude Oil series")

par(mfrow=c(1,2)) 
par(mar=c(4,4,4,4))
acf(copper.ts, main = "Sample ACF for Copper Oil series" )
pacf(copper.ts, main = "Sample PACF for Copper Oil series")

With respect to all ACF plots.We observe positive values which gradually decrease as the lags increase. This pattern strongly suggests the presence of a trend in the series. Additionally, across all PACF plots, the significance of the first lag suggests the presence of non-stationarity within the series.

ADF test

  • To determine if the series is stationary we perform Augmented Dickey-Fuller test (ADF) which is defined as the following hypothesis.

  • H0: The time series is non-stationary. In other words, it has some time-dependent structure and does not have constant variance over time.

  • HA: The time series is stationary.

k = ar(asx.ts)$order # length of lag for ADF
adf.test(asx.ts,k=k)
## 
##  Augmented Dickey-Fuller Test
## 
## data:  asx.ts
## Dickey-Fuller = -2.442, Lag order = 2, p-value = 0.392
## alternative hypothesis: stationary
k = ar(gold.ts)$order 
adf.test(gold.ts,k=k)
## 
##  Augmented Dickey-Fuller Test
## 
## data:  gold.ts
## Dickey-Fuller = -2.2824, Lag order = 1, p-value = 0.4585
## alternative hypothesis: stationary
k = ar(crudeoil.ts)$order
adf.test(crudeoil.ts,k=k)
## 
##  Augmented Dickey-Fuller Test
## 
## data:  crudeoil.ts
## Dickey-Fuller = -2.0703, Lag order = 3, p-value = 0.547
## alternative hypothesis: stationary
k = ar(copper.ts)$order 
adf.test(copper.ts,k=k)
## 
##  Augmented Dickey-Fuller Test
## 
## data:  copper.ts
## Dickey-Fuller = -2.3847, Lag order = 2, p-value = 0.4159
## alternative hypothesis: stationary

The ADF test for all series have a P-value > 0.05 therefore we fail to reject the H0 (null hypothesis) and conclude all series are non-stationary at 5% level.

Decomposition

STL and x12 decomposition is used to examine the impact of trend and seasonality components within the series.

asx.stl <- stl(asx.ts, t.window=15, s.window = "periodic", robust=TRUE);
plot(asx.stl, main ="STL Decomposition of ASX series")

asx.x12 <- x12(asx.ts)
plot(asx.x12, sa= TRUE, trend= TRUE, main= "X12 Decomposition of ASX series", forecast=TRUE)

The remainder component in the STL plot indicates significant noise near the intervention point. ASX time series plot and ACF plot showed no signs of seasonality therefore the STL seasonal plot has no meaningful insights. X12 decomposition plot shows seasonally adjusted series is close to the original series.

gold.stl <- stl(gold.ts, t.window=15, s.window = "periodic", robust=TRUE);
plot(asx.stl, main ="STL Decomposition of Gold series")

gold.x12 <- x12(gold.ts)
plot(asx.x12, sa= TRUE, trend= TRUE, main= "X12 Decomposition of Gold series", forecast=TRUE)

There is significant fluctuations in the remainder component of the STL Gold series plot which indicates there are unknown factors influencing the series which cannot be explained by the trend and seasonal components. Additionally, gold time series plot and ACF plot showed no signs of seasonality therefore the STL seasonal plot has no meaningful insights and X12 decomposition plot shows seasonally adjusted series is close to the original series.

crudeoil.stl <- stl(crudeoil.ts, t.window=15, s.window = "periodic", robust=TRUE);
plot(asx.stl, main ="STL Decomposition of CrudeOil series")

asx.x12 <- x12(crudeoil.ts)
plot(asx.x12, sa= TRUE, trend= TRUE, main= "X12 Decomposition of CrudeOil series", forecast=TRUE)

There is significant fluctuations in the remainder component near the intervention point of the STL Crude oil series plot which indicates there are unknown factors influencing the series which cannot be explained by the trend and seasonal components. Additionally, Crude oil time series plot and ACF plot showed no signs of seasonality therefore the STL seasonal plot has no meaningful insights and X12 decomposition plot shows seasonally adjusted series is close to the original series.

copper.stl <- stl(copper.ts, t.window=15, s.window = "periodic", robust=TRUE);
plot(asx.stl, main ="STL Decomposition of Copper series")

asx.x12 <- x12(copper.ts)
plot(asx.x12, sa= TRUE, trend= TRUE, main= "X12 Decomposition of Copper series",forecast=TRUE)

There is significant fluctuations in the remainder component near the intervention period of the STL Copper series plot suggests there are unknown factors influencing the series which cannot be explained by the trend and seasonal components. Additionally, Copper time series plot and ACF plot showed no signs of seasonality therefore the STL seasonal plot has no meaningful insights and X12 decomposition plot shows seasonally adjusted series is close to the original series.

Correlation Matrix

colnames(data.ts) <- c('ASXPrice', 'GoldPrice', 'CrudeOilPrice', 'CopperPrice') #renaming columns
corr <- cor(data.ts) # Correlation 
head(corr)
##                ASXPrice GoldPrice CrudeOilPrice CopperPrice
## ASXPrice      1.0000000 0.3431908     0.3290338   0.5617864
## GoldPrice     0.3431908 1.0000000     0.4366382   0.5364213
## CrudeOilPrice 0.3290338 0.4366382     1.0000000   0.8664296
## CopperPrice   0.5617864 0.5364213     0.8664296   1.0000000
colors <- dmat.color(corr) #coloring according to correlation strength 
# (pink for high and yellow for low correlation )
order <- order.single(corr) # rearranges matrix to keep variables 
#with high correlation close to each other.

cpairs(data.ts, order, panel.colors = colors, gap = 0.5,
       main = "Correlation Scatter Plot Sorted")

The correlation matrix and scatter plot both indicate a strong positive correlation between crude oil and copper price (r=0.866). Additionally, there is a significant correlation between ASX price and copper price (r=0.566). Due to high correlation between crude oil and copper, we do not use both of them as independent variables simultaneously during the modelling process.

Modelling

We perform 4 different types of model to determine the most suited model for the ASX price index. In Finite DLM and Autoregressive DLM we use copper and gold price series as our predictors. Polynomial DLM and koyck transformation we use copper price series as our predictor since it has the highest correlation with ASX price index.

Finite DLM

for (i in 1:10){
  model1.1 = dlm(x = as.vector(gold.ts)+as.vector(copper.ts), y = as.vector(asx.ts), q = i)
  cat("q = ", i, "AIC = ", AIC(model1.1$model), "BIC = ", BIC(model1.1$model), "\n")
}
## q =  1 AIC =  2574.318 BIC =  2586.619 
## q =  2 AIC =  2559.216 BIC =  2574.56 
## q =  3 AIC =  2543.874 BIC =  2562.25 
## q =  4 AIC =  2528.381 BIC =  2549.774 
## q =  5 AIC =  2512.536 BIC =  2536.935 
## q =  6 AIC =  2496.908 BIC =  2524.299 
## q =  7 AIC =  2480.908 BIC =  2511.277 
## q =  8 AIC =  2465.188 BIC =  2498.522 
## q =  9 AIC =  2449.696 BIC =  2485.983 
## q =  10 AIC =  2435.031 BIC =  2474.256

The lag length q=10 denotes the lowest AIC and BIC values.

model1 = dlm(x = as.vector(gold.ts)+as.vector(copper.ts), y = as.vector(asx.ts), q =10)
summary(model1)
## 
## Call:
## lm(formula = model.formula, data = design)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1207.74  -647.59    44.66   592.64  1504.89 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 3875.39268  229.14655  16.912   <2e-16 ***
## x.t            0.14749    0.13472   1.095    0.275    
## x.1            0.02523    0.21748   0.116    0.908    
## x.2            0.04443    0.21875   0.203    0.839    
## x.3            0.03152    0.21540   0.146    0.884    
## x.4            0.01588    0.21505   0.074    0.941    
## x.5           -0.04433    0.21711  -0.204    0.839    
## x.6            0.02544    0.21507   0.118    0.906    
## x.7            0.00347    0.21645   0.016    0.987    
## x.8           -0.01022    0.22098  -0.046    0.963    
## x.9           -0.07916    0.21945  -0.361    0.719    
## x.10          -0.02261    0.13311  -0.170    0.865    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 734.6 on 139 degrees of freedom
## Multiple R-squared:  0.1991, Adjusted R-squared:  0.1357 
## F-statistic: 3.142 on 11 and 139 DF,  p-value: 0.0008096
## 
## AIC and BIC values for the model:
##        AIC      BIC
## 1 2435.031 2474.256
checkresiduals(model1$model)

## 
##  Breusch-Godfrey test for serial correlation of order up to 15
## 
## data:  Residuals
## LM test = 139.03, df = 15, p-value < 2.2e-16

From the Model 1 summary and residual diagnostics we observe:

  • No lags are significant at 5% level.

  • Adjust R-squared is very low at 0.1357 which means it only explains 13.57% of the variability.

  • The p-value: 0.0008096 is < 0.05 therefore the model is significant.

  • Residual plot shows a trend in the series.

  • ACF plot indicates presence of a serial correlation in the residuals.

  • Histogram is not normally distributed.

  • Breusch-Godfrey test p-value < 0.05 therefore there is significant autocorrelation remaining in the residuals.

VIF.model1 = vif(model1$model)
VIF.model1
##      x.t      x.1      x.2      x.3      x.4      x.5      x.6      x.7 
## 21.56171 58.40449 61.40224 61.79140 63.86995 67.40979 68.40573 71.60574 
##      x.8      x.9     x.10 
## 76.87451 77.94537 29.46896
VIF.model1 > 10
##  x.t  x.1  x.2  x.3  x.4  x.5  x.6  x.7  x.8  x.9 x.10 
## TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
  • The value of VIF for model 1 is greater than 10 therefore the effect of multicollinearity is high.

Polynomial DLM

model2 = polyDlm(x = as.vector(copper.ts), y = as.vector(asx.ts), q = 10, k = 2, show.beta = TRUE)
## Estimates and t-tests for beta coefficients:
##         Estimate Std. Error t value  P(>|t|)
## beta.0   0.09760    0.03120   3.130 2.14e-03
## beta.1   0.07150    0.01650   4.330 2.84e-05
## beta.2   0.04850    0.00916   5.300 4.44e-07
## beta.3   0.02860    0.01180   2.420 1.69e-02
## beta.4   0.01170    0.01580   0.741 4.60e-01
## beta.5  -0.00205    0.01730  -0.118 9.06e-01
## beta.6  -0.01270    0.01580  -0.806 4.22e-01
## beta.7  -0.02040    0.01170  -1.750 8.31e-02
## beta.8  -0.02490    0.00830  -3.000 3.18e-03
## beta.9  -0.02640    0.01530  -1.720 8.72e-02
## beta.10 -0.02480    0.02990  -0.829 4.09e-01
summary(model2)
## 
## Call:
## "Y ~ (Intercept) + X.t"
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -1180.62  -642.64   -40.32   616.63  1484.83 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept)  3.997e+03  2.088e+02  19.144  < 2e-16 ***
## z.t0         9.756e-02  3.119e-02   3.128  0.00212 ** 
## z.t1        -2.761e-02  1.802e-02  -1.532  0.12761    
## z.t2         1.537e-03  1.772e-03   0.868  0.38706    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 718.2 on 147 degrees of freedom
## Multiple R-squared:  0.1906, Adjusted R-squared:  0.1741 
## F-statistic: 11.54 on 3 and 147 DF,  p-value: 7.739e-07
checkresiduals(model2$model)

## 
##  Breusch-Godfrey test for serial correlation of order up to 10
## 
## data:  Residuals
## LM test = 138.14, df = 10, p-value < 2.2e-16

From the model 2 summary and residual diagnostics we observe:

  • No lags are significant at 5% level

  • Adjust R-squared is very low at 0.1741 which means it only explains 17.41% of the variability.

  • p-value:7.739e-07 < 0.05 therefore the model is significant.

  • Residual plot shows a trend in the series.

  • ACF plot indicates presence of a serial correlation in the residuals

  • Histogram is not normally distributed

  • Breusch-Godfrey test p-value is < 0.05 therefore there is significant autocorrelation remaining in the residuals.

VIF.model2 = vif(model2$model)
VIF.model2
##      z.t0      z.t1      z.t2 
##  121.4442 1131.9986  565.1003
VIF.model2 > 10
## z.t0 z.t1 z.t2 
## TRUE TRUE TRUE
  • The value of VIF for model 2 is greater than 10 therefore the effect of multicollinearity is high.

Koyck DLM

model3 = koyckDlm(x = as.vector(copper.ts), y = as.vector(asx.ts))
summary(model3)
## 
## Call:
## "Y ~ (Intercept) + Y.1 + X.t"
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -689.64 -108.62   12.78  140.20  771.79 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 189.368812  87.644648   2.161   0.0322 *  
## Y.1           0.971621   0.021895  44.376   <2e-16 ***
## X.t          -0.005864   0.009517  -0.616   0.5387    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 201.9 on 157 degrees of freedom
## Multiple R-Squared: 0.9485,  Adjusted R-squared: 0.9479 
## Wald test:  1448 on 2 and 157 DF,  p-value: < 2.2e-16 
## 
## Diagnostic tests:
## NULL
## 
##                             alpha         beta       phi
## Geometric coefficients:  6672.885 -0.005863623 0.9716211
checkresiduals(model3)
##           2           3           4           5           6           7 
## -253.202914  -30.610848   23.082621  -86.477237  -75.025302   12.803618 
##           8           9          10          11          12          13 
##    5.298155 -114.678300   18.261437 -170.880048   24.533185 -103.752494 
##          14          15          16          17          18          19 
##    8.852679  -32.170263  -83.952475  -27.466232   -2.098674  -56.865123 
##          20          21          22          23          24          25 
##  -56.258419   41.535921   44.158599   92.935178   51.235104  771.792699 
##          26          27          28          29          30          31 
##  -32.861153  176.884448   95.956039 -253.719314   38.523936  -95.592640 
##          32          33          34          35          36          37 
##  104.053203   35.245022  240.940477  115.938747  189.540536  117.568097 
##          38          39          40          41          42          43 
##   66.356304  175.905107  205.263342  213.917574    3.463459  -86.583649 
##          44          45          46          47          48          49 
##   91.002511  365.530625  242.621700 -141.692507 -135.968325 -689.639612 
##          50          51          52          53          54          55 
##   -3.431458 -243.873540  262.447878  137.163954 -417.990992 -268.934588 
##          56          57          58          59          60          61 
##  161.681077 -584.660135 -677.835397 -364.478905  -80.335251 -247.606666 
##          62          63          64          65          66          67 
## -252.350187  161.705150  149.290705   12.444825   82.742609  255.096471 
##          68          69          70          71          72          73 
##  202.046722  229.415809 -110.296909   50.285608  152.562166 -293.406077 
##          74          75          76          77          78          79 
##   35.557299  228.407743  -64.382442 -392.363504 -153.655477  155.549369 
##          80          81          82          83          84          85 
##  -87.231932  180.025045   87.330525  -62.445827  167.511796    7.078568 
##          86          87          88          89          90          91 
##   79.904245   11.079317  -23.496061 -108.066932 -129.399854 -159.845072 
##          92          93          94          95          96          97 
## -139.488905 -316.487992  259.891585 -197.000699  -99.959552  189.269180 
##          98          99         100         101         102         103 
##   45.284433   16.731182   31.851697 -349.789770  -26.704157  126.361650 
##         104         105         106         107         108         109 
##   25.995248   48.492013  112.049456  -32.844966  132.156466  226.632804 
##         110         111         112         113         114         115 
##  216.382610 -139.689291  182.996258 -254.784471  112.830231 -266.261379 
##         116         117         118         119         120         121 
##  338.187556   90.458999  203.539204 -100.085239   42.550965 -142.702300 
##         122         123         124         125         126         127 
##  210.564995   -9.092880   70.895949    9.292441  -85.832876  246.174124 
##         128         129         130         131         132         133 
##   12.765403 -317.254300  208.671523 -200.700159   89.282101  160.744259 
##         134         135         136         137         138         139 
##  348.671923  -23.746229  -75.816805   12.622825 -314.981263  227.827780 
##         140         141         142         143         144         145 
## -457.665890 -174.081084  214.773110  -81.539022  112.319064 -299.473074 
##         146         147         148         149         150         151 
## -127.601504  183.995301  149.606796  120.822879 -144.947561  323.454909 
##         152         153         154         155         156         157 
## -115.940495   -8.962756 -127.629175   95.901847  216.671093  -37.428029 
##         158         159         160         161 
##   92.511097  151.071498   55.297228 -174.052323

## 
##  Ljung-Box test
## 
## data:  Residuals
## Q* = 6.2327, df = 10, p-value = 0.7953
## 
## Model df: 0.   Total lags used: 10

From the model 3 summary and Residual diagnostics we observe:

  • Independent variable X.t is not significant at 0.05 level.

  • Adjust R-squared is high at 0.9479 which means it explains 94.79% of the variability.

  • The p-value: 2.2e-16 < 0.05 therefore the model is significant.

  • The mean of the residuals is close to zero and there is no significant correlation in the residuals series.

  • ACF plot indicates no presence of a serial correlation in the residuals.

  • Histogram is slightly skewed but suggests normal distribution.

VIF.model3 = vif(model3$model)
VIF.model3
##      Y.1      X.t 
## 1.493966 1.493966
VIF.model3 > 10
##   Y.1   X.t 
## FALSE FALSE
  • The value of VIF for model 3 is less than 10 therefore the effect of multicollinearity is low.

ARDLM

for(i in 1:5){
  for(j in 1:5){
    model4 = ardlDlm(x = as.vector(gold.ts)+as.vector(copper.ts), y = as.vector(asx.ts), p = i, q = j)
    cat("p = ", i, "q = ", j, "AIC = ", AIC(model4$model), "BIC = ", BIC(model4$model), "\n")
  }
}
## p =  1 q =  1 AIC =  2150.525 BIC =  2165.901 
## p =  1 q =  2 AIC =  2137.999 BIC =  2156.412 
## p =  1 q =  3 AIC =  2123.806 BIC =  2145.244 
## p =  1 q =  4 AIC =  2112.35 BIC =  2136.8 
## p =  1 q =  5 AIC =  2101.551 BIC =  2129 
## p =  2 q =  1 AIC =  2132.389 BIC =  2150.802 
## p =  2 q =  2 AIC =  2134.313 BIC =  2155.796 
## p =  2 q =  3 AIC =  2121.47 BIC =  2145.971 
## p =  2 q =  4 AIC =  2109.799 BIC =  2137.305 
## p =  2 q =  5 AIC =  2099.102 BIC =  2129.6 
## p =  3 q =  1 AIC =  2119.28 BIC =  2140.718 
## p =  3 q =  2 AIC =  2121.276 BIC =  2145.777 
## p =  3 q =  3 AIC =  2121.607 BIC =  2149.17 
## p =  3 q =  4 AIC =  2110.363 BIC =  2140.925 
## p =  3 q =  5 AIC =  2099.587 BIC =  2133.135 
## p =  4 q =  1 AIC =  2108.095 BIC =  2132.545 
## p =  4 q =  2 AIC =  2110.063 BIC =  2137.569 
## p =  4 q =  3 AIC =  2110.735 BIC =  2141.297 
## p =  4 q =  4 AIC =  2112.075 BIC =  2145.693 
## p =  4 q =  5 AIC =  2101.365 BIC =  2137.963 
## p =  5 q =  1 AIC =  2097.433 BIC =  2124.881 
## p =  5 q =  2 AIC =  2099.399 BIC =  2129.897 
## p =  5 q =  3 AIC =  2100.132 BIC =  2133.68 
## p =  5 q =  4 AIC =  2101.569 BIC =  2138.167 
## p =  5 q =  5 AIC =  2103.364 BIC =  2143.013

AIC and BIC are the lowest at p=5 and q=1

model4 = ardlDlm(x = as.vector(gold.ts)+as.vector(copper.ts), y = as.vector(asx.ts), p = 5, q = 1)
summary(model4)
## 
## Time series regression with "ts" data:
## Start = 6, End = 161
## 
## Call:
## dynlm(formula = as.formula(model.text), data = data, start = 1)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -657.92 -105.84   -0.14  126.82  754.76 
## 
## Coefficients:
##               Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 224.844798  92.160670   2.440   0.0159 *  
## X.t           0.069046   0.034666   1.992   0.0482 *  
## X.1          -0.006477   0.054772  -0.118   0.9060    
## X.2          -0.021511   0.055253  -0.389   0.6976    
## X.3          -0.018254   0.055259  -0.330   0.7416    
## X.4          -0.016303   0.054797  -0.298   0.7665    
## X.5          -0.011201   0.034154  -0.328   0.7434    
## Y.1           0.962947   0.021548  44.689   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 194.9 on 148 degrees of freedom
## Multiple R-squared:  0.9485, Adjusted R-squared:  0.946 
## F-statistic: 389.1 on 7 and 148 DF,  p-value: < 2.2e-16
checkresiduals(model4$model)

## 
##  Breusch-Godfrey test for serial correlation of order up to 11
## 
## data:  Residuals
## LM test = 6.2206, df = 11, p-value = 0.8582

From the Model 4 summary and residual diagnostics we observe:

  • No lags are significant at 5% level.

  • Adjust R-squared is high at 0.946 which means it may explains 94.6% of the variability.

  • The p-value: 2.2e-16 is < 0.05 therefore the model is significant.

  • The mean of the residuals is close to zero and there is no significant correlation in the residuals series

  • ACF plot indicates no presence of a serial correlation in the residuals.

  • Histogram is not normally distributed.

  • Breusch-Godfrey test p-value 0.8582 is > 0.05 therefore there is no significant autocorrelation remaining in the residuals.

VIF.model4 = vif(model4$model)
VIF.model4
##       X.t L(X.t, 1) L(X.t, 2) L(X.t, 3) L(X.t, 4) L(X.t, 5) L(y.t, 1) 
## 24.431847 63.075733 66.339513 68.401097 69.191619 27.628706  1.366876
VIF.model4 > 10
##       X.t L(X.t, 1) L(X.t, 2) L(X.t, 3) L(X.t, 4) L(X.t, 5) L(y.t, 1) 
##      TRUE      TRUE      TRUE      TRUE      TRUE      TRUE     FALSE
  • The value of VIF for model 4 is greater than 10 therefore the effect of multicollinearity is high.

Conclusion

Koyck DLM stands out as the most suited model for forecasting the ASX all Oridinaries (Ords) Price Index. This selection is justified by its high R-squared value of 0.9479, denoting its ability to explain 94.79% of the variability. Additionally, The residual series plot and acf of the residual suggest no sign of significant correlation in the series. The model also demonstrates low multicollinearity effect. Most importantly, the p-value is < 0.05 therefore the model is significant.