Tommaso Proietti 415
The filtered probabilities,P(St|ηt,κt,), are obtained by the following discrete
filter:
(i) The filter is started with the initial distributionP(S 0 = 1 |η^0 ,κ^0 ,)=1,P(S 0 =
0 |η^0 ,κ^0 ,)=0: that is, we impose thatStstarted in the high volatility regime.
(ii) For t = 1, 2,...,n, compute the one-step-ahead probability distribution
P(St|ηt−^1 ,κt−^1 ,)=
∑
St− 1 P(St|St− 1 ,)P(St− 1 |η
t− (^1) ,κt− (^1) ,).
(iii) Compute the filtered probabilities:
P(St|ηt,κt,)=
f(ηt,κt|St,)P(St|ηt−^1 ,κt−^1 ,)
∑
Stf(ηt,κt|St,)P(St|ηt−^1 ,κt−^1 ,)
,
wheref(ηt,κt|St,)is the product of two independent Gaussian densities with
time-varying scale parameters.
Gerlach, Carter and Kohn (2000) have proposed an alternative sampling scheme
for the indicator variableStwhich generates samples fromP(St|Sj=t,y,)without
conditioning on the states or the disturbances. This is more efficient than the above
sampler ifStis highly correlated with the states or the disturbances, which is not
the case in our particular application.
Steps 1 and 2 of the GS algorithm are similar but the full posteriors are understood
to be conditional onS(i−^1 )as well. Furthermore, an additional step, 2(g), is added
for sampling from the full conditionals of the transition probabilities,T 11 ,T 22 , and
the steps 2(b) and 2(c) are replaced as follows:
(b) Generateση^2 a(i)andση^2 b(i)from:
ση^2 a|η(i−^1 ),S(i−^1 )∼IG
⎛
⎝
vη+
∑
tS
(i− 1 )
t
2
,
δη+
∑
tS
(i− 1 )
t η
(i− 1 )^2
t
2
⎞
⎠,
ση^2 b|η(i−^1 ),S(i−^1 )∼IG
⎛
⎝vη+
∑
t(^1 −S
(i− 1 )
t )
2
,
δη+
∑
t(^1 −S
(i− 1 )
t )η
(i− 1 )^2
t
2
⎞
⎠.
This assumes that the prior distribution isση^2 aandση^2 b∼IG(vη/2,δη/ 2 ).
(c) Generateσκ^2 a(i)andσκ^2 b(i)from:
σκ^2 a|κ(i−^1 ),S(i−^1 )∼IG
⎛
⎝vκ+
∑
tS
(i− 1 )
t
2
,
δκ+
∑
tS
(i− 1 )
t κ
(i− 1 )^2
t
2
⎞
⎠,
σκ^2 b|κ(i−^1 ),S(i−^1 )∼IG
⎛
⎝vκ+
∑
t(^1 −S
(i− 1 )
t )
2
,
δκ+
∑
t(^1 −S
(i− 1 )
t )κ
(i− 1 )^2
t
2
⎞
⎠.
This assumes that the prior distribution isσκ^2 aandσκ^2 b∼IG(vκ/2,δκ/ 2 ).