Black-Scholes on the 200lx Message #5 Posted by Bob Wang on 26 Jan 2005, 11:47 a.m., in response to message #4 by Frank
Frank:
The shortest, most accurate implementation of Black-Scholes not using UTPN is courtesy of Tizedes Czaba's suggestion of using a Taylor series. However, it is also the SLOWEST, taking well over a minute on my 17Bs and 19Bs. I would appreciate it if you would try it on your 200lx, and time the execution. IF the speed is acceptable, I would recommend using that instead of the different polynomial methods I have posted on my shabby home page.
Bob
Bob Wang Home Page
Taylor Series Approximation:
Using L() and G()
Execution time > 1 minute
Character Count = 363
BLK.SCHLS:
IF(S(CALLV):
IF(L(A:ABS(L(C:LN(PS/PE)/S/SQRT(T)+(RF%/100+S^2/2)*T/S/SQRT(T))))>3:0:
0*L(B:ABS(L(D:G(C)-S*SQRT(T))))
+PS*ABS(IF(G(C)<0:-.5:.5)
+SIGMA(N:0:25:1:(-1)^N*G(A)^(2*N+1)/FACT(N)/2^N/(2*N+1))/SQRT(2*PI))
-PE*EXP(-RF%*T/100)*ABS(IF(G(D)<0:-.5:.5)
+SIGMA(N:0:25:1:(-1)^N*G(B)^(2*N+1)/FACT(N)/2^N/(2*N+1))/SQRT(2*PI)))
-CALLV:
-PS+PE*EXP(-RF%*T/100)+0*S+CALLV-PUTV)
|