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

Examples of com.opengamma.analytics.financial.model.option.pricing.OptionPricingException


        }
        if (Math.abs(dVol) < ACCURACY) {
          return _data.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from((midVol))));
        }
      }
      throw new OptionPricingException("Could not find volatility in " + MAX_ATTEMPTS + " attempts");
    }
View Full Code Here


      @SuppressWarnings("synthetic-access")
      @Override
      public Double evaluate(final StandardOptionDataBundle data) {
        Validate.notNull(data);
        if (Math.abs(definition.getPower() - Math.round(definition.getPower())) > 1e-15) {
          throw new OptionPricingException("Analytic powered option pricing model can only be used when then power is an integer");
        }
        final double s = data.getSpot();
        final double k = definition.getStrike();
        final double t = definition.getTimeToExpiry(data.getDate());
        final double b = data.getCostOfCarry();
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.model.option.pricing.OptionPricingException

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.