Package com.opengamma.analytics.financial.model.volatility.smile.fitting.interpolation

Examples of com.opengamma.analytics.financial.model.volatility.smile.fitting.interpolation.SmileInterpolatorSpline


    private final boolean _useIntegratedVariance;
    /** Use log value */
    private final boolean _useLogValue;

    /* package */Builder() {
      this(new SmileInterpolatorSpline(), CombinedInterpolatorExtrapolatorFactory.getInterpolator(Interpolator1DFactory.NATURAL_CUBIC_SPLINE, Interpolator1DFactory.LINEAR_EXTRAPOLATOR),
          true, true, true);
    }
View Full Code Here


    private final boolean _useIntegratedVariance;
    /** Use log value */
    private final boolean _useLogValue;

    /* package */Builder() {
      this(new SmileInterpolatorSpline(), CombinedInterpolatorExtrapolatorFactory.getInterpolator(Interpolator1DFactory.NATURAL_CUBIC_SPLINE, Interpolator1DFactory.LINEAR_EXTRAPOLATOR),
          true, true, true);
    }
View Full Code Here

    @Override
    public SmileInterpolatorSpline buildObject(final FudgeDeserializer deserializer, final FudgeMsg message) {
      final Interpolator1D interpolator = deserializer.fieldValueToObject(Interpolator1D.class, message.getByName(INTERPOLATOR_FIELD_NAME));
      final String extrapolatorFailureBehaviourName = message.getString(EXTRAPOLATOR_FAILURE_BEHAVIOUR_FIELD_NAME);
      return new SmileInterpolatorSpline(interpolator, extrapolatorFailureBehaviourName);
    }
View Full Code Here

  private static final VolatilitySurfaceInterpolator VOLATILITY_SURFACE_INTERPOLATOR = new VolatilitySurfaceInterpolator(new SmileInterpolatorSABR(),
      EXTRAPOLATOR_1D, true, false, false);

  @Test
  public void testSmileInterpolatorSpline() {
    final SmileInterpolatorSpline interpolator = new SmileInterpolatorSpline(EXTRAPOLATOR_1D);
    assertEquals(interpolator, cycleObject(SmileInterpolatorSpline.class, interpolator));
  }
View Full Code Here

    final boolean useLogValue = LocalVolatilityPDEUtils.useLogValue(yAxisType);
    final String surfaceName = desiredValue.getConstraint(SURFACE);
    final String curveCalculationMethodName = desiredValue.getConstraint(ForwardCurveValuePropertyNames.PROPERTY_FORWARD_CURVE_CALCULATION_METHOD);
    final String forwardCurveName = desiredValue.getConstraint(CURVE);
    //TODO R White testing using spline rather than SABR - this should be an option
    final GeneralSmileInterpolator smileInterpolator = new SmileInterpolatorSpline();
    final VolatilitySurfaceInterpolator surfaceFitter = new VolatilitySurfaceInterpolator(smileInterpolator, useLogTime, useIntegratedVariance, useLogValue);
    //  final PiecewiseSABRSurfaceFitter1<?> surfaceFitter = new MoneynessPiecewiseSABRSurfaceFitter(useLogTime, useIntegratedVariance, useLogValue);
    final SmileSurfaceDataBundle data = getData(inputs, getVolatilityDataRequirement(target, surfaceName), getForwardCurveRequirement(target, curveCalculationMethodName, forwardCurveName));
    final BlackVolatilitySurface<?> impliedVolatilitySurface = surfaceFitter.getVolatilitySurface(data);
    final ValueProperties properties = getResultProperties(surfaceName, surfaceType, xAxis, yAxis, yAxisType, curveCalculationMethodName,
View Full Code Here

*/
  public static class Quiet extends BlackVolatilitySurfaceSplineInterpolatorFunction {
    @Override
    protected GeneralSmileInterpolator getSmileInterpolator(final ValueRequirement desiredValue) {
      final Interpolator1D interpolator = getInterpolator1D(desiredValue);
      return new SmileInterpolatorSpline(interpolator, QUIET_SPLINE_EXTRAPOLATOR_FAILURE);
    }
View Full Code Here

  public static class Exception extends BlackVolatilitySurfaceSplineInterpolatorFunction {

    @Override
    protected GeneralSmileInterpolator getSmileInterpolator(final ValueRequirement desiredValue) {
      final Interpolator1D interpolator = getInterpolator1D(desiredValue);
      return new SmileInterpolatorSpline(interpolator, EXCEPTION_SPLINE_EXTRAPOLATOR_FAILURE);
    }
View Full Code Here

  public static class Flat extends BlackVolatilitySurfaceSplineInterpolatorFunction {

    @Override
    protected GeneralSmileInterpolator getSmileInterpolator(final ValueRequirement desiredValue) {
      final Interpolator1D interpolator = getInterpolator1D(desiredValue);
      return new SmileInterpolatorSpline(interpolator, FLAT_SPLINE_EXTRAPOLATOR_FAILURE);
    }
View Full Code Here

    if (!(pdeDirection.equals(LocalVolatilityPDEValuePropertyNames.FORWARD_PDE))) {
      throw new OpenGammaRuntimeException("Can only use forward PDE; should never ask for this direction: " + pdeDirection);
    }
    final DupireLocalVolatilityCalculator localVolatilityCalculator = new DupireLocalVolatilityCalculator(h);
    //TODO R White testing using spline rather than SABR - this should be an option
    final GeneralSmileInterpolator smileInterpolator = new SmileInterpolatorSpline();
    final VolatilitySurfaceInterpolator surfaceFitter = new VolatilitySurfaceInterpolator(smileInterpolator, useLogTime, useIntegratedVariance, useLogValue);
    //final PiecewiseSABRSurfaceFitter1<?> surfaceFitter = new MoneynessPiecewiseSABRSurfaceFitter(useLogTime, useIntegratedVariance, useLogValue);
    //TODO get rid of hardcoded maxProxydelta = 1.5
    final LocalVolatilityForwardPDEGreekCalculator1<?> calculator = new LocalVolatilityForwardPDEGreekCalculator1<Moneyness>(theta, timeSteps, spaceSteps, timeGridBunching, spaceGridBunching,
        /*(MoneynessPiecewiseSABRSurfaceFitter)*/surfaceFitter, localVolatilityCalculator, 1.5);
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.model.volatility.smile.fitting.interpolation.SmileInterpolatorSpline

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.