Introduced in release: 1.0 Component: US Bonds Purpose:
Calculates either a dollar price given a yield to maturity or a yield to maturity given a dollar price for a regular bond or odd first coupon bond. It then recalculates using a given increase and decrease yield or price increment.
Notes:
The maturity date used by this routine can be a maturity/redemption date.
This routine only works with security_type 1, or 3 through 8. It does not work with any foreign security types.
Results:
The routine returns the three calculated price/yields, the two changes due to the increment adjustments, and the average change. All results are calculated using the industry standard rules or generally accepted practices selected by the parameter security_type. The variable calc_mid contains the calculated dollar price to maturity per 100 of maturity value or yield to maturity as a percent, both accurate to as many places as supported by a double precision value. The variable calc_up contains the calculated dollar price or yield to maturity from the given plus the increment change. The variable calc_down contains the calculated dollar price or yield to redemption from the given minus the increment change. The variable calc_average_chg contains the average change [(up change + down change)/2].
Error Conditions:
Returned values should be ignored for a non-zero status. See Errors.