JSPM

black-scholes

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 3292
  • Score
    100M100P100Q159938F
  • License MIT

Option pricing using the Black-Scholes formula.

Package Exports

  • black-scholes

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (black-scholes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

black-scholes

Option pricing using the Black-Scholes formula.

blackScholes(s, k, t, v, r, callPut)

  • s - Current price of the underlying
  • k - Strike price
  • t - Time to experiation in years
  • v - Volatility as a decimal
  • r - Anual risk-free interest rate as a decimal
  • callPut - The type of option to be priced - "call" or "put"

Usage:

var bs = require("black-scholes");

bs.blackScholes(30, 34, .25, .2, .08, "call"); // 0.23834902311961947
bs.blackScholes(30, 34, .25, .2, .08, "put"); // 3.5651039155492974