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());
if (previous != null && previous > dValue) {
//TODO: this is a hack because we don't understand which tickers are for straddles, so we presume that the straddle has lower vol
dataPoints.put(volatilityPoint, previous);
dataIds.put(volatilityPoint, previousIds);
relativeStrikes.put(volatilityPoint, previousRelativeStrike);