Examples of ArrayInterpolator1DDataBundle


Examples of com.opengamma.analytics.math.interpolation.data.ArrayInterpolator1DDataBundle

    return Math.pow(y2 / y1, (value - x1) / (x2 - x1)) * y1 * Math.log(y2 / y1) / (x2 - x1);
  }

  @Override
  public Interpolator1DDataBundle getDataBundle(final double[] x, final double[] y) {
    return new ArrayInterpolator1DDataBundle(x, y);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.data.ArrayInterpolator1DDataBundle

    return new ArrayInterpolator1DDataBundle(x, y);
  }

  @Override
  public Interpolator1DDataBundle getDataBundleFromSortedArrays(final double[] x, final double[] y) {
    return new ArrayInterpolator1DDataBundle(x, y, true);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.data.ArrayInterpolator1DDataBundle

    return w;
  }

  @Override
  public Interpolator1DDataBundle getDataBundle(final double[] x, final double[] y) {
    return new ArrayInterpolator1DDataBundle(x, y);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.data.ArrayInterpolator1DDataBundle

    return new ArrayInterpolator1DDataBundle(x, y);
  }

  @Override
  public Interpolator1DDataBundle getDataBundleFromSortedArrays(final double[] x, final double[] y) {
    return new ArrayInterpolator1DDataBundle(x, y, true);
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.data.ArrayInterpolator1DDataBundle

    return result;
  }

  @Override
  public Interpolator1DDoubleQuadraticDataBundle getDataBundle(final double[] x, final double[] y) {
    return new Interpolator1DDoubleQuadraticDataBundle(new ArrayInterpolator1DDataBundle(x, y));
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.data.ArrayInterpolator1DDataBundle

    return new Interpolator1DDoubleQuadraticDataBundle(new ArrayInterpolator1DDataBundle(x, y));
  }

  @Override
  public Interpolator1DDoubleQuadraticDataBundle getDataBundleFromSortedArrays(final double[] x, final double[] y) {
    return new Interpolator1DDoubleQuadraticDataBundle(new ArrayInterpolator1DDataBundle(x, y, true));
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.data.ArrayInterpolator1DDataBundle

        xy[i] = x[i] * y[i];
      }
    }

    //    final PiecewisePolynomialResult poly = BASE.interpolate(xx, xy);
    return new Interpolator1DPiecewisePoynomialDataBundle(new ArrayInterpolator1DDataBundle(xx, xy, true), new PiecewiseCubicHermiteSplineInterpolatorWithSensitivity());
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.data.ArrayInterpolator1DDataBundle

    throw new NotImplementedException();
  }

  @Override
  public Interpolator1DDataBundle getDataBundle(final double[] x, final double[] y) {
    return new Interpolator1DQuadraticSplineDataBundle(new ArrayInterpolator1DDataBundle(x, y));
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.data.ArrayInterpolator1DDataBundle

    return new Interpolator1DQuadraticSplineDataBundle(new ArrayInterpolator1DDataBundle(x, y));
  }

  @Override
  public Interpolator1DDataBundle getDataBundleFromSortedArrays(final double[] x, final double[] y) {
    return new Interpolator1DQuadraticSplineDataBundle(new ArrayInterpolator1DDataBundle(x, y, true));
  }
View Full Code Here

Examples of com.opengamma.analytics.math.interpolation.data.ArrayInterpolator1DDataBundle

    final double forward = 1.40;
    final double timeToExpiration = 0.50;
    final double strike = 1.50;
    final double[] strikes = SMILE_TERM.getVolatilityTerm()[2].getStrike(forward);
    final double[] vol = SMILE_TERM.getVolatilityTerm()[2].getVolatility();
    final ArrayInterpolator1DDataBundle volatilityInterpolation = new ArrayInterpolator1DDataBundle(strikes, vol);
    final LinearInterpolator1D interpolator = new LinearInterpolator1D();
    final double volExpected = interpolator.interpolate(volatilityInterpolation, strike);
    final double volComputed = SMILE_TERM.getVolatility(timeToExpiration, strike, forward);
    assertEquals("Smile by delta term structure: volatility interpolation on strike", volExpected, volComputed, TOLERANCE_VOL);
  }
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.