Calculate yield from a given set of cash flows and an initial guess
Introduced in release: 1.0 Component: Generic Purpose:
Calculates yield from a given set of cash flows, corresponding number of periods, and an initial guess for yield. The compounding frequency can be specified independently from the cash flow dates. Compounding is done in terms of number of periods (whole and fractional) from the settlement date to the cash flow date.
Special Considerations:
When the cash flows have one or more sign changes there is more than one possible answer for yield. In this case the routine will try and converge on the answer closest to the initial guess specified.
Alternatives:
This routine requires inputs normally provided by other interim routines. The cfs_pyg routine uses the cash flows and relevant dates in computing a yield from a initial guess.
Results:
The result is returned as the value of the function 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.