[PLAT-6666] Linear interpolation instead of simple average

Calculation of the rate of a stub period by interpolating between two indices: interpolation should be linear and not simple average.

@mclornp @stuartw  Would you take a look?

Maybe timecalculator passing in act act
On 4 Aug 2014 13:59, "matlonyc" <notifications@github.com> wrote:

> In
> projects/OG-Analytics/src/main/java/com/opengamma/analytics/financial/instrument/annuity/FloatingAnnuityDefinitionBuilder.java:
>
> > @@ -899,9 +900,21 @@ private CouponDefinition getIborInterpolatedStubDefinition(
> >        ZonedDateTime secondInterpolatedDate,
> >        double secondInterpolatedYearFraction,
> >        IborIndex secondStubIndex) {
> > -    //Apply equal weightings for both stub tenors
> > -    double weighting = 0.5;
> > -    return CouponIborAverageIndexDefinition.from(paymentDate, accrualStartDate, accrualEndDate, accrualYearFraction, notional, fixingDate, firstStubIndex, secondStubIndex, weighting, weighting, getFixingCalendar(), getFixingCalendar());
> > +
> > +    assert !accrualEndDate.isBefore(firstInterpolatedDate);
> > +    assert !accrualEndDate.isAfter(secondInterpolatedDate);
> > +
> > +    ActualActualISDA dayCount = new ActualActualISDA();
>
> Here we don't care about the denominator. I just needed to count the
> actual number of days between these days to calculate the weight properly.
> That's the way I came up with - if there is another way, I'm interested.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/OpenGamma/OG-Platform/pull/132/files#r15753389>.
>