Take the 2-minute tour ×
Quantitative Finance Stack Exchange is a question and answer site for finance professionals and academics. It's 100% free, no registration required.

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")
               setEvaluationDate(as.Date("2004-11-22"))
               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
add comment

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.