@Override
public FutureSecurity visitRateFutureNode(final RateFutureNode rateFuture) {
final Convention futureConvention = _conventionSource.getConvention(rateFuture.getFutureConvention());
if (futureConvention == null) {
throw new OpenGammaRuntimeException("Future convention was null");
}
if (futureConvention instanceof InterestRateFutureConvention) {
return getInterestRateFuture(rateFuture, (InterestRateFutureConvention) futureConvention, _rate);
} else if (futureConvention instanceof FederalFundsFutureConvention) {
return getFederalFundsFuture(rateFuture, (FederalFundsFutureConvention) futureConvention, _rate);
}
throw new OpenGammaRuntimeException("Could not handle future convention of type " + futureConvention.getClass());
}