Currently there is no support for calibrating repo and issuer curves for a legal entity provider. To achieve calibration, Strata would also need to be extended to support pricing Bills.
As such, pricing bonds currently requires the user to manually create the
LegalEntityDiscountingProvider. It provides two maps, one for issuer curves and one for repo curves. The curve data would need to be available separately from Strata. See this test class for an example of how to populate the provider:
The basic idea is that a lookup is performed from the bond to a group, and there is one curve per group. An example of how the group concept might be used would be to define credit ratings. Thus, each individual bond could be mapped to a group representing AAA, AA, BBB etc, or Government vs Municipal etc, with a different pricing curve applied to each to represent the implied risk.
To perform initial pricing, it is possible to take the discount curve for a given currency and use the same curve in
LegalEntityDiscountingProvider, however doing so will not correctly price the legal entity risks of the bond.