

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


Introduction to Computational Finance Fall 2008
Assume that you purchase α 1 , α 2 , α 3 of each bond, with expirys 0. 25 , 0. 5 , 1 .0 year respectively. The settlement constraint is
α 1 e−rt^1 + α 2 e−rt^2 + α 3 e−rt^3 = 1000e−rt.
The settlement constraint fixes one of the parameters. We thus need two more equations to fix all the parameters. We can use these degrees of freedom to set two derivatives to zero. (i.e., consider the time ∆t and an interest rate change ∆r. We will assume that ∆t → 0.) Setting the first and second derivatives to 0, we obtain two more equations:
α 1 t 1 e−rt^1 + α 2 t 2 e−rt^2 + α 3 t 3 e−rt^3 − 1000 te−rt^ = 0 , α 1 t^21 e−rt^1 + α 2 t^22 e−rt^2 + α 3 t^23 e−rt^3 − 1000 t^2 e−rt^ = 0.
Solving these three equations for the three unknowns αa, α 2 , α 3 gives
α 1 = Xe−r(t−t^1 )^
(t 2 − t)(t 3 − t) (t 2 − t 1 )(t 3 − t 1 )
α 2 = Xe−r(t−t^2 )^
(t 1 − t)(t 3 − t) (t 1 − t 2 )(t 3 − t 2 )
α 3 = Xe−r(t−t^3 )^
(t 1 − t)(t 2 − t) (t 1 − t 3 )(t 2 − t 3 )
Plugging in the values of t, t 1 , t 2 , t 3 , we obtain
α 1 = − 325. 1033 , α 2 = 987. 5778 , α 3 = 337. 5262.
(a) For t = 1,... , N,
MV (t) = (1 − e−λ)
∑^ t
i=−∞
e−λ(t−i)Si.
For t < 1, MV (t) = 0.
(b) Given MV (t + 1) = e−λMV (t) + (1 − e−λ)St+1, a straightforward linear time algorithm is obtained by sequentially updating MV (t + 1) from MV (t), starting with MV (0) = 0. The following sequence establishes this recurrence,
MV (t + 1) = (1 − e−λ)
∑^ t+
i=−∞
e−λ(t+1−i)Si,
= (1 − e−λ)
∑^ t i=−∞
e−λ(t+1−i)Si + (1 − e−λ)St+1,
= e−λ^ · (1 − e−λ)
∑^ t
i=−∞
e−λ(t−i)Si + (1 − e−λ)St+1,
= e−λ^ · MV (t) + (1 − e−λ)St+1.
(c)
0 0.5 1 1.5 2 2.5 3 3.5 4 4. x 10^5
0
20
40
60
80
100
120
140
Preprocess the database of patterns into a prefix tree, where each node stores the string ids of all its progeny leaf nodes (note that the prefix of any progeny leaf node is given by the path to node). This preprocessing is O(D). Now, to process the stock string, at every time, go backwards K characters, tracinig the path in the prefix tree. The all the progeny leafs of the node you end at are the K-active pattern strings. Since their ids are stored in the node, it is a simple matter to output the strings assuming that the database is indexed. The time to perform this entire operation at step t is O(Mt + K). Summing over t, we have O(M + NK).