Liu Xinyi Thesis A New Markov Switching Volatility Model
1. A New Hidden Markov-Switching Volatility
Model
Oct/2008
in partial fulfillment of the requirements for the degree of
Doctor of Philosophy in Economics
Nanyang Technological University
Author Liu Xinyi
Division of Economics, the School of Humanity and Social Science
Thesis Supervisor Wang Peiming
2. Abstract: The thesis proposes and applies a two-state hidden Markov-switching model for
financial time series featured with periodic structure breaks in volatility. The expected return,
volatility and state transition probability are determined by three link functions respectively,
whose coefficients are further governed by the hidden state. The proposed model particularly
emphasizes on the parallel structure of the two states. The parallel structure separates the
INTER-state and INTRA-state dynamics, enhances greater transparency, balances the
memory of both recent and distant history, provides more consistent economic implication,
and greatly simplifies and stabilizes the EM algorithm. We further discuss its estimation,
inference, standard errors of the parameter estimate, forecasting, model selection and
implementation, especially our innovations in those issues. The Monte Carlo experiments
suggest that the proposed estimation method is accurate and reliable, the choice of the initial
state probability has little effect on proposed model, and the information matrix calculated
numerically is stable and reliable.
We then apply the proposed model to forecast the conditional distribution of the weekly
return of the S&P 500 index. It is found that the volatility at the tranquil state is best
described as a constant while the volatility at the turbulent state is more closely correlated
with the lagged intraweek ranges. Eventually, we give the economic implication on the
clustered volatility and its interplay with the expected return.
KEYWORDS: HIDDEN MARKOV-SWITCHING MODEL, PARALLEL STRUCTURE,
VOLATILITY, LINK FUNCTION, EM ALGORITHM, FORWARD-BACKWARD
ALGORITHM, RESCALING, INFORMATION MATRIX OF THE MISSING DATA,
SUPPLEMENTED EM ALGORITHM, RANGE.
2
3. LIST OF TABLES ............................................................................................................ 7
0 18
7
LIST OF FIGURES .......................................................................................................... 8
1 19
7
LIST OF ABBREVIATIONS ......................................................................................... 10
2 10
8
LIST OF SYMBOLS...................................................................................................... 12
3 11
8
4 1. INTRODUCTION.................................................................................................................. 15 12
8
1.1. Volatility Observations ................................................................................................................... 15
5 13
8
1.2. Motivations and Oversights ........................................................................................................... 18
6 14
8
1.3. Thesis Contributions ...................................................................................................................... 21
7 15
8
1.3.1. Addressing the observations .................................................................................................................... 21
8 16
8
1.3.2. Addressing the Oversights ....................................................................................................................... 22
9 17
8
1.3. Thesis Outline ................................................................................................................................ 24
1
0 18
8
1
1 2. THE PROPOSED HIDDEN MARKOV-SWITCHING VOLATILITY MODEL .................. 27 19
8
2.1. Model Overview............................................................................................................................. 27
1
2 10
9
2.3. Special cases and relationships with existing models .................................................................... 31
1
3 11
9
2.4. The link functions .......................................................................................................................... 33
1
4 12
9
2.5. The likelihood function .................................................................................................................. 34
1
5 13
9
2.6. Initial state probabilities ................................................................................................................. 34
1
6 14
9
1
7 3. LITERATURE REVIEW AND MODEL COMPARISONS................................................... 36 15
9
3.1. Hidden Markov-switching model: A brief history.......................................................................... 37
1
8 16
9
3.2. Seminal work on HMM in Econometrics....................................................................................... 37
1
9 17
9
3.3. Prominent volatility models ........................................................................................................... 39
2
0 18
9
3.3.1. The i.i.d. mixture distribution .................................................................................................................. 39
2
1 19
9
3.3.2. Classic [G]ARCH models ....................................................................................................................... 41
2
2 20
0
3.3.3. [G]ARCH with mixture normal innovation ............................................................................................. 44
2
3 21
0
3.3.4. Regime-switching volatility models ........................................................................................................ 45
2
4 22
0
3.4. Two classes of popular Markov-switching [G]ARCH approaches ................................................ 49
2
5 23
0
3.4.1. The Hamilton/Gray/Klaassen approach ................................................................................................... 49
2
6 24
0
3.4.1.2. Non-parallel structure and potential limitations ............................................................................... 55
2
7 25
0
3
4. 3.4.2. The Haas, Mittnik and Paolella approach ................................................................................................ 60
2
8 26
0
3.4.2.1 Model Overview ............................................................................................................................... 60
2
9 27
0
3.4.2.2. Improvements/Limitations ............................................................................................................... 62
3
0 28
0
3.5. Strengths of the proposed parallel hidden Markov-switching volatility model.............................. 65
3
1 29
0
3.6. HMM empirical studies.................................................................................................................. 69
3
2 20
1
3.6.1. Business Cycles....................................................................................................................................... 70
3
3 21
1
3.6.2. Interest Rates and Yield Curves............................................................................................................... 70
3
4 22
1
3.6.3. Foreign Exchange Rates .......................................................................................................................... 71
3
5 23
1
3.6.4. Stock Index.............................................................................................................................................. 72
3
6 24
1
3.6.5. Default probabilities and credit spread .................................................................................................... 74
3
7 25
1
3.6.6. Commodity Prices ................................................................................................................................... 75
3
8 26
1
4. MODEL ESTIMATION AND FORECAST........................................................................... 77
3
9 27
1
4.1. The EM algorithm .......................................................................................................................... 78
4
0 28
1
4.1.1. Overview ................................................................................................................................................. 78
4
1 29
1
4.1.2. The E-Step ............................................................................................................................................... 80
4
2 20
2
4.1.3. The parallel M-Step ................................................................................................................................. 84
4
3 21
2
4.1.4. Algorithm Summary ................................................................................................................................ 87
4
4 22
2
4.2. The quasi-Newton algorithm.......................................................................................................... 89
4
5 23
2
4.3. A hybrid approach .......................................................................................................................... 91
4
6 24
2
4.4. Standard errors of the estimated parameters .................................................................................. 93
4
7 25
2
4.4.1. Information matrix by numerical difference ............................................................................................ 93
4
8 26
2
4.4.2. The Supplemented EM algorithm............................................................................................................ 95
4
9 27
2
4.4.3. Parametric bootstrap ................................................................................................................................ 99
5
0 28
2
4.5. Monte Carlo experiments ............................................................................................................. 100
5
1 29
2
4.5.1. Objectives.............................................................................................................................................. 100
5
2 20
3
4.5.2. The choice of covariate and “true” coefficients ..................................................................................... 100
5
3 21
3
4.5.3. Experiment 1: Flat initial state probabilities .......................................................................................... 105
5
4 22
3
4.5.4. Experiment 2: Stochastic initial state probabilities ................................................................................ 107
5
5 23
3
4.5.5. Results and Observations....................................................................................................................... 108
5
6 24
3
4.6. Forecasting with HMS-V ............................................................................................................. 114
5
7 25
3
5. APPLICATION & EMPIRICAL STUDY ............................................................................ 116
5
8 26
3
5.1. Choice of covariate ...................................................................................................................... 117
5
9 27
3
4
5. 5.1.1. Range vs. observable range .................................................................................................................... 117
6
0 28
3
5.1.2. Forecasting range.................................................................................................................................... 119
6
1 29
3
5.2. Data .............................................................................................................................................. 119
6
2 20
4
5.3. Model selection criteria................................................................................................................ 120
6
3 21
4
5.3.1. Likelihood ratio test............................................................................................................................... 121
6
4 22
4
5.3.2. AIC and BIC.......................................................................................................................................... 121
6
5 23
4
5.3.3. MSE, MAD and integrated volatility..................................................................................................... 122
6
6 24
4
5.3.5. The c.d.f. of out-of-sample forecast....................................................................................................... 126
6
7 25
4
5.4. HMS-V without covariate: Bull vs. bear, a qualitative assessment .............................................. 127
6
8 26
4
5.5. HMS-V with covariates: Quantitative fine-tuning ....................................................................... 131
6
9 27
4
5.5.1. Link functions and covariates................................................................................................................ 131
7
0 28
4
5.5.2. Time varying sensitivity to recent shocks.............................................................................................. 133
7
1 29
4
5.6. Model Comparisons (empirical study) ......................................................................................... 146
7
2 20
5
5.6.1. Comparison with single regime models................................................................................................. 146
7
3 21
5
5.6.1.1. Comparison using statistical loss functions.................................................................................... 146
7
4 22
5
5.6.1.2. Comparison by closer examinations of two episodes..................................................................... 148
7
5 23
5
5.6.2. Comparison with MS-GARCH.............................................................................................................. 159
7
6 24
5
5.6.3. Summary ............................................................................................................................................... 164
7
7 25
5
6. ECONOMIC IMPLICATION OF THE EMPIRICAL STUDIES.......................................................... 172
7
8 26
5
6.1. Asymmetric business cycle, velocity of time and alternative time scales .................................... 172
7
9 27
5
6.2. Recursive loop of expectation and realization, self-reinforcing or self-correcting ...................... 176
8
0 28
5
6.3. Asymmetric surprises, sensitivities, correlations and risk premia................................................ 178
8
1 29
5
6.3.1. Fewer surprises at the tranquil state....................................................................................................... 179
8
2 20
6
6.3.2. More surprises at the turbulent state ...................................................................................................... 182
8
3 21
6
6.3.3. Greater sensitivity at the turbulent state................................................................................................. 184
8
4 22
6
6.3.4. Increased equity return correlation at the turbulent state ....................................................................... 188
8
5 23
6
6.3.5. Greater risk premia requested by the investor at the turbulent market................................................... 189
8
6 24
6
7. THESIS SUMMARY ................................................................................................................ 190
8
7 25
6
ADDITIONAL TABLES ......................................................................................................... 192
8
8 26
6
ADDITIONAL FIGURES........................................................................................................ 194
8
9 27
6
APPENDIX I............................................................................................................................ 197
9
0 28
6
App1.1. The property of the mixture regression ................................................................................. 197
9
1 29
6
5
7. LIST OF TABLES
0
14
0 Table 1 ................................................................................................................................................... 54 22
8
Comparison between Gray’s (1996) and Klaassen’s (2002) model
15
0 Table 2 ................................................................................................................................................. 110
23
8
The result of the Monte Carlo study 1 with fixed flat initial state probabilities
16
0 Table 3 ................................................................................................................................................. 11124
8
The result of the Monte Carlo study 1 with fixed flat initial state probabilities, additional check
17
0 Table 4 ................................................................................................................................................. 112
25
8
Monte Carlo study 2 with random initial state probabilities
18
0 Table 5 ................................................................................................................................................. 113
26
8
Monte Carlo study 2 with random initial state probabilities, additional check
19
0 Table 6 ................................................................................................................................................. 120
27
8
Descriptive statistics of the weekly percentage returns and the percentage observed intraweek ranges
10
1 Table 7 ................................................................................................................................................. 128
28
8
The regression result of the HMS-V model without covariate
11
1 Table 8 ................................................................................................................................................. 135
29
8
The regression result of the HMS-V model with covariate (Regression 02 and 03)
12
1 Table 9 ................................................................................................................................................. 136
20
9
The regression result of the HMS-V model with covariate (Regression 04 and 05)
13
1 Table 10 ............................................................................................................................................... 138
21
9
Sample ACFs and XCF, from May/13/ 1992 to Dec/06/1995
14
1 Table 11 ............................................................................................................................................... 139
22
9
Sample ACFs and XCF, from Jan/07/2004 to Jun/27/2007
15
1 Table 12 ............................................................................................................................................... 140
23
9
Sample ACFs and XCF, from January 08, 1997 to June 02, 2003
16
1 Table 13 ............................................................................................................................................... 147
24
9
Comparison with single regime GARCH models
17
1 Table 14 ............................................................................................................................................... 153
25
9
Comparison of HMS-V and GARCH-T, a closer look at Oct/07/1987 to Mar/02/1988
18
1 Table 15 ............................................................................................................................................... 157
26
9
Comparison of HMS-V and GARCH-T, a closer look at Jul/18/2007 to Nov/21/2007
19
1 Table 16 ............................................................................................................................................... 162
27
9
Comparison of HMS-V and MS-GARCH, a closer look at Oct/07/1987 to Mar/02/1988
10
2 Table 17 ............................................................................................................................................... 163
28
9
Comparison of HMS-V and MS-GARCH, a closer look at Jul/18/2007 to Nov/21/20
11
2 Table 18 ............................................................................................................................................... 193
29
9
The SEM algorithm and the comparison with other models
12
2 Table 19 ............................................................................................................................................... 225
30
0
Descriptive statistics of the percentage observed intraweek ranges
13
2 Table 20 ............................................................................................................................................... 233
31
0
Adding lagged terms of squared return hardly improves the goodness-of-fit of log range
7
8. LIST OF FIGURES
1
14
2 Figure 1 ................................................................................................................................................. 40
32
0
p.d.f. of MixN with different parameter settings
15
2 Figure 2 ................................................................................................................................................. 47
33
0
Simulated time series with structure breaks
16
2 Figure 3 ................................................................................................................................................. 48
34
0
Standard deviation estimated by GARCH (1,1)
17
2 Figure 4 ................................................................................................................................................. 55
35
0
INTER-state and INTRA-state dynamics of Hamilton/Gray/Klaassen (when the underlying hidden state is known)
18
2 Figure 5 ................................................................................................................................................. 57
36
0
Gray/Klaassen Model (when the underlying process is unknown and has to be estimated)
19
2 Figure 6 ................................................................................................................................................. 61
37
0
INTER-state and INTRA-state dynamics of Haas/Mittnik/Paolella (2004b), (when the underlying hidden state is known)
10
3 Figure 7 ................................................................................................................................................. 63
38
0
Haas, Mittnik, and Paolella’s (2004b) (when the underlying process is unknown and has to be estimated)
11
3 Figure 8 ................................................................................................................................................. 67
39
0
The proposed model (when the underlying process is unknown and has to be estimated)
12
3 Figure 9 ................................................................................................................................................. 92
30
1
Summarization of the hybrid EM and quasi-Newton approach
13
3 Figure 10 ............................................................................................................................................. 101
31
1
The VIX index by CBOE from Jan/02/1990 to Sep/15/2006
14
3 Figure 11 ............................................................................................................................................. 101
32
1
The Fed Target rate from Jan/02/1990 to Sep/15/2006
15
3 Figure 12 ............................................................................................................................................. 103
33
1
Simulated time series, the “true” standard deviations at each state
16
3 Figure 13 ............................................................................................................................................. 104
34
1
Simulated time series, the “true” state transition probabilities at each state
17
3 Figure 14 ............................................................................................................................................. 104
35
1
A representative simulated time series
18
3 Figure 15 ............................................................................................................................................. 105
36
1
A few real world time series
19
3 Figure 16 ............................................................................................................................................. 130
37
1
Regression 01, in-sample (HMS-V without covariate)
10
4 Figure 17 ............................................................................................................................................. 131
38
1
Regression 01, out-of-sample (HMS-V without covariate)
11
4 Figure 18 ............................................................................................................................................. 138
39
1
Sample ACFs and XCFs, from May/13/1992 to Dec/06/1995
12
4 Figure 19 ............................................................................................................................................. 139
30
2
Sample ACFs and XCFs, from Jan/07/2004 to Jun/27/2007
13
4 Figure 20 ............................................................................................................................................. 141
31
2
Sample ACFs and XCFs, from Jan/08/1997 to Jun/02/2003
14
4 Figure 21 ............................................................................................................................................. 143
32
2
Regression 05, in-sample, volatility at each state
15
4 Figure 22 ............................................................................................................................................. 143
33
2
Regression 05, in-sample, transition probability
16
4 Figure 23 ............................................................................................................................................. 144
34
2
Regression 05, in-sample, state probability and volatility
17
4 Figure 24 ............................................................................................................................................. 144
35
2
Regression 05, out-of-sample, volatility at each state
18
4 Figure 25 ............................................................................................................................................. 145
36
2
Regression 05, out-of-sample, transition probability
19
4 Figure 26 ............................................................................................................................................. 145
37
2
Regression 05, out-of-sample, state probability and volatility
10
5 Figure 27 ............................................................................................................................................. 149
38
2
Volatility forecasting using different methods, from Jan/05/1983 to Dec/26/2001
11
5 Figure 28 ............................................................................................................................................. 150
39
2
Volatility forecasting using different methods, from Dec/26/2001 to Nov/21/2007
8
9. Figure 29 ............................................................................................................................................. 154
12
5 30
3
Volatility forecasting using different methods, from Oct/07/1987 to Mar/02/1988
Figure 30 ............................................................................................................................................. 154
13
5 31
3
Volatility forecasting and state probability, HMS-V model, from Oct/07/1987 to Mar/02/1988
Figure 31 ............................................................................................................................................. 155
14
5 32
3
imitated mean forecasting by HMS-V and GARCH-T model, from Oct/07/1987 to Mar/02/1988
Figure 32 ............................................................................................................................................. 158
15
5 33
3
Volatility forecasting using different methods, from Jul/25/2007 to Nov/21/2007
Figure 33 ............................................................................................................................................. 158
16
5 34
3
Volatility forecasting and state probability, HMS-V model, from Jul/25/2007 to Nov/21/2007
Figure 34 ............................................................................................................................................. 159
17
5 35
3
imitated mean forecasting by HMS-V and GARCH-T model, from Jul/25/2007 to Nov/21/2007
Figure 35 ............................................................................................................................................. 174
18
5 36
3
Asymmetric business cycle, velocity of time and alternative time scales
Figure 36 ............................................................................................................................................. 178
19
5 37
3
A self-reinforcing or a self-defeating tranquil state
Figure 37 ............................................................................................................................................. 186
10
6 38
3
The sharp decline in price and rising volatility are self-reinforcing
Figure 38 ............................................................................................................................................. 187
11
6 39
3
De-leverage process for the short position is also self-reinforcing process of rising price and rising volatility
Figure 39 ............................................................................................................................................. 194
12
6 30
4
Historical price of S&P500 stock index from Jan/05/1983 to Nov/21/2007
Figure 40 ............................................................................................................................................. 194
13
6 31
4
Historical weekly percentage return on S&P500 index from Jan/05/1983 to Nov/21/2007
Figure 41 ............................................................................................................................................. 195
14
6 32
4
Historical absolute weekly percentage return from Jan/05/1983 to Nov/21/2007
Figure 42 ............................................................................................................................................. 195
15
6 33
4
Fit the historical weekly percentage return on S&P500 index to a normal distribution
Figure 43 ............................................................................................................................................. 196
16
6 34
4
Split return data, for in-sample and out-of-sample inference
Figure 44 ............................................................................................................................................. 223
17
6 35
4
The price of Citigroup Inc at the official trading hours from Dec/26/2007 to Dec/28/2007
Figure 45 ............................................................................................................................................. 223
18
6 36
4
The price of Citigroup Inc at the official trading hours from Dec/26/2007 to Dec/28/2007
Figure 46 ............................................................................................................................................. 226
19
6 37
4
The log observed intraweek range and some preliminary data analysis (Sample ACFs and PACFs)
Figure 47 ............................................................................................................................................. 228
10
7 38
4
ARMA model and observed log range, in-sample
Figure 48 ............................................................................................................................................. 228
11
7 39
4
ARMA model and observed log range, in-sample, diagnosis of residuals
Figure 49 ............................................................................................................................................. 229
12
7 30
5
ARMA model and observed log range, out-of-sample
Figure 50 ............................................................................................................................................. 230
13
7 31
5
ARMA model and observed log range, out-of-sample, diagnosis of residuals
Figure 51 ............................................................................................................................................. 234
14
7 32
5
QQ plot of the residuals to study if F-test can be used
9
10. LIST OF ABBREVIATIONS
2
ACF Autoregressive function
AIC Akaike information criterion
BIC Bayesian information criterion
CARR Conditional autoregressive range
DGP Sata generating process
EM The expectation and maximization algorithm
FX Foreign exchange rate
[G]ARCH [Generalized] autoregressive conditional
heteroskedasity
EGARCH Exponential GARCH
IGARCH Integrated GARCH
GARCH-MixN GARCH model with mixture normal innovations
GARCH-T GARCH model whose innovation follows Student’s
distribution
HMS-V The proposed hidden Markov-switching volatility
model
J-B test Jarque-Bera test
KL Kullback-Leibler information measure
MAD Mean absolute deviation
MS (HMM) Hidden Markov-switching model
MLE Maximum likelihood estimator
10
11. MS-[G]ARCH Hidden Markov-switching [G]ARCH model
MSE Mean square error
MixN Mixture normal diffusion
SEM The supplemented expectation and maximization
algorithm
XCF Cross-sectional correlation function
11
12. LIST OF SYMBOLS
3
Vectors and matrices will be denoted with boldfaces (e.g. C and β ); a parameter
vector is always a column vector; and sets and spaces will be denoted with calligraphic
letters (e.g. V ).
I ( x) Indicator function, which equals to 1 if the statement x is true and
0 other wise
T A vector of a time series indices, T = {t : t = 1, ,T}
Δt The state at time t
s i ,t
An indicator function of the state variable Δ t , s i ,t
:= I ( Δ t = i ) ,
that is, the realization of a Bernoulli trial; s i ,t
= 1 if Δ t = i , and
s i ,t
= 0 if Δ t ≠ i
s i ,t
The “true” rate of a successful Bernoulli trial s i ,t
,
s i ,t
:= E (s )
i ,t
s i ,t
The estimated rate of a successful Bernoulli trial s i ,t
,
s i ,t
:= E (s ) = E (s )
i ,t i ,t
ℜm The m -dimensional Euclidean space.
β Estimation of the parameter vector β
β (l +1) The estimate of the parameter β at the ( l + 1)
th
iteration.
β (l +1) − β (l ) The distance between the two matrices, β ( l +1) and β ( l ) , for the
12
13. sizes of two matrices are both i × j ,
i j
β (l +1) − β (l ) = ∑∑ β k(l,h 1) − β k(l,h
+ )
k =1 h =1
θ (l +1) = (θ ( ) )
l
A mapping from θ ( l ) to θ (l +1) , where is the rule
L The lag operator
XT A matrix with the index T , T = 1, ,T
x' Transpose of the vector x
x>0 All elements of vector x are positive elementwise
0a×b The zero matrix with size a × b
1a×b The unity matrix with size a × b
diag ( c1 , , cm ) The diagonal matrix with diagonal elements ( c1 , , cm )
tr ( S ) The trace of the square matrix S
I The identity matrix
ψt All the available information up to, and including, time t
Et ( ε | x ) The expectation of the variable ε at time t based on the
information x
Vart ( ε | x ) The variance of the variable ε at time t based on the information
x
φ (• μ ,σ 2 ) Probability density function of the normal distribution N μ , σ 2 ( )
Φ (• μ ,σ 2 ) Cumulative density function of the normal distribution N μ , σ 2 ( )
I com The information matrix of the complete data
I obs The information matrix of the observable data
13
14. I miss The information matrix of the missing data
I The Fisher information matrix
f (• • , •)
i
A function f i
with 2 inputs
LF (θ ) A likelihood function whose parameter is θ
LLF (θ ) A log likelihood function whose parameter is θ
LLFobs (θ ) The log likelihood function of the observed data
LLFcom (θ ) The log likelihood function of the complete data
∇LLF (θ ) The Gradient of the log likelihood function
∇ 2 LLF (θ ) The Hessian of the log likelihood function
14
15. 1. INTRODUCTION
4
Volatility, the most extensively used measure of uncertainty, is fundamental to much of
modern finance theory. Quantifying and forecasting volatility is essential to financial
asset pricing, portfolio optimization and risk management. Over the past two decades, a
diverse range of theoretical and empirical research has been carried out on modeling the
volatility of time series. Following the widespread popularity of a number of financial
instruments, whose values are intrinsically linked to their corresponding volatilities, the
development of volatility models and estimation frameworks has emerged as active
research areas.
The proposed model is a further extension of those presented in existing literature. It
uniquely emphasizes the parallel structure of the Markov states. This parallel structure
separates the INTER-state and INTRA-state dynamics, allows for greater transparency,
balances the memory of both recent and distant history, provides more consistent
economic implication as well as greatly simplifying and stabilizing the EM algorithm.
1.1. Volatility Observations
1
2
It is widely recognized that the volatilities of most financial asset returns are time-varying
and typically display, at least, the following six stylized characteristics:-
15