bond_yields: Bond Yield Calculation
Description
Function for the calculation of bond yields.Usage
bond_yields(cashflows, m, searchint = c(-1, 1), tol = 1e-10)
Arguments
cashflows
matrix with the bonds cashflows.
searchint
search interval for root finding.
tol
desired accuracy for function uniroot.
Value
- The function returns a matrix with the bond yields and the associated maturities.