Package com.opengamma.analytics.math.surface

Examples of com.opengamma.analytics.math.surface.ConstantDoublesSurface


    assertEquals(vs1, vs2);
  }

  @Test
  public void testMoneynessSurface() {
    final ConstantDoublesSurface surface = ConstantDoublesSurface.from(0.5);
    final ForwardCurve curve = new ForwardCurve(1);
    final BlackVolatilitySurfaceMoneyness moneyness1 = new BlackVolatilitySurfaceMoneyness(surface, curve);
    BlackVolatilitySurfaceMoneyness moneyness2 = cycleObject(BlackVolatilitySurfaceMoneyness.class, moneyness1);
    assertEquals(moneyness1, moneyness2);
    moneyness2 = cycleObject(BlackVolatilitySurfaceMoneyness.class, new BlackVolatilitySurfaceMoneyness(moneyness1));
View Full Code Here


    assertEquals(moneyness1, moneyness2);
  }

  @Test
  public void testMoneynessSurfaceBackedByGrid() {
    final ConstantDoublesSurface surface = ConstantDoublesSurface.from(0.5);
    final ForwardCurve curve = new ForwardCurve(1);
    final StandardSmileSurfaceDataBundle gridData = new StandardSmileSurfaceDataBundle(100.0, new double[] {101,102,103}, new double[] {1,2,3},
        new double[][] {{80,80},{100,100},{120,120}}, new double[][] {{.3,.25},{.2,.2},{.3,.25}}, new LinearInterpolator1D() );
    final VolatilitySurfaceInterpolator interpolator = new VolatilitySurfaceInterpolator();
    final BlackVolatilitySurfaceMoneynessFcnBackedByGrid moneyness1 = new BlackVolatilitySurfaceMoneynessFcnBackedByGrid(surface, curve, gridData, interpolator);
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.math.surface.ConstantDoublesSurface

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.