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

bond_py_ai (routine)

Calculate bond dollar price, yield to maturity, and accrued interest

Introduced in release: 1.0
Component: Restricted
Purpose: Calculates either the dollar price or yield to maturity and the accrued interest for a regular bond or odd first coupon bond.

Notes: This routine internally determines the number of remaining periods to maturity/redemption and selects the appropriate formula (less than or equal to one period or greater than one period) to use for price/yield calculations.

This routine only works with security_type 1, or 3 through 8. It does not work with any foreign security types.

Results: All results are calculated using the industry standard or generally accepted practices selected by the parameter security_type. The variable calculated contains the calculated dollar price to redemption per 100 of maturity value or yield to redemption as a percent, both accurate to as many places as supported by a double precision value. To round or truncate the result to industry standards see the routine rslt_fix_plc. The variable ai contains the accrued interest per 100 of maturity value accurate to as many places as supported by a double precision value.

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

Last Mod Date: 04/01/1993© 2001 TIPS, Inc.Doc Version: 5.0