How to create custom iborindex

Hi All,

I am trying to create a custom Ibor Index for a zero curve calibration with following details.
iborIndices =ImmutableIborIndex.builder()
.name(“ILS-TELBOR-3M”)
.currency(“ILS”)
.active(true)
.dayCount(DayCounts.ACT_360)
.fixingCalendar(calendar.getId())//This is the custom Holiday Calendar I have created
.fixingDateOffset(DaysAdjustment.ofBusinessDays(0, calendar.getId()))//0 for all
.effectiveDateOffset(DaysAdjustment.ofBusinessDays(0, calendar.getId()))//spot lag
.maturityDateOffset(TenorAdjustment.of(Tenor.TENOR_3M, PeriodAdditionConventions.LAST_BUSINESS_DAY,BusinessDayAdjustment.of(BusinessDayConventions.FOLLOWING, calendar.getId())))//FORWARD_TENOR(Par Curve MTDI)
.fixingTime(LocalTime.MIDNIGHT)//00:00:00
.fixingZone(ZoneId.systemDefault())//Currency timezone or local timezone
.defaultFixedLegDayCount(DayCounts.ACT_360)
.build();
The ibor index is created correctly.However when i do a lookup using CurveGroupDefinitionCsvLoader i get below error:
Caused by: java.lang.IllegalArgumentException: No index found for reference: ILS-TELBOR-3M
at com.opengamma.strata.loader.LoaderUtils.findIndex(LoaderUtils.java:126)
at com.opengamma.strata.loader.csv.CurveGroupDefinitionCsvLoader.createKey(CurveGroupDefinitionCsvLoader.java:144)
at com.opengamma.strata.loader.csv.CurveGroupDefinitionCsvLoader.parseCurveGroupDefinitions(CurveGroupDefinitionCsvLoader.java:128)
at com.opengamma.strata.loader.csv.RatesCalibrationCsvLoader.parse0(RatesCalibrationCsvLoader.java:286)
at com.opengamma.strata.loader.csv.RatesCalibrationCsvLoader.parse(RatesCalibrationCsvLoader.java:252)
at com.opengamma.strata.loader.csv.RatesCalibrationCsvLoader.load(RatesCalibrationCsvLoader.java:206)
at com.opengamma.strata.loader.csv.RatesCalibrationCsvLoader.load(RatesCalibrationCsvLoader.java:186)
at com.j2fe.analytics.MultiCurveCalibration.runCustom(MultiCurveCalibration.java:154)

Is something missing here to create custom IborIndex.I am using Strata 1.6.0

Regards
Surima

Ibor indices must be registered before use using IborIndex.ini as per the extended enum system.

However, instead of doing that I would recommend creating a file META-INF\com\opengamma\strata\config\application\IborIndexData.csv and add the data in CSV format (rather than as Java code). See this link for the file format. You will probably also need to add META-INF\com\opengamma\strata\config\application\FloatingRateNameData.csv to reference ILS-TELEBOR as a floating rate.

Do you have a reference page for the ILS TELEBOR rules? I’ve had a quick look, but I can’t see the rules around effective data, maturity date, day count etc.

thanks
Stephen

If instead I use the iborinfexCsvLoader with a CSV for ILS,will that do the trick?

Regards
Surima

You don’t need to use IborIndexCsvLoader directly. Just add the config file to the classpath in the correct location and it will be picked up automatically.

  1. Add META-INF\com\opengamma\strata\config\application\IborIndexData.csv
  2. Add META-INF\com\opengamma\strata\config\application\FloatingRateNameData.csv
  3. Obtain the Java class by name: IborIndex index = IborIndex.of("ILS-TELEBOR");

Note that there is no need to explicitly register the index, nor is there a need to use a parser. Simply by putting the config files in the right place on the classpath, the indices will be loaded.

thanks
Stephen

If I don’t want to modify the strata-basics 1.6.0 jar,is there another way to add config file in the classpath?If you could point me to an example for the same,it would be really helpful

Regards
Surima

No need to edit the jar file., just add it to the classpath of your project.

If you are using maven it goes under src/main/resources.

Stephen

Hi Stephen,

Thanks for your reply.However I am still unable to get this working even after adding the IborIndexSample.csv in the classpath.Could you share a sample project with the folder structure.

Regards
Surima

My sample CSV looks like this

Name,Currency,Active,Day Count,Fixing Calendar,Offset Days,Offset Calendar,Effective Date Calendar,Tenor,Tenor Convention,FixingTime,FixingZone,Fixed Leg Day Count
ILS-TELBOR-3M,ILS,true,Act/360,ULTIMO_LBB,0,ULTIMO_LBB,ULTIMO_LBB,3M,Following,11:00,Europe/London,Act/360

The file must be named IborIndexData.csv. The full path with maven will be:
src/main/resources/META-INF/com/opengamma/strata/config/application/IborIndexData.csv

Because I was doing some other work, I’ve included ILS-TELEBOR in this repo: https://github.com/OpenGamma/Strata-Extras to demonstrate the setup.

Thanks Stephan.
That worked like a charm