Examples of withSpot()


Examples of com.opengamma.analytics.financial.model.option.definition.StandardOptionDataBundle.withSpot()

    AmericanVanillaOptionDefinition call = new AmericanVanillaOptionDefinition(STRIKE, TENTH_YEAR, true);
    AmericanVanillaOptionDefinition put = new AmericanVanillaOptionDefinition(STRIKE, TENTH_YEAR, false);
    final VolatilitySurface surface = new VolatilitySurface(ConstantDoublesSurface.from(SIGMA1));
    StandardOptionDataBundle vars = new StandardOptionDataBundle(CURVE, B, surface, SPOT1, DATE);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.0205, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 1.8757, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 10, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA2))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.3151, eps);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.definition.StandardOptionDataBundle.withSpot()

    final VolatilitySurface surface = new VolatilitySurface(ConstantDoublesSurface.from(SIGMA1));
    StandardOptionDataBundle vars = new StandardOptionDataBundle(CURVE, B, surface, SPOT1, DATE);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.0205, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 1.8757, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 10, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA2))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.3151, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 3.1256, eps);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.definition.StandardOptionDataBundle.withSpot()

    assertResult(model.getGreeks(call, vars, GREEK_SET), 1.8757, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 10, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA2))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.3151, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 3.1256, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 10.3725, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA3))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.9479, eps);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.definition.StandardOptionDataBundle.withSpot()

    assertResult(model.getGreeks(call, vars, GREEK_SET), 10, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA2))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.3151, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 3.1256, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 10.3725, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA3))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.9479, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 4.3746, eps);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.definition.StandardOptionDataBundle.withSpot()

    assertResult(model.getGreeks(call, vars, GREEK_SET), 3.1256, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 10.3725, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA3))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.9479, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 4.3746, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 11.1578, eps);

    call = new AmericanVanillaOptionDefinition(STRIKE, SIX_MONTHS, true);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.definition.StandardOptionDataBundle.withSpot()

    assertResult(model.getGreeks(call, vars, GREEK_SET), 10.3725, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA3))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.9479, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 4.3746, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 11.1578, eps);

    call = new AmericanVanillaOptionDefinition(STRIKE, SIX_MONTHS, true);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA1))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.8099, eps);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.definition.StandardOptionDataBundle.withSpot()

    assertResult(model.getGreeks(call, vars, GREEK_SET), 11.1578, eps);

    call = new AmericanVanillaOptionDefinition(STRIKE, SIX_MONTHS, true);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA1))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.8099, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 4.0628, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 10.7898, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA2))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 2.7180, eps);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.definition.StandardOptionDataBundle.withSpot()

    call = new AmericanVanillaOptionDefinition(STRIKE, SIX_MONTHS, true);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA1))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 0.8099, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 4.0628, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 10.7898, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA2))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 2.7180, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 6.7661, eps);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.definition.StandardOptionDataBundle.withSpot()

    assertResult(model.getGreeks(call, vars, GREEK_SET), 4.0628, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 10.7898, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA2))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 2.7180, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 6.7661, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 12.9814, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA3))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 4.9665, eps);
View Full Code Here

Examples of com.opengamma.analytics.financial.model.option.definition.StandardOptionDataBundle.withSpot()

    assertResult(model.getGreeks(call, vars, GREEK_SET), 10.7898, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA2))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 2.7180, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 6.7661, eps);
    vars = vars.withSpot(SPOT3);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 12.9814, eps);
    vars = vars.withVolatilitySurface(new VolatilitySurface(ConstantDoublesSurface.from(SIGMA3))).withSpot(SPOT1);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 4.9665, eps);
    vars = vars.withSpot(SPOT2);
    assertResult(model.getGreeks(call, vars, GREEK_SET), 9.4608, eps);
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.