The following warnings occurred:
Warning [2] Undefined array key 67706 - Line: 275 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 275 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $thread - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $fid - Line: 295 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 295 errorHandler->error_callback
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined array key 67706 - Line: 331 - File: inc/plugins/threaded_mode.php PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php 331 errorHandler->error_callback
/inc/plugins/threaded_mode.php 304 ThreadedMode::buildtree
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $theme - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Trying to access array offset on value of type null - Line: 3 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 3 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Undefined variable $lang - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks
Warning [2] Attempt to read property "messages_in_thread" on null - Line: 5 - File: inc/plugins/threaded_mode.php(305) : eval()'d code PHP 8.1.2-1ubuntu2.14 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/threaded_mode.php(305) : eval()'d code 5 errorHandler->error_callback
/inc/plugins/threaded_mode.php 305 eval
/inc/plugins/threaded_mode.php 23 ThreadedMode::showthread_threaded
/inc/class_plugins.php 142 threaded_mode_showthread_threaded
/showthread.php 918 pluginSystem->run_hooks





Black-Scholes on 17bII+ using Taylor series VERY ACCURATE!



#2

Special Thanks to Tizedes Csaba for pointing me to the Taylor series approximation for the normal cumulative distribution.

This implementation of Black-Scholes 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%/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)))-CALLV:
-PS+PE*EXP(-RF%*T/100)+CALLV-PUTV)


Possibly Related Threads…
Thread Author Replies Views Last Post
  HP Prime: CAS taylor Alberto Candel 5 3,876 12-13-2013, 09:45 PM
Last Post: Alberto Candel
  17BII & 17BII+ Discounted Payback Period Revisited Tom Neudorfl 8 2,808 11-25-2013, 10:28 AM
Last Post: Don Shepherd
  HP PRIME - Bode and Black plots - first attempt dg1969 0 1,028 10-20-2013, 01:32 PM
Last Post: dg1969
  wp34s (Why it's so accurate) Barry Mead 22 5,253 08-05-2013, 08:51 AM
Last Post: fhub
  Creeping black pattern on HP-11C screen Larry Gagnon 6 2,017 04-12-2013, 10:09 AM
Last Post: Peter Murphy (Livermore)
  [WP 34s] Taylor Series expansion Valentin Albillo 3 1,386 01-20-2013, 03:17 PM
Last Post: Thomas Klemm
  HP 48GX with Black LCD - S/N ID Jeff Kearns 4 1,746 12-15-2012, 03:55 PM
Last Post: aurelio
  [WP34s] Accurate Clock Katie Wasserman 1 998 04-08-2012, 01:25 AM
Last Post: Walter B
  HP 67 Black Box Fouad M. Kaadou 9 2,348 09-20-2011, 11:29 AM
Last Post: Jim Horn
  black HP17bII Jose Gonzalez Divasson 5 1,840 06-17-2011, 05:20 PM
Last Post: Don Shepherd

Forum Jump: