final Security security = trade.getSecurity();
final InstrumentDefinition<?> definition;
if (security instanceof IRFutureOptionSecurity) {
definition = optionTradeToTxnDefnConverter.convert(trade);
} else {
definition = futureTradeConverter.convert(trade);
}
final HistoricalTimeSeriesBundle timeSeries = HistoricalTimeSeriesFunctionUtils.getHistoricalTimeSeriesInputs(executionContext, inputs);
final InstrumentDerivative derivative = definitionConverter.convert(security, definition, now, timeSeries);
final Double price = derivative.accept(s_priceVisitor);
final ValueSpecification spec = new ValueSpecification(MARGIN_PRICE, target.toSpecification(), desiredValue.getConstraints().copy().get());