@Override
protected double getValue(FunctionExecutionContext context, ZonedDateTime date, String riskFreeCurveName, String creditCurveName, ComputationTarget target, YieldCurveBundle data, double price) {
BondSecurity bond = (BondSecurity) target.getSecurity();
final HolidaySource holidaySource = OpenGammaExecutionContext.getHolidaySource(context);
final ConventionBundleSource conventionSource = OpenGammaExecutionContext.getConventionBundleSource(context);
final RegionSource regionSource = OpenGammaExecutionContext.getRegionSource(context);
BondSecurityConverter visitor = new BondSecurityConverter(holidaySource, conventionSource, regionSource);
final BondFixedSecurityDefinition definition = (BondFixedSecurityDefinition) bond.accept(visitor);
BondFixedSecurity derivative = definition.toDerivative(date, riskFreeCurveName, creditCurveName);
return CALCULATOR.zSpreadFromCurvesAndClean(derivative, data, price);