Package com.opengamma.analytics.financial.model.option.definition

Examples of com.opengamma.analytics.financial.model.option.definition.YieldCurveWithBlackForexTermStructureBundle.checkCurrencies()


  public double impliedVolatility(final ForexOptionVanilla optionForex, final YieldCurveBundle curves) {
    ArgumentChecker.notNull(curves, "Curves");
    ArgumentChecker.isTrue(curves instanceof YieldCurveWithBlackForexTermStructureBundle, "Yield curve bundle should contain Black volatility data");
    final YieldCurveWithBlackForexTermStructureBundle black = (YieldCurveWithBlackForexTermStructureBundle) curves;
    ArgumentChecker.notNull(optionForex, "Forex option");
    ArgumentChecker.isTrue(black.checkCurrencies(optionForex.getCurrency1(), optionForex.getCurrency2()), "Option currencies not compatible with data");
    final double volatility = black.getVolatilityModel().getVolatility(optionForex.getTimeToExpiry());
    return volatility;
  }

  /**
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.