0.0.1 • Published 9 years ago

bs-formula v0.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
9 years ago

black-scholes

NPM version build status license

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,         // current price of the underlying asset
  strikePrice: 50,          // strike price of the option
  interestRate: 0.01,       // annual risk-free interest rate
  volatility: 0.50,         // volatility of the underlying asset
  timeToExpiration: 0.25    // time to expiration of the option in years
};

bs(inputs); // 9.70

License

MIT