Package com.opengamma.analytics.math.interpolation

Examples of com.opengamma.analytics.math.interpolation.DoubleQuadraticInterpolator1D.interpolate()


      final EuropeanVanillaOption option = new EuropeanVanillaOption(k, t, isCall);
      double[] senseFourier = modelGreekFourier.getGreeks(data, option, heston, alpha, 1e-12);

  //    System.out.print(k);
      for(int j=0;j<size;j++) {
        double senseFFT = interpolator.interpolate(db[j], k);
    //    System.out.print("\t"+senseFourier[j]+"\t"+senseFFT);
        assertEquals(senseFourier[j],senseFFT,1e-5);
      }
    //  System.out.print("\n");
         
View Full Code Here


    for (int i = 0; i < 10; i++) {
      double z = -5 + i;
      double k = spot * Math.exp(0.4 * rootT * z);
      double x = k / fwd;
      double vol = ivs.getVolatility(t, k);
      double volFPDE = interpolator.interpolate(idb, x);

      boolean isCall = (k >= fwd);
      BoundaryCondition lowerB = new NeumannBoundaryCondition(isCall ? 0 : -1, sL, true);
      BoundaryCondition upperB = new NeumannBoundaryCondition(isCall ? 1 : 0, sH, false);

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.