Package com.opengamma.analytics.financial.model.volatility.local

Examples of com.opengamma.analytics.financial.model.volatility.local.LocalVolatilitySurfaceMoneyness


    }
    final Object discountingCurveObject = inputs.getValue(getDiscountingCurveRequirement(target, desiredValue));
    if (discountingCurveObject == null) {
      throw new OpenGammaRuntimeException("Could not get discounting curve");
    }
    final LocalVolatilitySurfaceMoneyness localVolatility = (LocalVolatilitySurfaceMoneyness) localVolatilityObject;
    final ForwardCurve forwardCurve = (ForwardCurve) forwardCurveObject;
    final EuropeanVanillaOption option = getOption(security, now);
    final YieldAndDiscountCurve discountingCurve = (YieldAndDiscountCurve) discountingCurveObject;
    final Object result = getResult(pdeCalculator, localVolatility, forwardCurve, option, discountingCurve);
    final ValueProperties properties = getResultProperties(desiredValue);
View Full Code Here


    final ValueRequirement volatilitySurfaceRequirement = getVolatilitySurfaceRequirement(target, desiredValue);
    final Object localVolatilityObject = inputs.getValue(volatilitySurfaceRequirement);
    if (localVolatilityObject == null) {
      throw new OpenGammaRuntimeException("Could not get local volatility surface");
    }
    final LocalVolatilitySurfaceMoneyness localVolatilityMoneyness = (LocalVolatilitySurfaceMoneyness) localVolatilityObject;
    final LocalVolatilitySurfaceStrike localVolatilityStrike = LocalVolatilitySurfaceConverter.toStrikeSurface(localVolatilityMoneyness);
    final ValueProperties properties = getResultProperties(desiredValue, LocalVolatilitySurfacePropertyNamesAndValues.STRIKE);
    final ValueSpecification spec = new ValueSpecification(ValueRequirementNames.LOCAL_VOLATILITY_SURFACE, target.toSpecification(), properties);
    return Collections.singleton(new ComputedValue(spec, localVolatilityStrike));
  }
View Full Code Here

    if (impliedVolatilitySurfaceObject == null) {
      throw new OpenGammaRuntimeException("Volatility surface was null");
    }
    final BlackVolatilitySurfaceMoneyness impliedVolatilitySurface = (BlackVolatilitySurfaceMoneyness) impliedVolatilitySurfaceObject;
    final DupireLocalVolatilityCalculator calculator = new DupireLocalVolatilityCalculator(eps);
    final LocalVolatilitySurfaceMoneyness localVolatilitySurface = calculator.getLocalVolatility(impliedVolatilitySurface);
    final ValueProperties properties = getResultProperties(desiredValue, LocalVolatilitySurfacePropertyNamesAndValues.MONEYNESS);
    final ValueSpecification spec = new ValueSpecification(ValueRequirementNames.LOCAL_VOLATILITY_SURFACE, target.toSpecification(), properties);
    return Collections.singleton(new ComputedValue(spec, localVolatilitySurface));
  }
View Full Code Here

    }
    final Object discountingCurveObject = inputs.getValue(ValueRequirementNames.YIELD_CURVE);
    if (discountingCurveObject == null) {
      throw new OpenGammaRuntimeException("Could not get discounting curve");
    }
    final LocalVolatilitySurfaceMoneyness localVolatility = (LocalVolatilitySurfaceMoneyness) localVolatilityObject;
    final ForwardCurve forwardCurve = (ForwardCurve) forwardCurveObject;
    final EuropeanVanillaOption option = getOption(security, now);
    final YieldAndDiscountCurve discountingCurve = (YieldAndDiscountCurve) discountingCurveObject;
    final Object result = getResult(pdeCalculator, localVolatility, forwardCurve, option, discountingCurve);
    final ValueProperties properties = getResultProperties(desiredValue);
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.model.volatility.local.LocalVolatilitySurfaceMoneyness

Copyright © 2018 www.massapicom. 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.