Ralph Vince - Portfolio Mathematics

(Brent) #1

160 THE HANDBOOK OF PORTFOLIO MATHEMATICS


FIGURE 4.13 Parabolic interpolation performed on TWRs of 20 sequences of
+2,− 1


equal zero while running. One possible solution is the following fast and
dirty patch in Java:


dm = (x2−x1)*(y2−y3)−(x2−x3)*(y2−y1);
If (dm== 0 .0)
dm=.00001;

abscissa = x2− 0. (^5) (((x2−x1)(x2−x1)(y2−y3)−(x2−x3)
(x2−x3)
(y2−y1)/dm;
This patch will not detract from the integrity of the results.
Note that this method can be used to find a local maximum for a given
function, provided only one maximum exists within the range. The same
technique could be used to find a local minimum for a function that opened
upward (for example, the function Y equals X squared is such a function).
Again, the technique will work provided there is only one local minimum
(as is the case with our example). The only change from looking for a local
maximum is in the equation for finding the abscissa:
ABSCISSA=
X2+. (^5) *


(X2−X1)^2 (Y2−Y3)−(X2−X3)^2 (Y2−Y1)


(X2−X1)(Y2−Y3)−(X2−X3)(Y2−Y1)

Free download pdf