BlackScholes on 17bII+ using Taylor series VERY ACCURATE! Message #1 Posted by Bob Wang on 13 Jan 2005, 7:47 p.m.
Special Thanks to Tizedes Csaba for pointing me to the Taylor series approximation for the normal cumulative distribution.
This implementation of BlackScholes only works in the region where d1 and d2 are less than 3 in absolute value. If either d1 or d2 is greater than 3, 0 is returned for CALLV. Calculation time is well over a minute, but accuracy is basically to the last displayed decimal place!
Note that the newer 17bII+ ROM has changed order of precedence, i.e. (1^N) works on the older version, but has to be explicitly written as ((1)^N) for the newer version.
On a brighter note, the newer ROM is almost an order of magnitude faster at displaying equations, and opening the editing function.
Also, replace * with multiply, and / with divide. Replace SIGMA with the sum operator found under the second screen of MORE Alpha characters. I apologize for the inconvenience, but I can't seem to get these characters to paste correctly.
Bob Wang
PS=52
PE=45
Rf%=.5
T=6
S=.2054
Exact Call = 14.218722263
Formula = 14.2187222629
Exact Put = 5.88877127263
Formula = 5.8887712726
Taylor Series Approximation HP 17BII+:
Not using L() and G()
Execution Time > 1 minute
Character Count = 464
BLK.SCHLS.TAYLOR:
0*(PS+PE+RF%+T+S)
+IF(S(CALLV):
IF((LN(PS/PE)+(RF%/100+S^2/2)*T)/S/SQRT(T)>3:0:
PS*ABS(IF((LN(PS/PE)+(RF%/100+S^2/2)*T)/S/SQRT(T)<0:.5:.5)
+SIGMA(N:0:25:1:((1)^N)
*(((LN(PS/PE)+(RF%/100+S^2/2)*T)/S/SQRT(T))^(2*N+1))
/FACT(N)/2^N/(2*N+1))
/SQRT(2*PI))
PE*EXP(RF%*T/100)*ABS(
IF((LN(PS/PE)+(RF%/100S^2/2)*T)/S/SQRT(T)<0:.5:.5)
+SIGMA(N:0:25:1:((1)^N)
*(((LN(PS/PE)+(RF%/100S^2/2)*T)/S/SQRT(T))^(2*N+1))
/FACT(N)/2^N/(2*N+1))
/SQRT(2*PI)))CALLV:
PS+PE*EXP(RF%*T/100)+CALLVPUTV)
