02.12.2012 Views

Applications of state space models in finance

Applications of state space models in finance

Applications of state space models in finance

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

4.4 Forecast<strong>in</strong>g and decod<strong>in</strong>g 55<br />

<strong>models</strong>, the Viterbi algorithm is employed for this purpose. The Viterbi algorithm represents<br />

an efficient dynamic programm<strong>in</strong>g algorithm. It was orig<strong>in</strong>ally proposed by Viterbi<br />

(1967) as an error-correction procedure <strong>in</strong> noisy digital communication applications.<br />

Accord<strong>in</strong>g to Rab<strong>in</strong>er (1989) the Viterbi algorithm can be summarized as follows. At<br />

first, it is necessary to def<strong>in</strong>e the quantity<br />

νt(i) := max P<br />

i1,...,it−1<br />

�<br />

S1 = i1, . . . , St−1 = it−1, St = i, X (t) = x (t)�<br />

, (4.40)<br />

which represents the highest likelihood along a s<strong>in</strong>gle path at date t account<strong>in</strong>g for the<br />

first t observations X (t) = x (t) and end<strong>in</strong>g at <strong>state</strong> St = i. It can be shown that νt(i)<br />

satisfies<br />

νt+1(j) = [max(νt(i)γij)]<br />

· pj(xt+1), (4.41)<br />

i<br />

from which a T × m matrix <strong>of</strong> values νt(i) for t = 1, . . . , T , and j = 1, . . . , m, can be<br />

derived. The required sequence <strong>of</strong> hidden <strong>state</strong>s (i∗ 1, . . . , i∗ T ) is computed <strong>in</strong> four steps:<br />

1. Initialization:<br />

ν1(i) = πi · pi(x1), 1 ≤ i ≤ m, (4.42)<br />

κ1(i) = 0, (4.43)<br />

where κt(i) is another auxiliary variable whose role becomes clear <strong>in</strong> the second step.<br />

2. Recursion:<br />

νt(j) = max<br />

1≤i≤m [νt−1(i)γij] · pj(xt), 1 ≤ j ≤ m, 2 ≤ t ≤ T, (4.44)<br />

κt(j) = argmax[νt−1(i)γij],<br />

1 ≤ j ≤ m, 2 ≤ t ≤ T, (4.45)<br />

1≤j≤m<br />

where κt(j) yields the <strong>state</strong> i at time t−1 which is most likely to lead to <strong>state</strong> j at time t.<br />

3. Term<strong>in</strong>ation: The first recursion is term<strong>in</strong>ated by maximiz<strong>in</strong>g νT (i) and stor<strong>in</strong>g the<br />

likelihood <strong>of</strong> the most probable path as a vector p ∗ . The most probable <strong>state</strong> at time T<br />

is stored <strong>in</strong> i ∗ T :<br />

p ∗ = max<br />

1≤i≤m [νT (i)], (4.46)<br />

i ∗ T = argmax[νT<br />

(i)]. (4.47)<br />

1≤i≤m<br />

4. Path backtrack<strong>in</strong>g: Start<strong>in</strong>g with the most probable last <strong>state</strong> i∗ T , the most likely<br />

path can be computed by track<strong>in</strong>g back from t = T − 1 to t = 1 <strong>in</strong> a second recursion<br />

us<strong>in</strong>g κt:<br />

i ∗ t = κt+1i ∗ t+1 , t = T − 1, T − 2, . . . , 1. (4.48)<br />

The result<strong>in</strong>g optimal <strong>state</strong> sequence is referred to as Viterbi path. In order to avoid<br />

numerical underflow, the Viterbi algorithm can alternatively be <strong>state</strong>d <strong>in</strong> terms <strong>of</strong> logarithms.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!