Go To Documentation Main IndexMain Index
Go To TIPS, Inc.TIPS Home
N_stpd_dur

N_stpd_dur (routine)

Calculate duration and modified duration for multi-step coupon bond

Introduced in release: 1.0
Component: US Bonds
Purpose: Calculates actual Macaulay duration, in years, and modified duration for a multi-stepped coupon bond.

Notes: A maximum of 20 conversion dates is accommodated.

The price input to this routine is the dirty price, which is used as the denominator in the duration equation. If a 0 is input for price, this routine calculates the denominator as the present value of coupon and principal cash flows.

The maturity date used by this routine can be a maturity/redemption date.

Results: The variable dur contains the calculated Macaulay duration. The variable mod_dur contains the modified duration. The results are accurate to as many places as supported by double precision values.

Error Conditions: Returned values should be ignored for a non-zero status. See Errors.

Last Mod Date: 08/06/1991© 2001 TIPS, Inc.Doc Version: 5.0