final Position position = target.getPosition();
final Security security = position.getSecurity();
final GreekResultCollection greekResultCollection = new GreekResultCollection();
final Map<UnderlyingType, Double> underlyingData = new HashMap<UnderlyingType, Double>();
Greek greek;
Underlying order;
List<UnderlyingType> underlyings;
final String underlyingGreekRequirementName = AvailableValueGreeks.getGreekRequirementNameForValueGreekName(getRequirementName());
final Double greekResult = (Double) inputs.getValue(underlyingGreekRequirementName);
greek = AvailableGreeks.getGreekForValueRequirementName(underlyingGreekRequirementName);
greekResultCollection.put(greek, greekResult);
double pointValue = 1.0;
if (security instanceof EquityOptionSecurity) {
pointValue = ((EquityOptionSecurity) security).getPointValue();
}
final OptionTradeData tradeData = new OptionTradeData(position.getQuantity().doubleValue(), pointValue);
order = greek.getUnderlying();
underlyings = order.getUnderlyings();
for (final UnderlyingType underlying : underlyings) {
final Double underlyingValue = (Double) inputs.getValue(UnderlyingTypeToValueRequirementMapper.getValueRequirement(underlying, security));
if (underlyingValue == null) {
throw new NullPointerException("Could not get value for " + underlying + " for security " + security);
} else {