HP 17BII+ Black-Scholes using SOLVE « Next Oldest | Next Newest »

 ▼ Bob Wang Member Posts: 90 Threads: 22 Joined: Jun 2005 03-16-2004, 08:44 PM Tony Hutchins has posted some very compact versions of the Black-Scholes formula. This version is just a modification of Tony's previous work and ideas. The HP 17BII+ does not have L() and G() functions, and Tony has posted a version which cleverly uses intermediate variables. I liked his work so much that I decided to modify it a little. This version uses just one intermediate variable named "SOLVE", the user will presented with SOLVE, CALLV, and PUTV on the second page of variables. Hitting SOLVE would seem intuitive, and the user just has to remember to explicitly solve for CALLV before solving PUTV. Thanks, Tony! Bob Wang BLK.SCHLS.TONY: 0×(PS+PE+RF%+T+S) +IF(S(SOLVE):SOLVE-(LN(PS÷PE)+(RF%÷100+S^2÷2)×T)÷S÷SQRT(T): IF(S(CALLV):CALLV-PS×ABS( IF(SOLVE<0:0:-1)+EXP(-(SOLVE^2)÷2) ×((187÷(1+ABS(SOLVE)÷3.006)-24) ÷(1+ABS(SOLVE)÷3.006)+87) ÷(1+ABS(SOLVE)÷3.006)÷500) +PE×EXP(-RF%×T÷100)×ABS( IF(SOLVE-S×SQRT(T)<0:0:-1)+EXP(-((SOLVE-S×SQRT(T))^2)÷2) ×((187÷(1+ABS(SOLVE-S×SQRT(T))÷3.006)-24) ÷(1+ABS(SOLVE-S×SQRT(T))÷3.006)+87) ÷(1+ABS(SOLVE-S×SQRT(T))÷3.006)÷500): PUTV-CALLV+PS-PE×EXP(-RF%×T÷100)) ▼ Tony Member Posts: 111 Threads: 19 Joined: Jan 1970 03-16-2004, 10:52 PM Bob, My pleasure. Glad you liked it! Ah yes I forgot the 17bii+ is like the old 17b. Shame that L/G "escaped" from the 17bii+! I did the one below for the 17b - requires solving for D1,F1,D2,F2,CALLV and PUTV in order. I see your SOLVE does the D1. I tried to minimise the typing required to enter the eqn. Interesting to see your approach! Timothy Crack has a nice 17B Black-Scholes in his book "Heard on the Street" - page 278 - he implements the full AMS55 26.2.17, and requires solving for D1,N1,D2,N2, CALL. ```{17bbs|0*(PS+PE+RF%+T+S)+ IF(S(D1):D1-(LN(PS/PE)+(RF%/100+S^2/2)*T)/S/SQRT(T): IF(S(F1):F1-1/(1+ABS(D1)/3.006): IF(S(D2):D2-D1+S*SQRT(T): IF(S(F2):F2-1/(1+ABS(D2)/3.006): IF(S(CALLV):CALLV -PS*ABS(IF(D1<0;0;-1)+ EXP(-D1^2/2)*F1*((187*F1-24)*F1+87)/500) +PE*EXP(-RF%*T/100)*ABS(IF(D2<0:0:-1)+ EXP(-D2^2/2)*F2*((187*F2-24)*F2+87)/500): PUTV-CALLV+PS-PE*EXP(-RF%*T/100)) ))))} ``` Somewhere I have a less accurate 17b one about 60 chars smaller than the above (300 v 360, approx) which still gives the correct 14.22 for the Call in that HP17BII example. It requires solving for D1,D2,CALLV, PUTV. No harm in solving for D1 & D2 - always good to see for the B-S student. I admit the F1 and F2 above are not very interesting, but I am not fast at entering equations in the pioneers. In fact for something like the above it is almost easier to have separate equations for the components - then they are really short and load quickly. The old 18C didn't have the IF(S(.. so there we had to have separate eqns. Cheers, Tony

 Possibly Related Threads... Thread Author Replies Views Last Post Solver issue with HP 17BII - different from 19BII Jeff Kearns 13 3,502 11-28-2013, 02:36 AM Last Post: Don Shepherd 17BII & 17BII+ Discounted Payback Period Revisited Tom Neudorfl 8 2,206 11-25-2013, 10:28 AM Last Post: Don Shepherd XCas / Prime "solve" question Nigel J Dowrick 4 1,491 11-08-2013, 04:01 AM Last Post: Nigel J Dowrick Using the Prime to solve for eigenvalues Michael de Estrada 28 6,797 10-27-2013, 07:21 AM Last Post: Tarcisi C HP Prime Define: Use with solve, etc. Helge Gabert 0 798 10-23-2013, 06:24 PM Last Post: Helge Gabert HP PRIME - Bode and Black plots - first attempt dg1969 0 834 10-20-2013, 01:32 PM Last Post: dg1969 Is the Prime a superset of the HP 17bII+ ? vrrr 3 1,303 10-16-2013, 12:03 PM Last Post: Michael de Estrada HP 34s solve f'(x)=0 Richard Berler 8 2,084 10-07-2013, 03:03 PM Last Post: Dieter Good puzzle for kids to solve on 35s? snaggs 11 2,625 09-18-2013, 10:40 PM Last Post: David Hayden September SOLVE Newsletter Robert Prosperi 4 1,429 09-07-2013, 01:12 AM Last Post: Mic

Forum Jump: