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

Examples of com.opengamma.analytics.financial.model.volatility.smile.fitting.sabr.ForexSmileDeltaSurfaceDataBundle


    public ForexSmileDeltaSurfaceDataBundle buildObject(final FudgeDeserializer deserializer, final FudgeMsg message) {
      final ForwardCurve forwardCurve = deserializer.fieldValueToObject(ForwardCurve.class, message.getByName(FORWARD_CURVE_FIELD_NAME));
      final double[] expiries = deserializer.fieldValueToObject(double[].class, message.getByName(EXPIRIES_FIELD_NAME));
      final double[][] strikes = deserializer.fieldValueToObject(double[][].class, message.getByName(STRIKES_FIELD_NAME));
      final double[][] vols = deserializer.fieldValueToObject(double[][].class, message.getByName(VOLS_FIELD_NAME));
      return new ForexSmileDeltaSurfaceDataBundle(forwardCurve, expiries, strikes, vols, true);
    }
View Full Code Here


    assertEquals(STANDARD_DATA.getForwardCurve().getSpot(), data.getForwardCurve().getSpot(), 1e-12);
  }

  @Test
  public void testForexData() {
    final ForexSmileDeltaSurfaceDataBundle data = cycleObject(ForexSmileDeltaSurfaceDataBundle.class, FOREX_DATA);
    assertArrayEquals(FOREX_DATA.getExpiries(), data.getExpiries(), 0);
    assertTrue(Arrays.deepEquals(FOREX_DATA.getStrikes(), data.getStrikes()));
    assertTrue(Arrays.deepEquals(FOREX_DATA.getVolatilities(), data.getVolatilities()));
    assertCurveEquals(FOREX_DATA.getForwardCurve().getForwardCurve(), data.getForwardCurve().getForwardCurve());
    assertCurveEquals(FOREX_DATA.getForwardCurve().getDriftCurve(), data.getForwardCurve().getDriftCurve());
    assertEquals(FOREX_DATA.getForwardCurve().getSpot(), data.getForwardCurve().getSpot(), 1e-12);
  }
View Full Code Here

        riskReversals[i] = riskReversalList.toDoubleArray();
        strangle[i] = strangleList.toDoubleArray();
      }
    }
    final boolean isCallData = true; //TODO this shouldn't be hard-coded
    return new ForexSmileDeltaSurfaceDataBundle(forwardCurve, expiries, deltas, atms, riskReversals, strangle, isCallData);
  }
View Full Code Here

        riskReversals[i] = riskReversalList.toDoubleArray();
        strangle[i] = strangleList.toDoubleArray();
      }
    }
    final boolean isCallData = true; //TODO this shouldn't be hard-coded
    return new ForexSmileDeltaSurfaceDataBundle(forwardCurve, expiries, deltas, atms, riskReversals, strangle, isCallData);
  }
View Full Code Here

        riskReversals[i] = riskReversalList.toDoubleArray();
        strangle[i] = strangleList.toDoubleArray();
      }
    }
    final boolean isCallData = true; //TODO this shouldn't be hard-coded
    return new ForexSmileDeltaSurfaceDataBundle(forwardCurve, expiries, deltas, atms, riskReversals, strangle, isCallData);
  }
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.model.volatility.smile.fitting.sabr.ForexSmileDeltaSurfaceDataBundle

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.