public double getCouponPayment ( int periodIndex , AnalyticModel model ) { ForwardCurve forwardCurve = model . getForwardCurve ( forwardCurveName ) ; if ( forwardCurve == null && forwardCurveName != null && forwardCurveName . length ( ) > 0 ) { throw new IllegalArgumentException ( "No forward curve with name '" + forwardCurveName + "' was found in the model:\n" + model . toString ( ) ) ; } double periodLength = schedule . getPeriodLength ( periodIndex ) ; double couponPayment = fixedCoupon ; if ( forwardCurve != null ) { couponPayment = floatingSpread + forwardCurve . getForward ( model , schedule . getFixing ( periodIndex ) ) ; } return couponPayment * periodLength ; }
Returns the coupon payment of the period with the given index . The analytic model is needed in case of floating bonds .