Accrued Interest
From Open Ideas
Codebook
In general, it is not necessary to construct an IAccruedInterestRules object from the scratch. Instead you access a corresponding object after it has been created during the construction process of a Bond.
IMarketBond bond = PeriodicBond.create(100.0, Day.create(2008, 8, 4), Day.create(2013, 8, 30), 0.04, 2); IAccruedInterestRules ai = bond.getAccruedInterest();
Now that you have access to the accrued interest rules, you can manipulate some of the conventions and properties.
IDayCountConvention dcc = ai.getDayCountConvention(); // returns an instance of ISMADayCountConvention (by default) IBusinessDayConvention bdc_settlement = ai.getBDCSettlement(); // returns the business day convention for the settlement dates IBusinessDayConvention bdc_payment = ai.getBDCPayment(); // returns the business day convention for the coupon dates
