Package com.opengamma.analytics.financial.model.option.pricing.analytic

Examples of com.opengamma.analytics.financial.model.option.pricing.analytic.BaroneAdesiWhaleyModel


      throw new OpenGammaRuntimeException("Unexpected InstrumentDerivative type");
    }
    final double spot = market.getForwardCurve().getSpot();
    final double discountRate = market.getDiscountCurve().getInterestRate(timeToExpiry);
    final double costOfCarry = discountRate - Math.log(market.getForwardCurve().getForward(timeToExpiry) / spot) / timeToExpiry;
    final double impliedVol = (new BaroneAdesiWhaleyModel()).impliedVolatility(optionPrice, spot, strike, discountRate, costOfCarry, timeToExpiry, isCall);
   
    final ValueSpecification resultSpec = new ValueSpecification(getValueRequirementNames()[0], targetSpec, resultProperties);
    return Collections.singleton(new ComputedValue(resultSpec, impliedVol));
  }
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.model.option.pricing.analytic.BaroneAdesiWhaleyModel

Copyright © 2018 www.massapicom. 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.