
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
bond-pricing
Advanced tools
pip install bond_pricing
For installation without pulling in scipy as a dependency, see below
The source code is at https://github.com/jrvarma/bond_pricing if you want to go that route.
This package provides bond pricing functions as well as basic NPV/IRR functions. Bond valuation can be done using an yield to maturity or using a zero yield curve. There is a convenience function to construct a zero yield curve from a few points on the par bond or zero yield curve or from Nelson Siegel parameters.
The documentation is available at https://bond-pricing.readthedocs.io/
The bond valuation functions can be used in two modes:
The first mode is similar to spreadsheet bond pricing functions. The settlement date and maturity date are given as dates and the software calculates the time to maturity and to each coupon payment date from these dates. For any daycount other than simple counting of days (ACT/365 in ISDA terminology), this packages relies on the isda_daycounters module that can be downloaded from https://github.com/miradulo/isda_daycounters
Maturity can be given in years (the settle parameter is set to None and is assumed to be time 0) and there are no dates at all. This mode is particularly convenient to price par bonds or price other bonds on issue date or coupon dates. For example, finding the price of a 7 year 3.5% coupon bond if the prevailing yield is 3.65% is easier in this mode as the maturity is simply given as 7.0 instead of providing a maturity date and specifying today's date. Using this mode between coupon dates is not so easy as the user has to basically compute the day count and year fraction and provide the maturity as say 6.7 years.
Bond Valuation
bond_price) or using zero yield curve (zero_curve_bond_price)bond_price_breakup) or using zero yield curve (zero_curve_bond_price_breakup)bond_duration)bond_yield).Zero curve construction
par_yld_to_zero) or vice versa (zero_to_par)nelson_siegel_zero_rate)make_zero_price_fun)Present Value functions
npv)irr)duration).
These functions allow different compounding frequencies: for example, the cash flows may be monthly while the interest rate is semi-annually compounded. The function equiv_rate converts between different compounding frequencies.Annuity functions
annuity_pv)annuity_fv)annuity_rate)annuity_periods).annuity_instalment).annuity_instalment_breakup)In these functions also, the cash flow frequency may be different from the compounding frequency.
This module requires numpy, pandas and scipy. In some environments, installing scipy may be difficult, and only a couple of functions (the newton root finder and CubicSpline interpolation) are actually needed from the huge scipy package. So a provision has been made to avoid scipy with some loss of functionality (the newton root finder is replaced by a less sophisticated root bracketing and bisection algorithm and CubicSpline interpolation is replaced by the much cruder linear interpolation). At run time, the module checks for the availability of scipy and uses the cruder methods (with a suitable warning) if scipy is not available.
To install this package without pulling in scipy as a dependency, do the following:
git clone https://github.com/jrvarma/bond_pricing.git
export no_scipy=1
pip install bond_pricing
FAQs
Bond Price with YTM/zero-curve & NPV, IRR, annuities
We found that bond-pricing demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.