Strata using fixingDate for lookup of curve instead of tradeDate


#1

ReceiveLeg of the swap is as follows:

  SwapLeg receiveLeg = RateCalculationSwapLeg.builder()
            .payReceive(RECEIVE)
            .accrualSchedule(PeriodicSchedule.builder()
                .startDate(startDate)
                .endDate(endDate)
                .frequency(Frequency.P3M)
                .businessDayAdjustment(BusinessDayAdjustment.of(BusinessDayConventions.MODIFIED_FOLLOWING, CalendarUSD.NYC))
                .rollConvention(RollConvention.ofDayOfMonth(startDate.getDayOfMonth()))
                .build())
            .paymentSchedule(PaymentSchedule.builder()
                .paymentFrequency(Frequency.P3M)
                .paymentDateOffset(DaysAdjustment.NONE)
                .build())
            .notionalSchedule(notionalSchedule)
            .calculation(IborRateCalculation.builder()
                .index(USD_LIBOR_3M)
                .dayCount(DayCounts.ACT_360)
                .fixingDateOffset(DaysAdjustment.ofBusinessDays(-2, CalendarUSD.NYC, BDA_NONE))
                .build())
            .build();

I am getting exception in Strata library when I supply startDate = effectiveDate = 2016-11-15 for the swap.

Exception in thread “main” java.lang.IllegalStateException: Unable to get a value from a failure result: Unable to get fixing for USD-LIBOR-3M on date 2016-11-10, no time-series supplied.

Why is it looking for the time-series data for Nov 10th when it should be looking for Nov 11th i.e. the trade date.


#2

In the calendar you are using, the 11th of November is a holiday:


#3

Of course! I changed the fixingDateOffset Calendar and it worked! Thanks!