back start next


[start] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [ 49 ] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139] [140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150]


49

• Column . The daily returns of Strategy 2.

• Column D. The daily returns of Strategy 3.

• Column E. The natural log of one plus the daily return of Strategy 1. The formula for cell E2 is =LN(1+B2).

• Column E The natural log of one plus the daily return of Strategy 2. The formula for cell F2 is =LN(1+C2).

• Column G. The natural log of one plus the daily return of Strategy 3. The formula for cell G2 is =LN(1+D2).

• Column H. The difference between the daily log return of Strategy 1 and the average daily log return of all strategies. The formula for cell H2 is =E2-$B$27. Cell $B$27 contains the average daily natural log return of all the strategies.

• Column I. The difference between the daily return of Strategy 2 and the average daily natural log return of all strategies. The formula for cell 12 is =F2-$B$27.

• Column J. The difference between the daily return of Strategy 3 and the average daily natural log return of all strategies. The formula for cell J2 is =G2-$B$27.

• Column K. The square of Column H. The formula for cell K2 is =H2x H2.

• Column L. The square of Column I. The formula for cell L2 is =12 X12.

• Column M. The square of Column J. The formula M2 is =J2xJ2.

Rows 19-37 of the spreadsheet are organized as follows:

• Row 19. Blank.

• Row 20. The arithmetic average of cells E2 through El 8, F2 through F18, and G2 through G18. The formula for cell E2 is =AVERAGE(E2:18).

• Row 21. Row 20 minus the average daily return of all the strategies. The formula for cell E21 is =E20-$B$27.

• Row 22. The square of Row 21. The formula for cell E22 is =E21 X E21.

• Rows 23, 24. Blank.

• Row 25. Cell B25 is the number of trading strategies.

• Row 26. Cell B26 is the number of days for which you have computed daily returns.

• Row 27. Cell B27 is the average daily return of all of the strategies. This cells formula is =AVERAGE(E20:G20).

• Row 28. Blank.

• Row 29. Cell B29 is the variable A discussed earlier. This cells formula is =SUM(K2:M 18) / (B25 B26).

• Row 30. Cell B30 is the variable discussed earlier. This cells formula is =SUM(E22:G22)/B25.

• Row 31. Blank.



• Row 32. Cell B32 is the variable D discussed earlier. This cells formula is =B30 X (1+1/(B25-1)).

• Row 33. Cell B33 is the variable N discussed earlier. This cells formula is =B30x (1+1 / (B25-D+1 / ( 2 -1))- 29/ (B26-1).

• Row 34. Blank.

• Row 35. Cell B35 is the variable discussed earlier. This cells formula is =B33 / B32.

• Row 36. Blank.

• Row 37. Cell D37 is the adjusted return of the third strategy (column D) which is the top performing strategy in this example. This cells formula is =B27+B35 x (G20-B27).

• To get the annual adjusted rate of return, Cell F37 is the natural exponent of D37 and cell D38 is cell F37 to the 250th power (assuming 250 trading days in one year).

Figure 8.4 shows a spreadsheet with all the numbers calculated from daily returns of three hypothetical trading system strategies. Figures 8.5 and 8.6 show, in lull detail, the formulas in the spreadsheet in Figure 8.4. Note that in Figure 8.4 the return figures for the strategies (columns through D) are expressed in a form that does not display all the significant digits that were actually used. For example, although cell B2 shows a value of-0.0050, the actual value used in the calculations was -0.00496175. So if you type in the same return figures as shown in Columns , C, D, your results should differ slightly.

Figure 8.5 Formulas for the first 18 rows of the spreadsheet in Figure 8.4.

A

1 D E

I F

I G

1 H

I I

I J

I

I u

I M

lomsD

ioms3)

ttrl - avo

atr2 - avg

«tr3-avg

<itr1-»vo>»2

[ 1*2

<

=LN(1*B2)

=LN(1*C2)

=LN(1*D2)

=E2-»B»27

=F2-JB$27

=G2-»B$27

=H2*H2

=J2*J2

=LN(1»B3)

=LN(1»C3)

=LN(1*D3)

=EMB»27

=FMB»27

=G3-SBJ27

=H3*H3

=1313

=J3*J3

=LN(1-*B4)

=LN(1*C4

=LN<1*D4)

=EMBS27

=FMB»27

=G44BJ27

=H4*H4

-1414

=J4*J4

=LN(1*B5)

=LN<1-»C5)

=LN(1*D5)

=E54BJ27

=F54BJ27

-Q54BJ27

=H5*H5

«1515

=J5*J5

=LN(1»B8)

=LN(1»C5)

=LN(1*D8)

=E84B»27

=FM6J27

«3848127

= *

=J6*J6

=LN(1*B7)

=LN(1»C7)

=LN(1*D7)

=E7-JBJ27

=F7-J.B»27

=G7-»B»27

=H7*H7

=17-17

=J7*J7

=LN(1*B«)

=LNO»C6)

=LN(1*De)

=E8-J.BS27

=FMB»27

=0846*27

= 8*

«18*18

=J8*J5

=LN(1*B9)

=LN(1*C9)

=LN(1*D9)

=E9-*.B»27

=F9-»BS27

=G9-»B$27

=H9*H9

=19*19

=J8*J9.

=LN(1*B10)

=LN(1.C10J

»LN(1*D10)

-E104BS27

-Fic«BSi27

-G104BS27

=H1(TH10

=110*110

=J10J10

=LN(1»B11)

=LN<1»C11)

=IN<1*011)

=E11-$B$S7

=F11-»BK7

=G1*-$B$27

H1VH11

411411

•011M11

«

=LN(1»B12)

=LN(1»C12)

=LN(1*D12)

=E12-»B»27

=F12-»B»27

=G12-»B$27

=H12*H12

=112*112

=J12*J12

=LN(1»B13)

=LN(1»C13)

=LN(1*D13)

-E134BI27

=F13-$B»27

-G13-SBJ27

=H13*H13

=113*113

=J13*J13

= 1* 14)

" 1* 14)

=LN(1*D14)

=E144BS27

=F14-JBJ27

=G144B$27

=H14*H14

=114*114

=J14*J14

= 1» 15)

=LN<1*C1S)

=LN<1*D15)

= 15-$ 7

=F15-je«.27

3154 7

=H15*H15

=115*115

=J15*J15

=LN(1«Bie)

=LN(1*C18)

=LN( 1*018)

=E1MBJ27

=F15-SBJ27

=G1»4S$27

= 18" 1

=118*118

=J1B*J18

= 1» 17)

= 1» 17)

=LN(1»D17)

=E17-«BJ27

-F17-JBJ27

=G17-JBJ27

=H17*H17

=117*117

=J17*J17

«

=LN(1*B18)

=LN(1.C18)

=LN(1*D18)

=E1WB»27

=F1WB»27

=G18-SB»27

H18*H1B

=118*118

=J18*Jie

18 20 21 22 23 24



average dally I Individual aver (individual ave

3 17

=AVERAOE(E20 G20)

=SUM(K2Miey(B25-B26) =SUM(E22 022)/B2S

=AVERAGE(E2:E1B) =AVERAGE(F2:F18) =AVERAGE(G2:G18) =E204BS27 =F20-$B»27 =G20-SBt27

=E21*E21 =F21*F21 =8214521

number of strategies

number of days

average daily return of ali strat

=B30<1+1/(B2S-1))

= 30-(1»1/( 25-1 ( 2 -1) 29/( 26-1)

Adjusted returr Adjusted returr

B27»B3S*(02(VB27) F37«250

Modifying this spreadsheet to calculate the Markowitz/Xu correction for your data is a simple three-step process:

1. Input the daily return of your strategies in columns , C, and D. If you have more than three strategies, then replicate the formulas in Columns E-G, H-J, and K-M. If you have results for more than 17 days, insert additional rows just below Row 18 and copy down the formulas.

2. Input the number of trading strategies in cell B25 and the number of days in your historical test into cell B26.

3. In cell B37, change G20 to be the average daily return of the trading strategy to which you are applying the Markowitz/Xu correction. Typically, this will be the strategy with the highest average daily return. The average daily return of each strategy is computed in Row 20.

The most interesting number on the spreadsheet is B, which appears in cell B35. Remember that if = 0, then return of the highest performing strategy is just equal to the average return of all the strategies. If = 1, then the return of the top-performing strategy is equal to the return on the historical data set. So, the closer is to 1, the smaller the size of the adjustment. In the case of the example shown in the spreadsheet in Figure 8.4, the natural log of the return of the top-performing strategy is reduced from .0015 (cell G20) to .00115 (cell B37).

Several modifications and improvements can be made in this correction formula. First, if you are trading a market, such as the S&P 500 futures, which has a long-term uptrend, then the return of the trading strategies should not be the absolute return, but rather the return above the uptrend. For example, if the average daily return of the S&P 500 futures is 0.04 percent and the average daily return of your top-performing strategy is .05 percent then H = .05% - .04% = .01%. Second,

Figure 8.6 Formulas for rows 19-38 of the spreadsheet in Figure 8.4.



[start] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [ 49 ] [50] [51] [52] [53] [54] [55] [56] [57] [58] [59] [60] [61] [62] [63] [64] [65] [66] [67] [68] [69] [70] [71] [72] [73] [74] [75] [76] [77] [78] [79] [80] [81] [82] [83] [84] [85] [86] [87] [88] [89] [90] [91] [92] [93] [94] [95] [96] [97] [98] [99] [100] [101] [102] [103] [104] [105] [106] [107] [108] [109] [110] [111] [112] [113] [114] [115] [116] [117] [118] [119] [120] [121] [122] [123] [124] [125] [126] [127] [128] [129] [130] [131] [132] [133] [134] [135] [136] [137] [138] [139] [140] [141] [142] [143] [144] [145] [146] [147] [148] [149] [150]