Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Black-Scholes Option Pricing Model in Scheme (ecounysis.com)
12 points by ericlc on July 11, 2010 | hide | past | favorite | 3 comments


The magic numbers p and b1-b5 were obtained from approximation (2) in Bryc, W. "A uniform approximation to the right normal tail integral", Applied Mathematics and Computation, Volume 127, Issue 2-3 (April 2002), Pages 365-374. I have added links to this reference in the post if you'd like to look at it.


Where do the magic numbers (p, b1-b5) come from? Are these empirically found using curve fitting?

Also, wouldn't it be better to write things like

   (+ (- (* (exp (* (- r) t)) strike) s) call)))
in a more schemer-friendly way as

  (+ call (- s) (* strike (exp (- (* r t)))))
to avoid parenthesis syndrome?

(I was probably wrong to expect self-explanatory code, e.g. with docstrings, but IMO the readability could be improved)


Black-Scholes Option Pricing Model in C, from the same author:

http://blog.ecounysis.com/black-scholes-option-pricing-model...




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: