Package com.opengamma.financial.security.swap

Examples of com.opengamma.financial.security.swap.ForwardSwapSecurity


    assertEquals(ExternalId.of(SCHEME, "EUR"), ids.get(0));
  }

  @Test
  public void testForwardFloatFloatSwapSecurity() {
    final ForwardSwapSecurity security = ExposureFunctionTestHelper.getForwardFloatFloatSwapSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalId.of(SCHEME, "EUR"), ids.get(0));
  }
View Full Code Here


    assertEquals(ExternalId.of(SCHEME, "EUR"), ids.get(0));
  }

  @Test
  public void testForwardXCcySwapSecurity() {
    final ForwardSwapSecurity security = ExposureFunctionTestHelper.getForwardXCcySwapSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(2, ids.size());
    assertTrue(ids.containsAll(Arrays.asList(ExternalId.of(SCHEME, "USD"), ExternalId.of(SCHEME, "EUR"))));
  }
View Full Code Here

    assertTrue(ids.containsAll(Arrays.asList(ExternalSchemes.syntheticSecurityId("3m Euribor"), ExternalSchemes.syntheticSecurityId("6m Euribor"))));
  }

  @Test
  public void testForwardFixedFloatSwapSecurity() {
    ForwardSwapSecurity security = ExposureFunctionTestHelper.getPayForwardFixedFloatSwapSecurity();
    List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalSchemes.syntheticSecurityId("3m Euribor"), ids.get(0));
    security = ExposureFunctionTestHelper.getReceiveForwardFixedFloatSwapSecurity();
    ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(1, ids.size());
    assertEquals(ExternalSchemes.syntheticSecurityId("3m Euribor"), ids.get(0));
  }
View Full Code Here

    assertEquals(ExternalSchemes.syntheticSecurityId("3m Euribor"), ids.get(0));
  }

  @Test
  public void testForwardFloatFloatSwapSecurity() {
    final ForwardSwapSecurity security = ExposureFunctionTestHelper.getForwardFloatFloatSwapSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(2, ids.size());
    assertTrue(ids.containsAll(Arrays.asList(ExternalSchemes.syntheticSecurityId("3m Euribor"), ExternalSchemes.syntheticSecurityId("6m Euribor"))));
  }
View Full Code Here

    assertTrue(ids.containsAll(Arrays.asList(ExternalSchemes.syntheticSecurityId("3m Euribor"), ExternalSchemes.syntheticSecurityId("6m Euribor"))));
  }

  @Test
  public void testForwardXCcySwapSecurity() {
    final ForwardSwapSecurity security = ExposureFunctionTestHelper.getForwardXCcySwapSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertEquals(2, ids.size());
    assertTrue(ids.containsAll(Arrays.asList(ExternalSchemes.syntheticSecurityId("6m Euribor"), ExternalSchemes.syntheticSecurityId("3m USD Libor"))));
  }
View Full Code Here

  public static ForwardSwapSecurity getPayForwardFixedFloatSwapSecurity() {
    final InterestRateNotional notional = new InterestRateNotional(EUR, 1000000);
    final SwapLeg payLeg = new FixedInterestRateLeg(DC, PeriodFrequency.SEMI_ANNUAL, DE, BDC, notional, false, 0.04);
    final SwapLeg receiveLeg = new FloatingInterestRateLeg(DC, PeriodFrequency.QUARTERLY, DE, BDC, notional, false, ExternalSchemes.syntheticSecurityId("3m Euribor"), FloatingRateType.IBOR);
    final ForwardSwapSecurity security = new ForwardSwapSecurity(DateUtils.getUTCDate(2013, 1, 1), DateUtils.getUTCDate(2013, 1, 1), DateUtils.getUTCDate(2023, 1, 1), "OG",
        payLeg, receiveLeg, DateUtils.getUTCDate(2014, 1, 1));
    security.setUniqueId(UniqueId.of(UniqueId.EXTERNAL_SCHEME.getName(), "23498"));
    return security;
  }
View Full Code Here

  public static ForwardSwapSecurity getReceiveForwardFixedFloatSwapSecurity() {
    final InterestRateNotional notional = new InterestRateNotional(EUR, 1000000);
    final SwapLeg receiveLeg = new FixedInterestRateLeg(DC, PeriodFrequency.SEMI_ANNUAL, DE, BDC, notional, false, 0.04);
    final SwapLeg payLeg = new FloatingInterestRateLeg(DC, PeriodFrequency.QUARTERLY, DE, BDC, notional, false, ExternalSchemes.syntheticSecurityId("3m Euribor"), FloatingRateType.IBOR);
    final ForwardSwapSecurity security = new ForwardSwapSecurity(DateUtils.getUTCDate(2013, 1, 1), DateUtils.getUTCDate(2013, 1, 1), DateUtils.getUTCDate(2023, 1, 1), "OG",
        payLeg, receiveLeg, DateUtils.getUTCDate(2014, 1, 1));
    security.setUniqueId(UniqueId.of(UniqueId.EXTERNAL_SCHEME.getName(), "23498"));
    return security;
  }
View Full Code Here

  public static ForwardSwapSecurity getForwardFloatFloatSwapSecurity() {
    final InterestRateNotional notional = new InterestRateNotional(EUR, 1000000);
    final SwapLeg payLeg = new FloatingInterestRateLeg(DC, PeriodFrequency.QUARTERLY, DE, BDC, notional, false, ExternalSchemes.syntheticSecurityId("6m Euribor"), FloatingRateType.IBOR);
    final SwapLeg receiveLeg = new FloatingInterestRateLeg(DC, PeriodFrequency.QUARTERLY, DE, BDC, notional, false, ExternalSchemes.syntheticSecurityId("3m Euribor"), FloatingRateType.IBOR);
    final ForwardSwapSecurity security = new ForwardSwapSecurity(DateUtils.getUTCDate(2013, 1, 1), DateUtils.getUTCDate(2013, 1, 1), DateUtils.getUTCDate(2023, 1, 1), "OG",
        payLeg, receiveLeg, DateUtils.getUTCDate(2014, 1, 1));
    security.setUniqueId(UniqueId.of(UniqueId.EXTERNAL_SCHEME.getName(), "23498"));
    return security;
  }
View Full Code Here

  }

  public static ForwardSwapSecurity getForwardXCcySwapSecurity() {
    final SwapLeg payLeg = new FloatingInterestRateLeg(DC, PeriodFrequency.QUARTERLY, US, BDC, new InterestRateNotional(USD, 100000), false, ExternalSchemes.syntheticSecurityId("3m USD Libor"), FloatingRateType.IBOR);
    final SwapLeg receiveLeg = new FloatingInterestRateLeg(DC, PeriodFrequency.QUARTERLY, DE, BDC, new InterestRateNotional(EUR, 100000), false, ExternalSchemes.syntheticSecurityId("6m Euribor"), FloatingRateType.IBOR);
    final ForwardSwapSecurity security = new ForwardSwapSecurity(DateUtils.getUTCDate(2013, 1, 1), DateUtils.getUTCDate(2013, 1, 1), DateUtils.getUTCDate(2023, 1, 1), "OG",
        payLeg, receiveLeg, DateUtils.getUTCDate(2014, 1, 1));
    security.setUniqueId(UniqueId.of(UniqueId.EXTERNAL_SCHEME.getName(), "23498"));
    return security;
  }
View Full Code Here

    final Notional notional = interestRateNotional();
    final boolean payLegFixed = bool();
    final SwapLeg payLeg = payLegFixed ? fixedInterestRateLeg(notional) : floatingInterestRateLeg(notional);
    final SwapLeg receiveLeg = payLegFixed ? floatingInterestRateLeg(notional) : fixedInterestRateLeg(notional);
    final ZonedDateTime forwardStartDate = ZonedDateTime.now().plusMonths(12);
    final ForwardSwapSecurity security = new ForwardSwapSecurity(tradeDate, effectiveDate, maturityDate, counterparty, payLeg, receiveLeg, forwardStartDate);
    store(security);
    return security;
  }
View Full Code Here

TOP

Related Classes of com.opengamma.financial.security.swap.ForwardSwapSecurity

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.