/** * Copyright (C) 2012 - present by OpenGamma Inc. and the OpenGamma group of companies * * Please see distribution for license. */ package com.opengamma.analytics.financial.forex.calculator; import com.opengamma.analytics.financial.forex.derivative.ForexOptionDigital; import com.opengamma.analytics.financial.forex.method.ForexOptionDigitalCallSpreadBlackMethod; import com.opengamma.analytics.financial.interestrate.InstrumentDerivativeVisitorAdapter; import com.opengamma.analytics.financial.interestrate.YieldCurveBundle; import com.opengamma.util.money.CurrencyAmount; /** * Calculator of the gamma (second order derivative with respect to the spot rate) for Forex derivatives using a call spread approach. * @deprecated Curve builders that use and populate {@link YieldCurveBundle}s are deprecated. */ @Deprecated public class GammaSpotCallSpreadBlackForexCalculator extends InstrumentDerivativeVisitorAdapter<YieldCurveBundle, CurrencyAmount> { /** * The methods used by the different instruments. */ private final ForexOptionDigitalCallSpreadBlackMethod _methodFxOptionDigital; /** * Private constructor. * @param spread The relative spread used in the call-spread pricing. The call spread strikes are (for an original strike K), K*(1-spread) and K*(1+spread). */ public GammaSpotCallSpreadBlackForexCalculator(final double spread) { _methodFxOptionDigital = new ForexOptionDigitalCallSpreadBlackMethod(spread); } @Override public CurrencyAmount visitForexOptionDigital(final ForexOptionDigital derivative, final YieldCurveBundle data) { return _methodFxOptionDigital.gammaSpot(derivative, data); } }