How do I use
FixedRateBondPriceByYield() function on maturity date that is earlier than today? I get "non tradable error" when applying on date older than today.
library('RQuantLib') FixedRateBondPriceByYield(, settlementDays=1, yield = 0.01524, faceAmount=100, maturityDate = as.Date('2015-07-31'), issueDate = as.Date('2010-07-31'), effectiveDate = as.Date('2010-08-10'), period = 3, rates = 0.0175) Error in fixedRateBondPriceByYieldEngine(settlementDays, yield, calendar, : non tradable at September 28th, 2015 (maturity being July 31st, 2015)
Note: Changing the maturityDate to a date later than today returns an answer.