powered by
bond_yields(cashflows, m, searchint = c(-1, 1), tol = 1e-10)
uniroot
data(govbonds) cf_p <- create_cashflows_matrix(govbonds[[1]],include_price=TRUE) m_p <- create_maturities_matrix(govbonds[[1]],include_price=TRUE) bond_yields(cf_p,m_p)
Run the code above in your browser using DataLab