Examples of ArrayInterpolator1DDataBundle


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

    final double timeToExpiration = 0.05;
    final double strike = 1.45;
    final SmileDeltaParameters smile = new SmileDeltaParameters(timeToExpiration, ATM[0], DELTA, RISK_REVERSAL[0], STRANGLE[0]);
    final double[] strikes = smile.getStrike(forward);
    final double[] vol = smile.getVolatility();
    final ArrayInterpolator1DDataBundle volatilityInterpolation = new ArrayInterpolator1DDataBundle(strikes, vol);
    final double volExpected = INTERPOLATOR_STRIKE.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.