

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
Homeworks are due at the begining of class or in my mail box by 2pm on the due date. The point value for the 6000 level is indicated in small font.
maximum drop ending at time t is the previous maximum minus the current value. A pseudo- code is Set cumret=0;ret2=0;curDD=0;MDD=0;prevmax=0; for i=1:N do cumret=cumret+r(i); ret2=ret2+(r(i)*r(i)-ret2)/i; if prevmax
√ ret2 − μ^2 ;
Instrument Total Return μ Sharpe Sterling bond 0.23699 2.7448e-06 2.0294e+07 ∞ DELL 2.344 2.7148e-05 1.6878 2. IBM 1.4646 1.6963e-05 1.5924 3. After adjusting for the risk free rate: Instrument Total Return μ Sharpe Sterling bond 0 0 0 0 DELL 2.107 2.4405e-05 1.5171 1. IBM 1.2276 1.4219e-05 1.3347 2. Assume that the risk free rate is a constant. Then μ will drop, σ will be unchanged, and MDD will rise.
Spread Fraction Total Return μ Sharpe Sterling 0 0.6251 7.24e-06 0.96317 1. 0.0001 -4.0005 -4.6334e-05 -6.1549 -0. 0.0002 -8.6255 -9.9902e-05 -13.256 -0. 0.0005 -22.497 -0.00026057 -34.289 -0. Buy and hold strategies are much better than the random strategy.
To make sure that the algorithm that computes the optimal strategy is linear time, you need keep a backtracking vector of the best state to come from to end in state 1,0. Then using this backtracking vector, you can extract the optimal trading strategy by determining first what the best state to be in at the end is, then going backward.
Pair Total Return μ Sharpe Sterling Bond-IBM 7.4833 8.6673e-05 9.79 125. Bond-DELL 16.776 0.0001943 14.938 135. IBM-DELL 15.102 0.00017491 11.979 68.
−1 (^0 1 2 3 4 5 6 7 8) x 10 49
0
1
2
3
4
5
6
7
8 PL for BOND and IBM, with spread frac=0.
−2 (^0 1 2 3 4 5 6 7 8) x 10 49
0
2
4
6
8
10
12
14
16
18 PL for BOND and DELL, with spread frac=0.
−2 (^0 1 2 3 4 5 6 7 8) x 10 49
0
2
4
6
8
10
12
14
16 PL for IBM and DELL, with spread frac=0.
Bond-IBM Bond-DELL IBM-DELL
Notice that Bond-Dell does better than IBM-DELL, even though IBM does better than Bond. This is because the two stocks are highly correlated, so when DELL goes down, so does IBM. The advantage of having another stock is that when one goes down, the other can be moved into if it is rising, which cannot happen if they are both going down. Thus the optimal strategy will be better if you have two good stocks that are uncorrelated.
(a) The number of ways to sell K shares in T time steps is
( T +K− 1 K
) , which in this case is 92378.