public double getAccruedInterest ( LocalDate date , AnalyticModel model ) { int periodIndex = schedule . getPeriodIndex ( date ) ; Period period = schedule . getPeriod ( periodIndex ) ; DayCountConvention dcc = schedule . getDaycountconvention ( ) ; double accruedInterest = getCouponPayment ( periodIndex , model ) * ( dcc . getDaycountFraction ( period . getPeriodStart ( ) , date ) ) / schedule . getPeriodLength ( periodIndex ) ; return accruedInterest ; }
Returns the accrued interest of the bond for a given date .