Function for the calculation of bond prices according to the chosen approach (Diebold/Li, Nelson/Siegel, Svensson) based on the cashflows and maturities matrix of the bonds.
Usage
bond_prices(method = "ns", beta, m, cf, lambda)
Arguments
method
defines the desired method: "ns" for the Nelson/Siegel,"dl" for Diebold/Li, "sv" for the Svensson approach.
beta
parameter vector, is linked to the chosen approach.
m
maturities matrix, consists of the maturity dates which are appended to the cashflows of the bonds.
cf
cashflows matrix.
lambda
additional parameter for the "dl" spot rate function