# RQuantLib: any difference between FixedRateBond() and FixedRateBondPriceByYield() with flat term structure?

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?

-
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