JSPM

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

Library for analytical pricings of financial derivatives under (log)normal distribution assumptions

Package Exports

  • gaussian-analytics

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 (gaussian-analytics) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

gaussian-analytics

npm version Build status

JavaScript library for analytical pricings of financial derivatives under (log)normal distribution assumptions.

Usage

Experiment in browser console

As gaussian-analytics.js is published as an ES6 module your have to apply the following trick to play with it in your browser's dev console. First open the dev console (in Firefox press F12) and execute

// dynamically import ES6 module and store it as global variable gauss
import('//unpkg.com/gaussian-analytics').then(m => window.gauss=m);

Afterwards, the global variable gauss will contain the module and you can run call exported functions on it, e.g.

gauss.pdf(0);
// 0.3989422804014327

This should work at least for Firefox and Chrome.

API Documentation

Functions

pdf(x)

Probability density function (pdf) for a standard normal distribution.

cdf(x)

Cumulative distribution function (cdf) for a standard normal distribution. Approximation by Zelen, Marvin and Severo, Norman C. (1964), formula 26.2.17.

pdf(x) ⇒

Probability density function (pdf) for a standard normal distribution.

Kind: global function
Returns: density of standard normal distribution

Param Type Description
x number value for which the density is to be calculated

cdf(x) ⇒

Cumulative distribution function (cdf) for a standard normal distribution. Approximation by Zelen, Marvin and Severo, Norman C. (1964), formula 26.2.17.

Kind: global function
Returns: cumulative distribution of standard normal distribution

Param Type Description
x number value for which the cumulative distribution is to be calculated

History

0.2.0 (2020-05-09)

  • cdf (cumulative distribution function) for a standard normal distribution
  • test case for relationship between cdf and pdf

0.1.3 (2020-05-09)

  • extract normalizing constant for improved performance
  • test pdf example values
  • set up eslint linting (also on Travis CI)

0.1.2 (2020-05-09)

  • integrate API doc in README
  • API doc in README can automatically be updated by running npm run update-docs
  • set up .npmignore

0.1.1 (2020-05-09)

  • add first tests
  • set up CI infrastructure with Travis CI for testing

0.1.0 (2020-05-09)

  • pdf (probability density function) for a standard normal distribution
  • First release on npm