Bond calculator
Yield and price calculations for bonds.
Gives the same results as Excel YIELD and PRICE functions.
The following day count conventions are supported:
- 30U/360
- ACTUAL/ACTUAL
- ACTUAL/360
- ACTUAL/365
- 30E/360
More info about day count conventions can be found on Wikipedia.
Installation
npm install --save bond-calculator
Usage
const bondCalculator = ; const bond = ; // Calculate yield for a given priceconst yld = bond; // 2.98817753210426% // Calculate price for a given yieldconst price = bond; // 100.69785390232649