Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
have you tried simply checking the output in response to each call? is that not the best first step one way or another? – Veeken May 2 '13 at 13:11

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.