0-1
Vector Time Series Model Representations and Analysis with XploRe
Julius Mungo
CASE - Center for Applied Statistics and Economics Humboldt-Universit¨ at zu Berlin [email protected]
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
Motivation 1-1
Multiple time series analysis approach involves a frame work for analyzing time series systems and the possible cross relationships among its levels.
Modelling such systems entails investigating whether
some variables in the system have a tendency to lead others.
there is feedbacks between the variables, the question of contemporaneous movements, impulses (shocks, innovations) transfer from one time series to another
1.5
Motivation 1-2
The modelling procedure in XploRe uses the quantlet library MulTi to model a system of multiple time series.
how XploRe MulTi is used to empirically investigate and modell various MTS systems.
attention is on Vector Autoregressive (VAR) and the Vector Equilibrium Correction (ECM) models representations and modelling.
Granger & Newbold ( 1986)
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
Motivation 1-3
Outline
1. Motivation X
2. XploRe Quantlib MulTi
3. Modelling Time Dependent Factor Loadings from a DSFM for IV String Dynamics 4. Summary
5. References
1.5
XploRe Quantlib MulTi 2-1
MulTiplot.xpl
Generates a MTS plot from a k-dimensional time series data, allowing for the series transformation, with graphics, plots and their properties to be investigated
MulTiplot01.xpl
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
XploRe Quantlib MulTi 2-2
MulTifr.xpl
For general analysis of the Full VAR Model; VAR order selection criteria, parameter estimation, Residual Analysis, Structural Analysis and Forecasting.
MulTifr02.xpl
1.5
XploRe Quantlib MulTi 2-3
MulTiira.xpl
For VAR impulse response analysis
1 l i b r a r y
(" m u l t i ")
2
x =
r e a d(" mts . dat ")3 M u l T i i r a
( x’ ,4 ," M "|" Y "|" I ")
MulTiira01.xpl
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
XploRe Quantlib MulTi 2-4
MulTirr.xpl
For Reduced Rank VAR analysis MulTiss.xpl
General analysis for a Subset VAR Model MulTici.xpl
General analysis for cointegration
1.5
VAR modelling with XpLoRe 3-1
VAR modelling
XploRe specifies a k-dimensional VAR(p) model of the form Y
t= υ + A
1Y
t−1+ A
2Y
t−2+, . . . , +A
pY
t−p+ ε
t(1)
Y
t= (Y
1t, . . . , Y
kt)
>are observable vectors of k endogenous variables
υ = (υ
1, . . . , υ
k)
>is a vector of intercept terms, A
iare (K × K ) coefficient matrices
ε
tis a white noise with covariance matrix Σ
ε> 0
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
Modelling Time Dependent Factor Loadings 4-1
Modelling Time Dependent Factor Loadings from a DSFM for IV String Dynamics
The DSFM is represented by Y
i ,j= m
o(X
i ,j) +
l
X
l =1
β
i ,lm
l(X
i ,j) +
i ,jm
lare smooth basis function (l = 0, 1, . . . , L) X
i ,jare two dimensional covariables
β
i ,lare weights of m
ldepending on time i
β
i= (β
i ,1, β
i ,2, . . . , β
i ,L)
>tform an observed MTS (Fengler et al (2004))
1.5
Time series plots for the beta coeff. series (1999 - 2003)
MTSplot.xpl
Beta1 coeff. time plot
1999 2000 2001 2002 2003
time
0.511.5
number sold(thousands)
Beta2 coeff. time plot
1999 2000 2001 2002 2003
time
-0.3-0.2-0.100.1
number sold(thousands)
Beta3 coeff. time plot
1999 2000 2001 2002 2003
time
-10-50510
number sold(thousands)*E-2
Modelling Time Dependent Factor Loadings 4-3
Min. Max. Mean Median Stdd. Skewn. Kurt.
beta1 0.45 1.53 1.16 1.30 0.25 -0.820 2.69 beta2 -0.28 0.10 0.00 0.00 0.03 -0.25 6.94 beta3 -0.10 0.13 0.00 0.00 0.03 0.93 5.4
Table 1: Summary statistics for Beta coeff. series
beta1 beta2 beta3 beta1 1 -0.64 -0.05
beta2 1 -0.00
beta3 1
Table 2: Contemp. correlation
Betasummary.xpl
1.5
Modelling Time Dependent Factor Loadings 4-4
Betadensity.xpl Kernel density (Epanechnikov, h = 0.0815) and boxplot for levels
Distribution: Beta1
0.5 1X 1.5
0.511.5
Y 00.51
X
0.5 1 1.5
Y
Distribution: Beta2
-0.2 -0.1 0 0.1
X
0510
Y 00.51
X
-0.2 -0.1 0 0.1
Y
Distribution: Beta3
-10 -5 0X*E-2 5 10
051015
Y 00.51
X
-10 -5 0 5 10
Y*E-2
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
Modelling Time Dependent Factor Loadings 4-5
0.5 1 1.5 2
X
0.511.52
Y
-0.3 -0.2 -0.1 0 0.1
X
-0.2-0.100.1
Y
-10 -5 0 5 10 15
X*E-2
-10-50510
Y*E-2
Figure 1: Q-Q plots of the normal against the emprical quanttiles for the Beta series
1.5
Modelling Time Dependent Factor Loadings 4-6
preanalysBetas.xpl
Sample autocorrelation function (acf)
0 5 10 15 20 25 30
lag
00.51
acf
Sample partial autocorrelation function (pacf)
5 10 15 20 25 30
lag
00.51
pacf
Sample autocorrelation function (acf)
0 5 10 15lag 20 25 30
00.51
acf
Sample partial autocorrelation function (pacf)
5 10 15lag 20 25 30
00.20.40.60.8
pacf
Sample autocorrelation function (acf)
0 5 10 15 20 25 30
lag
00.51
acf
Sample partial autocorrelation function (pacf)
5 10 15 20 25 30
lag
00.5
pacf
Figure 2: ACF and PACF of levels
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
Modelling Time Dependent Factor Loadings 4-7
Testing β
ilevels for random walk
Coeff. Test Deterministic lags testvalue asymptotic crit. values
term (David & Mackinnon, (1993))
1% 5% 10%
Beta1 ADF constant 1 -2.41 -3.44 -2.86 -2.57
2 -2.24 -3.44 -2.86 -2.57
3 -2.32 -3.44 -2.86 -2.57
7 -2.05 -3.44 -2.86 -2.57
Beta2 ADF constant 1 -6.01 -3.44 -2.86 -2.57
2 -5.01 -3.44 -2.86 -2.57
3 -4.58 -3.44 -2.86 -2.57
4 -4.21 -3.44 -2.86 -2.57
5 -4.03 -3.44 -2.86 -2.57
7 -3.62 -3.44 -2.86 -2.57
Beta3 ADF constant 1 -3.49 -3.44 -2.86 -2.57
2 -3.32 -3.44 -2.86 -2.57
7 -2.87 -3.44 -2.86 -2.57
8 -2.85 -3.44 -2.86 -2.57
Table 3: ADF-Test of unitroot for levels series
1.5
Modelling Time Dependent Factor Loadings 4-8
coeff. lag test statistic crit. values
(Kwiaskowski, (1992))
1% 5% 10%
Beta1 1 const 16.38 0.347 0.463 0.739
2 10.98 0.347 0.463 0.739
3 8.28 0.347 0.463 0.739
7 4.22 0.347 0.463 0.739
Beta2 1 const 29.95 0.347 0.463 0.739
2 15.13 0.347 0.463 0.739
3 11.61 0.347 0.463 0.739
4 9.46 0.347 0.463 0.739
5 8.00 0.347 0.463 0.739
7 6.16 0.347 0.463 0.739
Beta3 1 const 9.61 0.347 0.463 0.739
2 6.47 0.347 0.463 0.739
7 2.52 0.347 0.463 0.739
8 2.25 0.347 0.463 0.739
Table 4: KPSS-Test of stationarity for levels series
unitrootest.xpl
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
Modelling Time Dependent Factor Loadings 4-9
Modelling Beta series Results:
At 1% significant level, unit root exist for Beta1 and beta3 at all lags considered
Beta2 indicates of some kind of misspecification
Beta3 do not reject at 1% level, unit-root null hypothesis.
Even at 5% or 10%, rejecting unit root will be marginal.
KPSS clearly rejects its null hypothesis of stationarity around a constant
1.5
Modelling Time Dependent Factor Loadings 4-10
coeff. shift suggested test statistic crit. values (Lanne et, al(2001)) function break date
(shift dummy ) 1% 5% 10%
Beta1 2001.11.06 -1.58 -3.48 -2.88 -2.58
Beta2 2001.11.06 -1.05 -3.48 -2.88 -2.58
Beta3 1999.06.10 -3.20 -3.48 -2.88 -2.58
Table 5: Unitroot-Test of stationarity for levels series in the presence of structural break
We specify a stationary model with first differences and consider fitting an VAR model,
X
t= (∆Beta1, ∆Beta2, ∆Beta3)
>and determine the autoregressive order for the model
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
Modelling Time Dependent Factor Loadings 4-11
’Beta’ Time Series Plot
1999 2000 2001 2002 2003
X
-0.3-0.2-0.100.10.20.3
Y
Figure 3: First difference plot of Beta series
1.5Modelling Time Dependent Factor Loadings 4-12
Order Selection Criteria
Final Prediction Error FPE (n) =
T + kn + 1 T − kn − 1
k
det(Xˆ
ε(n)) Akaike Information Criterion
AIC = ln Xˆ
ε(n)
+2(the number of freely estimated parameters) T
= ln Xˆ
ε(n) +2nK2
T Schwarz Information Criterion
SIC = ln Xˆ
ε(n) +lnT
T nK2 Hannan-Quinnn Information Criterion
HQ = ln Xˆ
ε(n)
+2ln(lnT ) T nK2
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
Modelling Time Dependent Factor Loadings 4-13
order ln(FPE) AIC HQ SC
0 -24.35 -24.35 -24.35 -24.35 1 -24.62 -24.62 -24.60 -24.58 2 -24.67 -24.67 -24.64 -24.59 3 -24.69 -24.69 -24.65 -24.56 4 -24.69 -24.69 -24.63 -24.52 5 -24.60 -24.69 -24.61 -24.47 6 -24.71 -24.72 -24.61 -24.45 7 -24.70 -24.71 -24.59 -24.41 8 -24.69 -24.70 -24.57 -24.36 We choose to apply the order 3 as indicated by HQ.
HQ and HC have been justified as consistent, (see, Paulsen(1984) and Tsay(1984))
1.5
Modelling Time Dependent Factor Loadings 4-14
VAR estimates (OLS) with t-values in parenthesis
2 4 ∆Beta1t
∆Beta2t
∆Beta3t 3
5 =
2
4 0.12(3.24) 0.19(2.30) −0.06(−0.40)
−0.09(6.35) 0.07(−17.17) −0.07(1.03) 0.02(2.25) 0.02(1.42) −0.26(−8.24)
3 5 2
4 ∆Beta1t−1
∆Beta2t−1
∆Beta3t−1 3 5
+ 2
4 −0.09(−2.40) −0.04(−0.79) 0.11(0.64)
−0.03(−1.58) −0.04(7.94) −0.05(−0.66) 0.00(−0.63) 0.00(0.16) −0.06(−1.89)
3 5 2
4 ∆Beta1t−2
∆Beta2t−2
∆Beta3t−2 3 5
+ 2
4 −0.02(−0.58) −0.13(−1.53) 0.14(+0.83) 0.00(+0.03) −0.12(−3.42) −0.02(−0.26)
−0.01(−0.53) −0.02(−1.36) −0.05(−1.52) 3 5 2
4 ∆Beta1t−3
∆Beta2t−3
∆Beta3t−3 3 5
+ 2 4 εˆ1,t
ˆ ε2,t ˆ ε3,t
3 5
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
Modelling Time Dependent Factor Loadings 4-15
Covariance matrix of residuals
Σ ˆ
ε=
+1.58 −0.35 −0.07
−0.35 +0.36 −0.01 +0.07 −0.01 +0.06
Correlation matrix of residuals
Corr (ε ˆ
t) =
1.00 −0.46 +0.23 +1.00 −0.12 +1.00
The correlation matrix indicates that there is some
contemporaneous correlation structure in the residual vector.
Not all elements of the parameter matrices are significantly different from zero.
Especially the coefficients for ∆Beta1
t−3.
1.5
Modelling Time Dependent Factor Loadings 4-16
Model Validation
(i ) Multivariate Portmanteau test for autocorrelation H
0: E (ε
tε
>t−i) = 0, i = 1, . . . , h
H
1: at least one autocovariance (autocorrelation) is non zero Test statistic: (Ljung & Box (1978))
Q
p∗= T
2h
X
i =1
1 T − i tr n
C
iC
0−1C
i>C
0−1o
∼ χ
2k2(h−p)C
i= T
−1T
X
t=i +1
ε
tε
>t−iC
0and C
iare the contemporaneous correlations and autocovariance of residuals respectively
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
Modelling Time Dependent Factor Loadings 4-17
(ii ) Testing for ARCH effects
Test for neglected conditional heteroscedasticity (ARCH) based on fitting ARCH(q) model to the estimated residuals.
ˆ
ε
2t= β
0+ β
1ε ˆ
2t−1+ · · · + β
qε ˆ
2t−q+ error
tH
0: β
1= · · · = β
q= 0, (no ARCH effects) H
1: β
16= 0 or . . . or β
q6= 0
1.5
Modelling Time Dependent Factor Loadings 4-18
Lagrange Multiplier (LM) statistic: (see, Engle (1982)) ARCH
LM= 1
2 ε ˆ
>tε ∼ χ ˆ
2qThe R
2form, test statistic:
T R
2∼ χ
2qR
2is the squared multiple R
2value of the regression of ˆ ε
2ton an intercept and q lagged values of ˆ ε
2tARCHtest.xpl
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
Modelling Time Dependent Factor Loadings 4-19
(iii ) Testing for Nonnormality
H
0: E (µ
st)
3= 0 & E (µ
st)
3= 0 H
1: E (µ
st)
36= 0 & E (µ
st)
36= 0 Test statistic: (Jarque and Bera (1987))
JB = T 6 T
−1T
X
t=1
(ˆ µ
st)
3!
2+ T 24 T
−1T
X
t=1
(ˆ µ
st)
4− 3
!
2The test displays the χ
2-statistics associated with the skewness and kurtosis of the standardized residuals for testing nonnormality.
1.5
Modelling Time Dependent Factor Loadings 4-20
Test Q
3∗JB
3MARCH
LM(3) Test statistic 188.39 15.49 980.39
p-value 0.02 0.00 0.00
Table 6: Diagnostic tests for AR(3) models
The tests hypothesis is rejected for p-values smaller than 0.05.
Results show some autocorrelation in the residuals and the presence of heteroscedastic effects in the conditional variance.
We therefore maintain that there is some ARCH effects in model residuals.
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y
Summary 5-21
Summary
Testing for ARCH effects reveal neglected conditional
heteroscedasticity. This gives an indication of fitting an ARCH or ARCH type model.
Observing that not all elements of the estimated VAR parameter matrices are significantly different from zero, we could choose a subset VAR model where single elements of the estimated coefficient matrices are restricted to zero.
1.5
References 6-22
References
G.C Reinsel
Elements of Multivariate Time Series Anylysis.
Springer Verlag, New York, 1993.
W. H¨ ardle, Z. Hl´ avka and S. Klinke XploRe Application Guide
Springer-Verlag, Heidelberg, 2000.
H. L¨ utkepohl
Introduction to Multiple Time Series Analysis.
Springer Verlag,1993.
K. Patterson
An Introduction to Applied Econometrics a time series approach.
Macmillan Press Ltd, 2000.
XploRe MulTi
1999 2000 2001 2002 2003X
00.511.5
Y