Forward starting par swap rates from a RatesProvider


#1

How can I get a forward starting par swap rate from a RatesProvider? i.e. the 5 year rate , 2 years forward.

BTW there’s a small error in the page http://strata.opengamma.io/holidays/ in the paragraph “Holiday Calendar” on the line
HolidayCalendar holCal = HolidayCalendar.of(“GBLO”);

should read HolidayCalendar holCal = HolidayCalendars.of(“GBLO”);


#2

The par rate of a swap can be computed by parRate(ResolvedSwapTrade, RatesProvider) in DiscountingSwapTradePricer.
It is convenient to use FixedIborSwapConvention to create a swap trade. For example, the method createTrade(LocalDate, Period, Tenor, BuySell, double, double, ReferenceData) creates a forward starting trade. Standard swap conventions are available in FixedIborSwapConventions.

Thank you for pointing out the error. We will correct the documentation.