Examples of SmileInterpolatorSABR


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

      @SuppressWarnings("unchecked")
      final VolatilityFunctionProvider<SABRFormulaData> model = (VolatilityFunctionProvider<SABRFormulaData>) VolatilityFunctionFactory.getCalculator(volatilityFunctionName);
      final WeightingFunction weightingFunction = WeightingFunctionFactory.getWeightingFunction(weightingFunctionName);
      if (externalBeta) {
        final double beta = message.getDouble(BETA_FIELD_NAME);
        return new SmileInterpolatorSABR(model, beta, weightingFunction);
      }
      return new SmileInterpolatorSABR(model, weightingFunction);
    }
View Full Code Here

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

  @Test
  public void testHashCodeEquals() {
    VolatilitySurfaceInterpolator other = new VolatilitySurfaceInterpolator(SMILE_INTERPOLATOR, TIME_INTERPOLATOR, USE_LOG_TIME, USE_INTEGRATED_VARIANCE, USE_LOG_VALUE);
    assertEquals(SURFACE_INTERPOLATOR, other);
    assertEquals(SURFACE_INTERPOLATOR.hashCode(), other.hashCode());
    other = new VolatilitySurfaceInterpolator(new SmileInterpolatorSABR(), TIME_INTERPOLATOR, USE_LOG_TIME, USE_INTEGRATED_VARIANCE, USE_LOG_VALUE);
    assertFalse(other.equals(SURFACE_INTERPOLATOR));
    other = new VolatilitySurfaceInterpolator(SMILE_INTERPOLATOR, Interpolator1DFactory.LINEAR_INSTANCE, USE_LOG_TIME, USE_INTEGRATED_VARIANCE, USE_LOG_VALUE);
    assertFalse(other.equals(SURFACE_INTERPOLATOR));
    other = new VolatilitySurfaceInterpolator(SMILE_INTERPOLATOR, Interpolator1DFactory.LINEAR_INSTANCE, !USE_LOG_TIME, USE_INTEGRATED_VARIANCE, USE_LOG_VALUE);
    assertFalse(other.equals(SURFACE_INTERPOLATOR));
View Full Code Here

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

    assertEquals(interpolator, cycleObject(SmileInterpolatorMixedLogNormal.class, interpolator));
  }

  @Test
  public void testSmileInterpolatorSABR() {
    final SmileInterpolatorSABR interpolator = new SmileInterpolatorSABR(VolatilityFunctionFactory.PAULOT_FORMULA, 0.5, WeightingFunctionFactory.LINEAR_WEIGHTING_FUNCTION);
    assertEquals(interpolator, cycleObject(SmileInterpolatorSABR.class, interpolator));
  }
View Full Code Here

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

    final VolatilityFunctionProvider<SABRFormulaData> model = (VolatilityFunctionProvider<SABRFormulaData>) VolatilityFunctionFactory.getCalculator(modelName);
    final WeightingFunction weightingFunction = WeightingFunctionFactory.getWeightingFunction(weightingFunctionName);
    final boolean useExternalBeta = Boolean.parseBoolean(desiredValue.getConstraint(PROPERTY_SABR_USE_EXTERNAL_BETA));
    if (useExternalBeta) {
      final double beta = Double.parseDouble(desiredValue.getConstraint(PROPERTY_SABR_EXTERNAL_BETA));
      return new SmileInterpolatorSABR(model, beta, weightingFunction);
    }
    return new SmileInterpolatorSABR(model, weightingFunction);
  }
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.