The answer to this depends on which API level you are using - strata-pricer or strata-calc.
At the strata-pricer level, it is up to the caller to create two different
RatesProvider instances, and pass the correct one when invoking the pricer (by inspecting the details of the instrument).
At the strata-calc level, the relevant plugin points have been changed since the last release. The new way that the strata-calc layer works is simple - the application passes a single instance of
RatesMarketDataLookup to the
CalculationRunner, and that is used to determine what discount and forward curves are used. To achieve your goal, you would implement
RatesMarketDataLookup and add the logic to choose the correct discount curve. One way to do this would be to override just the
filter() method and return one of two “normal” instances of
RatesMarketDataLookup based on the instrument. We want to make this process simpler over time, but it should be possible now.
It is possible to use a curve of zero rates or discount factors for discounting. The implementation will adapt based on the curve you provide, using the metadata to decide. See the
Curves class to create the relevant metadata.
Hope that helps, and feel free to discuss your use of Strata here, or contact us via OpenGamma directly.