Package com.opengamma.financial.security.option

Examples of com.opengamma.financial.security.option.SwaptionSecurity.accept()


  }

  @Test
  public void testSwaptionSecurity() {
    final SwaptionSecurity security = ExposureFunctionTestHelper.getPaySwaptionSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "SWAPTION"), ids.get(0));
  }

  @Test
View Full Code Here


  }

  @Test
  public void testSwaptionSecurity() {
    final SwaptionSecurity security = ExposureFunctionTestHelper.getPaySwaptionSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "SWAPTION_EUR"), ids.get(0));
  }

  @Test
View Full Code Here

  }

  @Test
  public void testSwaptionSecurity() {
    final SwaptionSecurity security = ExposureFunctionTestHelper.getPaySwaptionSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "EUR"), ids.get(0));
  }

  @Test
View Full Code Here

  @Test
  public void testSwaptionSecurity() {
    SwapSecurity underlying = ExposureFunctionTestHelper.getPayFixedFloatSwapSecurity();
    SwaptionSecurity security = ExposureFunctionTestHelper.getPaySwaptionSecurity();
    List<ExternalId> ids = security.accept(new UnderlyingExposureFunction(ExposureFunctionTestHelper.getSecuritySource(underlying)));
    assertEquals(1, ids.size());
    assertEquals(ExternalSchemes.syntheticSecurityId("3m Euribor"), ids.get(0));
    underlying = ExposureFunctionTestHelper.getReceiveFixedFloatSwapSecurity();
    security = ExposureFunctionTestHelper.getPaySwaptionSecurity();
    ids = security.accept(new UnderlyingExposureFunction(ExposureFunctionTestHelper.getSecuritySource(underlying)));
View Full Code Here

    List<ExternalId> ids = security.accept(new UnderlyingExposureFunction(ExposureFunctionTestHelper.getSecuritySource(underlying)));
    assertEquals(1, ids.size());
    assertEquals(ExternalSchemes.syntheticSecurityId("3m Euribor"), ids.get(0));
    underlying = ExposureFunctionTestHelper.getReceiveFixedFloatSwapSecurity();
    security = ExposureFunctionTestHelper.getPaySwaptionSecurity();
    ids = security.accept(new UnderlyingExposureFunction(ExposureFunctionTestHelper.getSecuritySource(underlying)));
    assertEquals(1, ids.size());
    assertEquals(ExternalSchemes.syntheticSecurityId("3m Euribor"), ids.get(0));
  }

  @Test
View Full Code Here

  }

  @Test
  public void testSwaptionSecurity() {
    final SwaptionSecurity security = ExposureFunctionTestHelper.getPaySwaptionSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertNull(ids);
  }

  @Test
  public void testXCcySwapSecurity() {
View Full Code Here

    if (curveCalculationConfig == null) {
      throw new OpenGammaRuntimeException("Could not find curve calculation configuration named " + curveCalculationConfigName);
    }
    final String[] curveNames = curveCalculationConfig.getYieldCurveNames(); //TODO
    final YieldCurveBundle curves = YieldCurveFunctionUtils.getYieldCurves(inputs, curveCalculationConfig);
    final InstrumentDefinition<?> definition = security.accept(_visitor);
    if (definition == null) {
      throw new OpenGammaRuntimeException("Definition for security " + security + " was null");
    }
    final BlackFlatSwaptionParameters parameters = new BlackFlatSwaptionParameters(volatilitySurface.getSurface(),
        SwaptionUtils.getSwapGenerator(security, definition, securitySource));
View Full Code Here

  }

  @Test
  public void testSwaptionSecurity() {
    final SwaptionSecurity security = ExposureFunctionTestHelper.getPaySwaptionSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(security.getUniqueId().getScheme(), security.getUniqueId().getValue()), ids.get(0));
  }

  @Test
View Full Code Here

  @Test
  public void testSwaptionSecurity() {
    final SwaptionSecurity security = ExposureFunctionTestHelper.getPaySwaptionSecurity();
    final SwapSecurity underlying = ExposureFunctionTestHelper.getPayFixedFloatSwapSecurity();
    final List<ExternalId> ids = security.accept(new RegionExposureFunction(ExposureFunctionTestHelper.getSecuritySource(underlying)));
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "DE"), ids.get(0));
  }

  @Test
View Full Code Here

  }

  @Test
  public void testSwaptionSecurity() {
    final SwaptionSecurity security = ExposureFunctionTestHelper.getPaySwaptionSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertNull(ids);
  }

  @Test
  public void testXCcySwapSecurity() {
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.