Package com.opengamma.financial.security.swap

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


    assertNull(ids);
  }

  @Test
  public void testReceiveZeroCouponInflationSwapSecurity() {
    final ZeroCouponInflationSwapSecurity security = ExposureFunctionTestHelper.getReceiveZeroCouponInflationSwapSecurity();
    final List<ExternalId> ids = security.accept(EXPOSURE_FUNCTION);
    assertNull(ids);
  }
View Full Code Here


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

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

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

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

  @Test
  public void inflationFixedFloat() {
    final Frequency annual = SimpleFrequency.ANNUAL;
    final Frequency quarterly = SimpleFrequency.QUARTERLY;
    final ZeroCouponInflationSwapSecurity swap = zciSwap(fixedInflationLeg(annual), indexInflationLeg(quarterly));
    final Pair<Frequency, Frequency> frequencies = new FrequencyVisitor().visit(swap);
    final Pair<Frequency, Frequency> expected = Pair.of(annual, quarterly);
    assertEquals(expected, frequencies);
  }
View Full Code Here

  @Test
  public void inflationFloatFloat() {
    final Frequency annual = SimpleFrequency.ANNUAL;
    final Frequency quarterly = SimpleFrequency.QUARTERLY;
    final ZeroCouponInflationSwapSecurity swap = zciSwap(indexInflationLeg(annual), indexInflationLeg(quarterly));
    final Pair<Frequency, Frequency> frequencies = new FrequencyVisitor().visit(swap);
    final Pair<Frequency, Frequency> expected = Pair.of(annual, quarterly);
    assertEquals(expected, frequencies);
  }
View Full Code Here

  private static SwapSecurity swap(final SwapLeg payLeg, final SwapLeg receiveLeg) {
    return new SwapSecurity(ZonedDateTime.now(), ZonedDateTime.now(), ZonedDateTime.now(), "cpty", payLeg, receiveLeg);
  }

  private static ZeroCouponInflationSwapSecurity zciSwap(final SwapLeg payLeg, final SwapLeg receiveLeg) {
    return new ZeroCouponInflationSwapSecurity(ZonedDateTime.now(), ZonedDateTime.now(), ZonedDateTime.now(), "cpty", payLeg, receiveLeg);
  }
View Full Code Here

TOP

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

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.