Examples of BlackVolatilitySurfaceLogMoneyness


Examples of com.opengamma.analytics.financial.model.volatility.surface.BlackVolatilitySurfaceLogMoneyness

   * @return The annualised expected variance
   */
  public double getAnnualizedVariance(final double expiry, final BlackVolatilitySurfaceMoneyness surface) {
    ArgumentChecker.isTrue(expiry > 0.0, "expiry is {}", expiry);
    ArgumentChecker.notNull(surface, "null surface");
    final BlackVolatilitySurfaceLogMoneyness logMS = BlackVolatilitySurfaceConverter.toLogMoneynessSurface(surface);
    return getAnnualizedVariance(expiry, logMS);
  }
View Full Code Here

Examples of com.opengamma.analytics.financial.model.volatility.surface.BlackVolatilitySurfaceLogMoneyness

        return 0.2 + 0.3 * (delta - 0.4) * (delta - 0.4);
      }
    };

    final BlackVolatilitySurfaceDelta surfaceDelta = new BlackVolatilitySurfaceDelta(FunctionalDoublesSurface.from(surf), FORWARD_CURVE);
    final BlackVolatilitySurfaceLogMoneyness surfaceLogMoneyness = BlackVolatilitySurfaceConverter.toLogMoneynessSurface(surfaceDelta);
    final BlackVolatilitySurfaceMoneyness surfaceMoneyness = BlackVolatilitySurfaceConverter.toMoneynessSurface(surfaceLogMoneyness);
    final BlackVolatilitySurfaceStrike surfaceStrike = BlackVolatilitySurfaceConverter.toStrikeSurface(surfaceLogMoneyness);

    final StaticReplicationDataBundle marketStrike = new StaticReplicationDataBundle(surfaceStrike, DISCOUNT, FORWARD_CURVE);
    final StaticReplicationDataBundle marketLogMoneyness = new StaticReplicationDataBundle(surfaceLogMoneyness, DISCOUNT, FORWARD_CURVE);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.volatility.surface.BlackVolatilitySurfaceLogMoneyness

    final double expiry = 1.5;
    final double fwd = FORWARD_CURVE.getForward(expiry);

    final BlackVolatilitySurfaceStrike surfaceStrike = new BlackVolatilitySurfaceStrike(FunctionalDoublesSurface.from(surf));
    final BlackVolatilitySurfaceMoneyness surfaceMoneyness = BlackVolatilitySurfaceConverter.toMoneynessSurface(surfaceStrike, FORWARD_CURVE);
    final BlackVolatilitySurfaceLogMoneyness surfaceLogMoneyness = BlackVolatilitySurfaceConverter.toLogMoneynessSurface(surfaceStrike, FORWARD_CURVE);
    final BlackVolatilitySurfaceDelta surfaceDelta = BlackVolatilitySurfaceConverter.toDeltaSurface(surfaceStrike, FORWARD_CURVE);

    final double expected = w * sigma1 * sigma1 + (1 - w) * sigma2 * sigma2;
    final double strikeVal = CALCULATOR.getAnnualizedVariance(fwd, expiry, surfaceStrike);
    final double moneynessVal = CALCULATOR.getAnnualizedVariance(expiry, surfaceMoneyness);
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.