Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bs-formula

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bs-formula

The Black-Scholes formula

  • 0.0.1
  • unpublished
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 03 Jun 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc