/**
* 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.ForexOptionVanilla;
import com.opengamma.analytics.financial.forex.method.ForexOptionVanillaBlackSmileMethod;
import com.opengamma.analytics.financial.interestrate.InstrumentDerivativeVisitorAdapter;
import com.opengamma.analytics.financial.interestrate.YieldCurveBundle;
import com.opengamma.util.money.CurrencyAmount;
/**
* Calculator of the theta (first order derivative with respect to time) using the forward driftless theta
* for Forex derivatives in the Black (Garman-Kohlhagen) world. The theta is not scaled and so is an annual
* value.
* @deprecated Curve builders that use and populate {@link YieldCurveBundle}s are deprecated.
*/
@Deprecated
public class OptionDriftlessThetaBlackForexCalculator extends InstrumentDerivativeVisitorAdapter<YieldCurveBundle, CurrencyAmount> {
/**
* The unique instance of the calculator.
*/
private static final OptionDriftlessThetaBlackForexCalculator INSTANCE = new OptionDriftlessThetaBlackForexCalculator();
/**
* Gets the calculator instance.
* @return The calculator.
*/
public static OptionDriftlessThetaBlackForexCalculator getInstance() {
return INSTANCE;
}
/**
* Constructor.
*/
OptionDriftlessThetaBlackForexCalculator() {
}
/**
* The methods used by the different instruments.
*/
private static final ForexOptionVanillaBlackSmileMethod METHOD_FXOPTIONVANILLA = ForexOptionVanillaBlackSmileMethod.getInstance();
@Override
public CurrencyAmount visitForexOptionVanilla(final ForexOptionVanilla derivative, final YieldCurveBundle data) {
return METHOD_FXOPTIONVANILLA.theta(derivative, data);
}
}