private VolatilityCubeData buildMarketDataMap(final ComputationTargetResolver.AtVersionCorrection targetResolver, final FunctionInputs inputs) {
final HashMap<VolatilityPoint, Double> dataPoints = new HashMap<>();
final HashMap<VolatilityPoint, ExternalIdBundle> dataIds = new HashMap<>();
final HashMap<VolatilityPoint, Double> relativeStrikes = new HashMap<>();
final HashMap<Pair<Tenor, Tenor>, Double> strikes = new HashMap<>();
final SnapshotDataBundle otherData = new SnapshotDataBundle();
final ExternalIdBundleResolver resolver = new ExternalIdBundleResolver(targetResolver);
for (final ComputedValue value : inputs.getAllValues()) {
if (!(value.getValue() instanceof Double)) {
continue;
}
final Double dValue = (Double) value.getValue();
final ExternalIdBundle identifiers = value.getSpecification().getTargetSpecification().accept(resolver);
final VolatilityPoint volatilityPoint;
final Pair<Tenor, Tenor> strikePoint;
if (value.getSpecification().getValueName() == MarketDataRequirementNames.MARKET_VALUE) {
volatilityPoint = getByIdentifier(_pointsById, identifiers);
strikePoint = getByIdentifier(_strikesById, identifiers);
} else {
volatilityPoint = null;
strikePoint = null;
}
if (volatilityPoint == null && strikePoint == null) {
otherData.setDataPoint(identifiers, dValue);
} else if (volatilityPoint != null && strikePoint == null) {
if (volatilityPoint.getRelativeStrike() > -50) {
final Double previous = dataPoints.put(volatilityPoint, dValue);
final ExternalIdBundle previousIds = dataIds.put(volatilityPoint, identifiers);
final Double previousRelativeStrike = relativeStrikes.put(volatilityPoint, volatilityPoint.getRelativeStrike());