CAD Conventions

When building a CAD curve the RatesCalibrationCsvLoader fails as there’s no TermDepositConvention for CAD-ShortDeposit-T0. Is there a way of defining conventions that aren’t hardcoded into Strata in such a way that RatesCalibrationCsvLoader is aware of them?

Thank you.

See the documentation. You can create your own class, similar to StandardTermDepositConventions and register it using a config file com/opengamma/strata/config/application/TermDepositConvention.ini. See the built in file TermDepositConvention.ini for an example of the format.

Thank you. What should the ini key=value format be for a convention with multiple attributes?

[alternates]
TermDepositConvention = CAD-ShortDeposit-T0, CAD, , 0, 1, CATO

Or is it simpler to load the conventions from a csv file of format like some of the conventions here:
https://github.com/OpenGamma/Strata/tree/master/modules/product/src/main/resources/com/opengamma/strata/config/base ?

Is it correct that the line in the ini file should be
[providers]
com.opengamma.strata.product.deposit.type.TermDepositConventionCsvLookup = instance

to look at a file of name TermDepositConventionData.csv

which is in the format

Name, Currency, DaysAdjustment, BusinessDaysAdjustment, HolidayCalendar
CAD-ShortDeposit-T0, CAD, 0, 1, CATO

?

Currently, Strata does not have a CSV/INI loader for conventions like this. Thus, the simplest approach is to create a class that defines the conventions using Java code, just like StandardTermDepositConventions (a package scoped class). You then add

[providers]
com.you.product.deposit.type.YourTermDepositConventions = constants

to cause the class of constants to be loaded.

If you want to go further and write a CSV loader, you can. See IborIndexCsvLookup for an example of how to write it. If you did that, then you would use a provider of “instance” as you suggest.

I also wanted to draw your attention to how our community driven support operates. If you feel that you are moving beyond initial setup and would like more formal support with service levels, then please contact us!