Introduced in release: 1.0 Component: Generic Purpose:
Calculates the current yield for a regular bond.
Special Considerations:
This routine does not do any error checking. Therefore, the user must be certain not to pass invalid values as parameters. In particular, NEVER call this routine with a price of zero, or the routine will end with a divide by zero error.
Alternatives:
If price and/or yield, accrued interest, duration measures, interest on interest, etc. are required in addition to current yield, use the bond_risk routine.
Results:
The routine returns the current yield as a percentage, 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.