Black Scholes JS

Check it out on

...or view the source directly

Documentation

Set Up

Before even starting to calculate a fair option price, we need to set up the needed variables. Our variables are held in an instance of BSHolder:

Calculation

All functions regarding calculations are members in BS. Pass an instance of BSHolder to a function from BS. E.g.: calculating put price: