Ralph Vince - Portfolio Mathematics

(Brent) #1

ch01 JWBK035-Vince February 22, 2007 21 : 43 Char Count= 0


34 THE HANDBOOK OF PORTFOLIO MATHEMATICS


3.Now calculate the numerator.To do this, for each period, multiply the
answers from step 2.In other words, for each period, multiply the dif-
ference between that period’s X and the averageXtimes the difference
between that period’s Y and the averageY.
4.Total up all of the answers to step 3 for all of the periods.Thisis the
numerator.
5.Now find the denominator.To do this, take the answers to step 2 for
each period, for both the X differences and the Y differences, and square
them (they will now all be positive numbers).
6.Sum up the squared X differences for all periodsinto one final total.Do
the same with the squared Y differences.
7.Take the square root of the sum of the squared X differences youjust
foundin step 7.Now do the same with the Ys by takingthe square root
of the sum of the squared Y differences.
8.Multiply together the two answers youjust foundin step 7.Thatis, mul-
tiply the square root of the sum of the squared X differences by the
square root of the sum of the squared Y differences.This productis
your denominator.
9.Divide the numerator you foundin step 4 by the denominator you found
in step 8.Thisis your linear correlation coefficient, r.
The value for r will always be between+ 1 .00 and− 1. 00 .A value of 0indi-
cates no correlation whatsoever.
Look at Figure 1. 7 .It represents the followingsequence of 21 trades:
1 , 2 , 1 , − 1 , 3 , 2 , − 1 ,− 2 ,− 3 , 1 , − 2 , 3 , 1 , 1 , 2 , 3 , 3 , − 1 , 2 , − 1 , 3
Now, hereis how we use the linear correlation coefficient to seeif
thereis any correlation between the previous trade and the current trade.
Theideais to treat the trade P&Ls as the X valuesin the formula for
r.Superimposed over that, we duplicate the same trade P&Ls, only this
time we skew them by one trade, and use these as the Y valuesin the
formula for r.In other words the Y valueis the previous X value (see
Figure 1.8).
The averages are different because you average only those Xs and Ys
that have a correspondingX or Y value—thatis, you average only those
values that overlap;therefore, the last Y value (3)is not figuredin the Y
average, noris the first X value (1) figuredin the X average.
The numeratoris the total of all entriesin column E (.8).To find
the denominator we take the square root of the totalin column F, which
is8.555699, and we take the square root of the totalin column G, whichis
8 .258329, and multiply them together to obtain a denominator of 70. 65578.
Now we divide our numerator of.8 by our denominator of 70.65578 to
obtain0. 011322 .Thisis our linear correlation coefficient, r.If you’re re-
ally on top of this, you would also compute your Z score on these trades,
Free download pdf