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

bond_dur (routine)

Calculates Macaulay duration and modified duration for a bond

Introduced in release: 1.0
Component: US Bonds
Purpose: Calculates actual Macaulay duration, in years, and modified duration for a regular bond or odd first coupon bond.

Alternatives: If price and/or yield, accrued interest, current yield, estimated Macaulay duration, estimated convexity, interest on interest, etc. are required, and estimates of duration measures (change in price due to a + and - swing of 0.01 basis points) can be used in place of actual duration measures, use the bond_risk routine instead of this routine.

Notes: 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.

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: 04/13/1993© 2001 TIPS, Inc.Doc Version: 5.0