protected Set<ComputedValue> computeValues(final InstrumentDerivative derivative, final StaticReplicationDataBundle market, final FunctionInputs inputs,
final Set<ValueRequirement> desiredValues, final ComputationTargetSpecification targetSpec, final ValueProperties resultProperties) {
final ValueSpecification resultSpec = new ValueSpecification(getValueRequirementNames()[0], targetSpec, resultProperties);
//FIXME use the type system
if (derivative instanceof EquityIndexOption) {
final EquityIndexOptionBlackMethod model = EquityIndexOptionBlackMethod.getInstance();
return Collections.singleton(new ComputedValue(resultSpec, model.forwardIndexValue((EquityIndexOption) derivative, market)));
}
final EquityOptionBlackMethod model = EquityOptionBlackMethod.getInstance();
return Collections.singleton(new ComputedValue(resultSpec, model.forwardIndexValue((EquityOption) derivative, market)));
}