black-scholes
The Black-Scholes formula
This is an implementation of the Black-Scholes model for pricing a European call option.
Assumptions:
- The stock returns follow a geometric Brownian motion
- The underlying asset does not pay a dividend
- The rate of return on the risk-free asset is constant
- There are no arbitrage opportunities on the market
Installation
$ npm install bs-formula
Usage
var bs = require('bs-formula');
var inputs = {
currentPrice: 57,
strikePrice: 50,
interestRate: 0.01,
volatility: 0.50,
timeToExpiration: 0.25
};
bs(inputs);
License
MIT