Examples of DistributionFromImpliedVolatility


Examples of com.opengamma.analytics.financial.model.option.DistributionFromImpliedVolatility

        final EuropeanVanillaOption option = new EuropeanVanillaOption(k, T, true);
        return sabr.getVolatilityFunction(option, F).evaluate(fittedData);
      }
    };

    final ProbabilityDistribution<Double> sabrDist = new DistributionFromImpliedVolatility(F, T, sabrFunction);

    for (int i = 0; i < 100; i++) {
      final double k = 0.001 + i * 0.1 / 100;

      final double vol = sabrFunction.evaluate(k);
      final double pdf = sabrDist.getPDF(k);
      final double cdf = sabrDist.getCDF(k);
    }
    //TODO this test does nothing
  }
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.