Please, consider the following functions from RQuantLib package:

  • FixedRateBond()
  • FixedRateBondPriceByYield()

Is there any difference in the final output if one uses the former specifying a flat term structure, e.g.

params <- list(tradeDate = as.Date(’2002-2-15’),
               settleDate = as.Date(’2002-2-19’),
               dt = .25,
               interpWhat = "discount",
               interpHow = "loglinear")
               discountCurve.flat <- DiscountCurve(params, list(flat = 0.05))

instead of the latter with FixedRateBondPriceByYield(..., yield = 0.05, ...)? (Use the same parameters at ...).

FixedRateBondPriceByYield() should just return bond's clean price, while FixedRateBond() can return dirty price in addition to accrued interests and cash flow tables.

Anything else?

  • $\begingroup$ have you tried simply checking the output in response to each call? is that not the best first step one way or another? $\endgroup$ – Veeken May 2 '13 at 13:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.