final TimeSeriesSamplingFunction samplingFunction = getSamplingFunction(samplingFunctionName);
final LocalDate[] schedule = HOLIDAY_REMOVER.getStrippedSchedule(scheduleCalculator.getSchedule(startDate, now, true, false), WEEKEND_CALENDAR);
DoubleTimeSeries<?> vegaPnL = getPnLSeries(definition, specification, timeSeriesBundle, vegaMatrix, now, schedule, samplingFunction);
vegaPnL = vegaPnL.multiply(position.getQuantity().doubleValue());
final CurrencyPairs currencyPairs = OpenGammaExecutionContext.getCurrencyPairsSource(executionContext).getCurrencyPairs(CurrencyPairs.DEFAULT_CURRENCY_PAIRS);
final CurrencyPair baseCounterPair = currencyPairs.getCurrencyPair(putCurrency, callCurrency);
final String vegaResultCurrency = getResultCurrency(target, baseCounterPair);
final String currencyBase = baseCounterPair.getBase().getCode();
if (!currencyBase.equals(vegaResultCurrency)) {
final Object spotFXObject = inputs.getValue(ValueRequirementNames.HISTORICAL_FX_TIME_SERIES);
if (spotFXObject == null) {
throw new OpenGammaRuntimeException("Could not get spot FX time series");
}