Skip to content

callmekatootie/max-pain

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Max Pain

Calculate the max pain for an option chain

Installation

You can install this module through npm:

npm install @dalalstreet/max-pain

Usage

An example of how you can use this module:

const maxPain = require('@dalalstreet/max-pain')

const optionChain = [
  {
    strikePrice: 7700,
    C: {
      openInterest: 1823400
    },
    P: {
      openInterest: 5783025
    }
  },
  {
    strikePrice: 7800,
    C: {
      openInterest: 3448575
    },
    P: {
      openInterest: 4864125
    }
  },
  {
    strikePrice: 7900,
    C: {
      openInterest: 5367450
    },
    P: {
      openInterest: 2559375
    }
  }
]

maxPain.calculate(optionChain)
// => 7800
// This is the strike at which we can say there is max pain for option buyers

About

Calculate the max pain for an option chain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published