The Museum of HP Calculators

HP Forum Archive 14

 Black-Scholes on HP 17BII, 19BIIMessage #1 Posted by Bob Wang on 24 Feb 2004, 10:52 p.m. I would appreciate anyone interested in option pricing on the 17BII and 19BII to try this modification of HP's program. It's a little more accurate, and is a bit smaller. Modified Black-Scholes: http://home.comcast.net/wsb-cgi-bin/ssi.cgi?PWPTool=HTMLView&State=False&wsbID=409909&GroupID=372953&Owner=bobwang&SiteID=1372814 HP's original version: http://h20015.www2.hp.com/en/document.jhtml?lc=en&docName=bpia5179 Thanks, Bob Wang

 Re: Black-Scholes on HP 17BII, 19BIIMessage #2 Posted by tony on 25 Feb 2004, 7:06 p.m.,in response to message #1 by Bob Wang Excellent work Bob! In DataFile V22N3 pp13-21 I did a B-S article about the 12C but included this version for the 17bii which uses a simplified form of the approximation you use: ```=========snippet from DataFile ================= This equation is 15% shorter than the one on the HP page and produces answers 20 times more accurate: {BLK.SCHLS|if(S(PUTV):-PS+PE*EXP(-RF%*T/100)+0*S+CALLV-PUTV: 0*L(D5:(LN(PS/PE)+(RF%/100+S^2/2)*T)/S/SQRT(T)) *L(D6:G(D5)-S*SQRT(T)) *L(D1:1/(1+ABS(G(D5)/3.006))) *L(D2:1/(1+ABS(G(D6)/3.006))) +PS*ABS(IF(G(D5)<0;0;-1)+ EXP(-G(D5)^2/2)*G(D1)*(((187*G(D1))-24)*G(D1)+87)/500) -PE*EXP(-RF%*T/100)*ABS(IF(G(D6)<0:0:-1)+ EXP(-G(D6)^2/2)*G(D2)*(((187*G(D2))-24)*G(D2)+87)/500) -CALLV)} ============================== ``` There is another version for the 17bii as well that enables resolving for the any of the 5 inputs, including the implied volatility. This one above could even be shortened again but accuracy suffers a little. For DataFile, see www.hpcc.org

 Re: Black-Scholes on HP 17BII, 19BIIMessage #3 Posted by hugh steers on 25 Feb 2004, 7:42 p.m.,in response to message #2 by tony ive always been peeved that neither the 17bii nor 19bii have UTPN (normal distribution). it would make this a lot easier.

 Re: Black-Scholes on HP 17BII, 19BIIMessage #4 Posted by Bob Wang on 25 Feb 2004, 9:39 p.m.,in response to message #2 by tony Thanks for the HPCC link. I'll have to get the CD with your articles. I do like the compactness of your approximation, I have to say that I'm impressed that Black-Scholes can fit on a 12C.

 Re: Error in equation?Message #5 Posted by Bob Wang on 26 Feb 2004, 9:01 p.m.,in response to message #2 by tony Tony: I tried your version for the upper tail and got very inaccurate results. Would you mind checking the routines N(d1) and N(d2)? Thanks, Bob

Go back to the main exhibit hall