简体   繁体   中英

exCoupon Period for a FixedRateBond in QuantLib

I was pricing a fixed rate bond that had the settlement date (2021\/06\/28) as two days before the next coupon payment date (2021\/06\/30). In this scenario, the coupon payment is expected to go the seller and the accrued interest is meant to account for this.

(Accrued Amount: 4.661458333333335 vs BBG: -0.026042)

Any help on this is appreciated.

maturityDate = "20240630"
issueDate = "20170630"
fv= 100
dayCounter = ql.Thirty360(ql.Thirty360.European)
holidayConvention = ql.ModifiedFollowing
calculationDate = "20210625"
settlementDate = "20210629"
yld = 10.98488298/100
compounding = ql.CompoundedThenSimple
couponFreq = ql.Semiannual
coupon = 9.375/100
currency = "USD"
datagen = ql.DateGeneration.Forward
price = 95.97407

You can find information on the params that allow for the custom exCouponPeriod in the manual (see link below) https://rkapl123.github.io/QLAnnotatedSource/d8/df8/class_quant_lib_1_1_fixed_rate_bond.html

Screenshot

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM