State-Space Models with Endogenous Markov Regime Switching Parameters Kyu Ho Kang * (Department of Economics, Washington University in St. Louis, Box 1208, MO 63130, USA) This Version: July 2010 Abstract In this paper, Kim, Piger and Startz’ (2008) endogenous Markov-switching model is extended to a general state-space model. This paper also complements Kim’s (1991) regime switching dynamic linear models by allowing the discrete regime to be jointly determined with observed or unobserved continuous state variables. An efficient Bayesian MCMC estimation method is developed. It is shown that simulation of the latent state variable controlling the regime shifts enables us to precisely estimate the models without approximation. This method is applied to the estimation of a generalized Nelson-Siegel yield curve model where the unobserved time-varying curvature factor is allowed to be contemporaneously correlated with Markov switching volatility regimes. All techniques are also illus- trated using simulated data sets. (JEL classification: C1; C4) Keywords : Bayesian estimation, Markov switching process, Markov Chain Monte Carlo, Bayes factor, Term structure of interest rates 1 Introduction State-space models with regime switching parameters are so flexible that they have been commonly used to model heterogenous dynamics of data over time (For instance, Kim (1994), Kim and Piger (2002) and Kuan, Huang, and Tsay (2005)). The flexibility of this modeling approach is due to the fact that it involves two different types of dynamic state variables. One is usually termed as a regime indicator and it takes on discrete values determining the set of state-contingent model parameters at each data point. * Email : [email protected]1
25
Embed
State-Space Models with Endogenous Markov Regime ...apps.olin.wustl.edu/MEGConference/Files/pdf/2010/4.pdfState-Space Models with Endogenous Markov Regime Switching Parameters Kyu
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
State-Space Models with EndogenousMarkov Regime Switching Parameters
Kyu Ho Kang∗
(Department of Economics, Washington University in St. Louis, Box 1208, MO 63130, USA)
This Version: July 2010
Abstract
In this paper, Kim, Piger and Startz’ (2008) endogenous Markov-switchingmodel is extended to a general state-space model. This paper also complementsKim’s (1991) regime switching dynamic linear models by allowing the discreteregime to be jointly determined with observed or unobserved continuous statevariables. An efficient Bayesian MCMC estimation method is developed. It isshown that simulation of the latent state variable controlling the regime shiftsenables us to precisely estimate the models without approximation. This methodis applied to the estimation of a generalized Nelson-Siegel yield curve model wherethe unobserved time-varying curvature factor is allowed to be contemporaneouslycorrelated with Markov switching volatility regimes. All techniques are also illus-trated using simulated data sets. (JEL classification: C1; C4)
Keywords : Bayesian estimation, Markov switching process, Markov Chain MonteCarlo, Bayes factor, Term structure of interest rates
1 Introduction
State-space models with regime switching parameters are so flexible that they have been
commonly used to model heterogenous dynamics of data over time (For instance, Kim
(1994), Kim and Piger (2002) and Kuan, Huang, and Tsay (2005)). The flexibility of
this modeling approach is due to the fact that it involves two different types of dynamic
state variables. One is usually termed as a regime indicator and it takes on discrete
values determining the set of state-contingent model parameters at each data point.
where yt is a q-dimensional vector of dependent variables with finite first and second
moments and ft is a k-dimensional vector of observed or unobserved continuous state
variables. xt is a h-dimensional vector of the observed exogenous or predetermined
variables, and it is assumed to be covariance-stationary. ast , bst and Hst are q×1, q×kand q×h matrices, respectively. µst : k×1 and Gst : k×k determine the state-dependent
mean and persistence of the factors. Dst : q × q and L : k × k capture the volatilities
of the measurement errors and the continuous state shocks. In addition, et and εt are
assumed to be mutually independent, and E [et|Sn] = 0 and E [ete′t|Sn] = Iq.
1Chib and Dueker (2004), as one of related works in the Bayesian approach, develop a non-Markovianregime switching model. In their setup, the regime states depend on the sign of an autoregressive latentvariable, which is allowed to be endogenous in sense that regimes are determined jointly with theobserved data.
3
In what follows, we postulate that the number of regimes is two as in Hamilton
(1989). The two-regime case is not only convenient to explain and understand, but also
popular in many empirical studies. We also assume that the unobserved discrete state
variable st is governed by a first-order Markov chain with transition probabilities:
p(st = k|st−1 = j, zt) = pjk(zt) (2.3)
where zt is a vector of covariance-stationary exogenous or predetermined variables, which
may include some elements of xt. (i.e. the regime-switching point positions are modeled
as a Markov process.) The Markov chain is assumed to be stationary and independent of
all observations of those elements of xt not included in zt. For the purpose a convenient
formulation of the Markov process, we introduce another latent variable γt, so that the
influence of zt on the transition probabilities is modeled through a probit specification
as in Kim et al. (2008).
st =
1 if γt < αst−1 + β′st−1
zt2 if γt > αst−1 + β′st−1
ztwhere γt ∼ i.i.d.N (0, 1) (2.4)
In other words. the transition probabilities have the form
pj1(zt) = Pr[γt < αj + β′jzt
]= Φ
(αj + β′jzt
)(2.5)
pj2(zt) = 1− Φ(αj + β′jzt
)By allowing for non-zero correlation between the regime shock γt and the factor shock
εt we model a bi-directional contemporaneous feedback between the unobserved state
variable st and the unobserved factors ft[εtγt
]∼ i.i.d.Nk+1
(0(k+1)×1,
(Ik ρρ′ 1
))(2.6)
where ρ =(ρ1 ρ2 · · · ρk
)′. Hence, the presence of some none-zero ρ′is (i = 1, 2, .., k)
implies endogenous regime changes, and the realization of regime at the next period
is determined jointly with the vector of continuous latent (or observable) variables.
This feature distinguishes our work from the existing studies. For example, when all
ρ′is are zero, we have the Markov switching dynamic factor model with time-varying
transition probability of Kim and Nelson (1998). Also it is very useful to notice that
4
when k = q = bst = 1 and Gst = µst = Dst = 0, this class of models reduces to that
of Kim et al. (2008) in which yt is scalar and thereby no unobserved continuous state
variable is involved.
Many other interesting models can also be constructed as special cases such as time-
varying coefficient model, dynamic common factor model and unobserved component
model and so forth. Specifically, one may set yt as a vector of stationary asset returns
and ft as the dynamic common factors where the factor loadings are regime-specific. So
yt may endogenously switch between strong and weak co-movement among the observed
returns over time. It is also possible to specify and evaluate the endogenous asymmetry
in the business cycle using the Friedman’s plucking model context.2
st+1stst−1
ft−1 ft+1ft
Θst−1Θst+1Θst
yt−1 yt+1yt.
Figure 1: Directed graph of model linkages. This is a summary of the data gen-erating process. In the beginning of period t, a regime and a vector of factors occursimultaneously conditioned on ft−1 and st−1. Then given the regime st, the correspond-ing model parameters Θst are taken from the full collection of model parameters. Finally,after simulating the measurement error et, yt is generated from (2.1)
Figure 1 summarizes the way the observations are generated in terms of a directed
acyclic graph. In the beginning of period t, a regime and a vector of factors occur
2Sinclair (2010) estimates this model using the quasi-maximum likelihood estimation method, andfinds that the asymmetry in the business cycle of the U.S. economy is exogenous.
5
simultaneously. This realization of the regime at time t is governed with the regime in
the previous period and the current factors as indicated by the direction of the two arrows
connecting st−1 to st and ft to st. Then given the regime at time t, the corresponding
model parameters Θst are taken from the full collection of model parameters. These
include ast and bst , for example. Conditioned on the parameters and ft−1, ft is generated
by the regime-specific autoregressive process in (2.2). Finally, from (2.1), ast , bst , ft
and a simulated measurement error et at each time point construct the observations yt.
Notice that in standard state space models with regime switching parameters the dashed
line in figure 1 is absent since st is assumed to be drawn independently of ft.
3 Prior-Posterior Analysis
3.1 Markov Chain Monte Carlo Scheme
Let Yt = yii=1,2,..,t, Xt = xii=1,2,..,t and Zt = zii=1,2,..,t be observations observed
through time t. Similarly, Ft = fii=1,2,..,t, St = sii=1,2,..,t and γt = γii=1,2,..,t
denote collection of the state variables through time t. Let Θ denote the parameters
in the evolution and transition equations and P is those in the transition probabili-
ties. That is, Θ is the collection of the parameters in ast ,bst ,Hst ,Dst ,µst ,Gst ,Lst and
P =α1,α2,β′1,β′2,ρ1,ρ2,..,ρk. Suppose that we have specified a prior density π(Θ,P) on
the parameters and data Yn, Zn and Xn are available. A Bayesian state space model
with regime switching parameters is defined by a joint distribution over the regime states,
continuous latent variables, model parameters and the data. In this context, interest
centers on the posterior density π (Θ,P,Sn,γn,Fn|Yn,Ωn), and
π (Θ,P,Sn,γn,Fn|Yn,Ωn) (3.1)
∝ f (Yn|Ωn,Sn,γn,Fn,Θ,P)× p (Sn,γn,Fn|Ωn,Θ,P)× π(Θ,P)
where Ωt = Xt ∪ Zt is the collection of exogenous variables at time t whose dynamics
are not analyzed through the transition equation in equation (2.2). Note that we use
the notation π to denote prior and posterior density functions of (Θ,P). We apply our
MCMC sampling scheme to the posterior density π (Θ,P,Sn,γn,Fn|Yn,Ωn) and obtain
6
the posterior distribution π (Θ,P|Yn,Ωn) by integrating out (Sn,γn,Fn) in a numerical
way.
We sample the parameters and the states recursively. In the first step, the parameters
in Θ are simulated on (Sn,Ωn,Wn,P,γn) and then P is sampled in turn. Next, the states
Sn are drawn conditioned on (Wn,Ωn) and the other parameters where Wt = Yt ∪Ft.
Then we sequentially simulate γn and Fn conditioned on the most recent values of the
conditioning variables. Our MCMC algorithm can be summarized as follows.
Algorithm: MCMC sampling
Step 1 Initialize (Sn,Fn,P,γn) and fix n0 (the burn-in) and n1 (the MCMC sample
size)
Step 2 Sample Θ|Wn,Ωn,Sn,γn,P
Step 3 Sample P|Wn,Ωn,Sn,Θ
Step 4 Sample Sn|Wn,Ωn,Θ,P
Step 5 Sample γn|Wn,Ωn,Sn,Θ,P
Step 6 Sample Fn|Yn,Ωn,Sn,γn,Θ,P
Step 7 Repeat Steps 2-6, discard the draws from the first n0 iterations and save the
subsequent n1 draws.
Full details of each of these steps are given by the following.
3.1.1 Simulation of Θ
We consider the question of simulating Θ conditioned on (Ωn,Wn,Sn,γn,P) by the
tailored multiple block MH algorithm(Chib and Greenberg (1995)). In this method the
parameters in Θ are first blocked into various sub-blocks. Then each of these sub-blocks
is sampled in sequence by drawing a value from a tailored proposal density constructed
for that particular block. This proposal is then accepted or rejected by the usual MH
7
probability move. For instance, suppose that in the jth iteration, we have g sub-blocks
of Θ
Θ1, Θ2, . ., Θg
Then the proposal density q(Θi|Θ−i,Wn,γn,Sn,P
)for the ith block, conditioned on
the most current value of the remaining blocks Θ−i, is constructed by a quadratic ap-
proximation at the mode of the current target density π(Θi|Θ−i,Wn,γn,Sn,P
). In
our case, we let this proposal density take the form of a student t distribution with 15
degrees of freedom
q(Θi|Θ−i,P,Wn,γn,Ωn,Sn
)= St (Θi|Θi,P,VΘi
,15) (3.2)
where
Θi = arg maxΘi
lnf(Wn|γn,Ωn,Sn,Θi,Θ−i,P)π(Θi) (3.3)
and VΘi=
(−∂
2 lnf(Wn|γn,Ωn,Sn,Θi,Θ−i,P)π(Θi)
∂Θi∂Θ′i
)−1
|Θi=Θi
.
We then generate a proposal value Θ†i . If Θ†i violates any of the constraints in R,
it is immediately rejected. Otherwise, it is accepted as the next value in the chain with
probability
α(Θ
(j−1)i ,Θ†i |Θ−i
)(3.4)
= min
f(Wn|γn,Ωn,Sn,Θ†i ,Θ−i,P)π
(Θ†i
)f(Wn|γn,Ωn,Sn,Θ
(j−1)i ,Θ−i,P
)π(Θ
(j−1)i
) St(Θ
(j−1)i |Θi,P,VΘi
,15)
St(Θ†i |Θi,P,VΘi
,15) , 1
.
The simulation of Θ is complete when all the sub-blocks Θii=1,2,..,g are sequentially
updated as above. On letting Nq (x|a, b) denote the q-dimensional multivariate nor-
mal density of x with mean of a and variance of b, the required joint density of Wn
conditioned on (Ωn,γn,Sn,Θ,P) is then a product of conditional predictive densities:
Table 1: Estimates of Model Parameters This table presents the true values, theposterior mean and the 95% credibility intervals of the model parameters based on 50,000MCMC draws beyond a burn-in of 5,000.
16
4.2 Application: A three-factor Nelson-Siegel yield curve model
We now consider the Nelson-Siegel model that originally motivates the proposed mod-
eling approach. The Nelson-Siegel model is widely used in practice for both fitting and
forecasting the term structure of interest rates due to its convenient and parsimonious
functional form. Following Diebold and Li (2006), the vector of yields with τ period
maturity yt(τ)
yt =(yt(τ1) yt(τ2) · · · yt(τN)
)is statistically modeled by
yt = Λ× f t + Dstet (4.3)
where
Λ =
1 1−eτ1λ
τ1λ1−eτ1λτ1λ− eτ1λ
1 1−eτ2λτ1λ
1−eτ2λτ1λ− eτ2λ
......
...
1 1−eτNλτ1λ
1−eτNλτ1λ
− eτNλ
(4.4)
ft =(
fLt fSt fCt)′
(4.5)
et =(et(τ1) et(τ2) · · · et(τN)
)′(4.6)
The latent dynamic factors, fLt , fSt and fCt are usually interpreted as level, slope and
curvature, respectively. The vector of the dynamic factors ft is assumed to follow the
Table 2: Regime-specific parameters This table presents the posterior mean, 95%credibility interval and inefficiency factor (ineff.) of the regime-dependent parameters
based on 50,000 MCMC draws beyond a burn-in of 5,000. d(i)st denotes ith diagonal
Table 3: Regime-independent parameters This table presents the posterior mean,95% credibility interval and inefficiency factor (ineff.) of the regime-independent param-eters based on 50,000 MCMC draws beyond a burn-in of 5,000.
19
elements in Dst except for the 3rd and the 9th yield are regime-specific. According to the
estimates for αst , the regime changes are asymmetric because the transition probability
from regime 1 (regime 2) to regime 2 (regime 2) is 83% (43%).
More importantly, Table 3 provides a strong evidence of endogenous regime switching.
In particular, notice that the 95% credibility intervals of ρ3 are entirely negative and the
estimated fCt is indeed the negative curvature as seen in the Figure 4. This indicates
that the conditional volatility and the riskiness of the long term bond holdings, not
surprisingly, move in the same direction. It may be interpreted as the regime switching
in volatility is influenced by the shocks to the long term bond risk.
model lnL lnML n.s.e.Endogenous RS model (ρ 6= 0) 9670.21 to be done to be doneExogenous RS model (ρ = 0) 9063.84 to be done to be doneNon-Switching model 8993.51 to be done to be done
Table 4: Marginal likelihoods
Table 4 confirms the endogeniety of the regime changes based on the marginal like-
lihoods. As can be seen in this table, the endogenous regime switching model is most
supported by the data. Finally, the Figure 3 shows the persistence of the volatility
regimes. This figure reveals that the high volatility regime is far less persistent than the
low volatility regime.
5 Conclusion
In this paper we propose regime switching linear state space models in which the regime
switches are endogenously determined through the correlation with the observed or
unobserved continuous state variables. Our work is an extension of Kim, Piger and
Startz’ (2008) to a general state space model. This paper also provides an efficient
Bayesian MCMC estimation method. The key idea is to simulate the latent state variable
that controls the regime shifts. By doing this we are able to estimate the models without
approximation and inaccuracy. It also demonstrates the validity of our method by
simulation study and application to a generalized Nelson-Siegel yield curve model with
20
0
2
4
6
8
−2.8−2.6−2.4−2.2−2.0−1.8−1.6−1.4
regime L
regime H
0
2
4
6
8
−4.0−3.8−3.6−3.4−3.2−3.0−2.8
0
2
4
6
8
10
−5.0−4.8−4.6−4.4−4.2−4.0−3.8
(a) d(1)st (b) d(2)
st (c) d(6)st
0
1
2
3
4
0.0 0.5 1.0
0
5
10
15
0.840.860.880.900.920.940.960.98
0.0
0.2
0.4
0.6
0.8
−5.5−5.0−4.5−4.0−3.5−3.0−2.5
(d) αst(e) G(3) (f) f (2)
0
0.0
0.5
1.0
1.5
2.0
2.5
3.0
−0.2 0.0 0.2 0.4
0.0
0.5
1.0
1.5
2.0
2.5
3.0
−0.4 −0.2 0.0 0.2
0
1
2
3
4
5
−0.5 −0.4 −0.3 −0.2 −0.1 0.0
(g) ρ1 (h) ρ2 (i) ρ3
Figure 2: Marginal posterior plots for some selected parameters These graphsare based on 50,000 simulated draws of the posterior simulation.
Albert, J. H. and Chib, S. (1993), “Bayesian-analysis of binary and polychotomous
response data,” Journal of the American Statistical Association, 88, 669–679.
Carter, C. K. and Kohn, R. (1994), “On Gibbs sampling for state space models,”
Biometrika, 81, 541–553.
21
Time
Pro
babi
lity
0.0
0.5
1.0
87:M1 92:M1 97:M1 02:M1 07:M1
(a) Low volatility regime (st = 1)
Time
Pro
babi
lity
0.0
0.5
1.0
87:M1 92:M1 97:M1 02:M1 07:M1
(b) High volatility regime (st = 2)
Figure 3: Probabilities of Regimes These graphs plot the estimates of the probabil-ities of regimes. These graphs are based on on 50,000 simulated draws of the posteriorsimulation.
Chib, S. (1996), “Calculating posterior distributions and modal estimates in Markov
mixture models,” Journal of Econometrics, 75, 79–97.
— (2001), “Markov chain Monte Carlo methods: computation and inference,” in Hand-
book of Econometrics, eds. Heckman, J. and Leamer, E., North Holland, Amsterdam,
vol. 5, pp. 3569–3649.
Chib, S. and Dueker, M. (2004), “Non-Markovian Regime Switching with Endogenous
States and Time-Varying State Strengths,” Working Paper 2008-31, Federal Reserve
Bank of St. Louis.
Chib, S. and Ergashev, B. (2009), “Analysis of multi-factor affine yield curve Models,”
Journal of the American Statistical Association, 104, 1324–1337.
22
Time
5.0
8.0
11.0
87:M1 92:M1 97:M1 02:M1 07:M1
(a) Level
Time
−4.0
−2.0
0.0
87:M1 92:M1 97:M1 02:M1 07:M1
(b) Slope
Time
−6.0
−3.0
0.0
87:M1 92:M1 97:M1 02:M1 07:M1
(c) Curvature
Figure 4: Factors These graphs plot the estimates of the factors. These graphs are basedon on 50,000 simulated draws of the posterior simulation.
Chib, S. and Greenberg, E. (1995), “Understanding the Metropolis-Hastings algorithm,”
American Statistician, 49, 327–335.
Chib, S. and Jeliazkov, I. (2001), “Marginal likelihood from the Metropolis-Hastings
output,” Journal of the American Statistical Association, 96, 270–281.
23
Chib, S. and Ramamurthy, S. (2010), “Tailored Randomized-block MCMC Methods
with Application to DSGE Models,” Journal of Econometrics, 155, 19–38.
Cochrane, J. H. and Piazzesi, M. (2008), “Decomposing the Yield Curve,” Manuscript.
Diebold, F. X. and Li, C. L. (2006), “Forecasting the term structure of government bond
yields,” Journal of Econometrics, 130, 337–364.
Gurkaynak, R. S., Sack, B., and Wright, J. H. (2007), “The U.S. treasury yield curve:
1961 to the present,” Journal of Monetary Economics, 54, 2291–2304.
Hamilton, J. (1989), “A new approach to the economic analysis of nonstationary time
series and the business cycle,” Econometrica, 57, 357–84.
Kim, C. J. (1994), “Dynamic linear models with Markov-switching,” Journal of Econo-
metrics, 60, 1–22.
Kim, C. J. and Nelson, C. R. (1998), “Business Cycle Turning Points, A New Coincident
Index, and Tests of Duration Dependence Based on a Dynamic Factor Model With
Regime Switching,” Review of Economics and Statistics, 80, 188–201.
Kim, C. J. and Piger, J. (2002), “Dynamic linear models with Markov-switching,” Jour-
nal of Monetary Economics, 49, 1189–1211.
Kim, C. J., Piger, J., and Startz, R. (2008), “Estimation of Markov regime-switching
regression models with endogenous switching,” Journal of Econometrics, 143, 263–
273.
Kuan, C.-M., Huang, Y.-L., and Tsay, R. S. (2005), “An Unobserved-Component Model
With Switching Permanent and Transitory Innovations,” Journal of Business and
Economic Statistics, 23, 443–454.
Morley, J., Nelson, C. R., and Zivot, E. (2003), “Why Are Unobserved Component
and Beveridge-Nelson Trend-Cycle Decompositions of GDP So Different,” Review of
Economics and Statistics, 85, 235–243.
24
Sinclair, T. M. (2010), “Asymmetry in the Business Cycle: Friedman’s Plucking Model
with Correlated Innovations,” Studies in Nonlinear Dynamics and Econometrics, 14,