Examples of SwapLeg


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

    return security;
  }

  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

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

    return security;
  }

  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

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

    security.setUniqueId(UniqueId.of(UniqueId.EXTERNAL_SCHEME.getName(), "23498"));
    return security;
  }

  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

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

    security.setUniqueId(UniqueId.of(UniqueId.EXTERNAL_SCHEME.getName(), "5417"));
    return security;
  }

  public static SwapSecurity getXCcySwapSecurity() {
    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("3m Euribor"), FloatingRateType.IBOR);
    final SwapSecurity security = new SwapSecurity(DateUtils.getUTCDate(2013, 1, 1), DateUtils.getUTCDate(2013, 1, 1), DateUtils.getUTCDate(2023, 1, 1), "OG",
        payLeg, receiveLeg);
    security.setUniqueId(UniqueId.of(UniqueId.EXTERNAL_SCHEME.getName(), "311"));
    return security;
  }
View Full Code Here

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

  }

  @Override
  public List<ExternalId> visitForwardSwapSecurity(final ForwardSwapSecurity security) {
    final List<ExternalId> result = new ArrayList<>();
    final SwapLeg payLeg = security.getPayLeg();
    final SwapLeg receiveLeg = security.getReceiveLeg();
    if (payLeg instanceof FloatingInterestRateLeg) {
      result.add(((FloatingInterestRateLeg) payLeg).getFloatingReferenceRateId());
    }
    if (receiveLeg instanceof FloatingInterestRateLeg) {
      result.add(((FloatingInterestRateLeg) receiveLeg).getFloatingReferenceRateId());
View Full Code Here

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

  }

  @Override
  public List<ExternalId> visitSwapSecurity(final SwapSecurity security) {
    final List<ExternalId> result = new ArrayList<>();
    final SwapLeg payLeg = security.getPayLeg();
    final SwapLeg receiveLeg = security.getReceiveLeg();
    if (payLeg instanceof FloatingInterestRateLeg) {
      result.add(((FloatingInterestRateLeg) payLeg).getFloatingReferenceRateId());
    }
    if (receiveLeg instanceof FloatingInterestRateLeg) {
      result.add(((FloatingInterestRateLeg) receiveLeg).getFloatingReferenceRateId());
View Full Code Here

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

  @Override
  public List<ExternalId> visitSwaptionSecurity(final SwaptionSecurity security) {
    final List<ExternalId> result = new ArrayList<>();
    final SwapSecurity underlyingSwap = (SwapSecurity) _securitySource.getSingle(ExternalIdBundle.of(security.getUnderlyingId())); //TODO version
    final SwapLeg payLeg = underlyingSwap.getPayLeg();
    final SwapLeg receiveLeg = underlyingSwap.getReceiveLeg();
    if (payLeg instanceof FloatingInterestRateLeg) {
      result.add(((FloatingInterestRateLeg) payLeg).getFloatingReferenceRateId());
    }
    if (receiveLeg instanceof FloatingInterestRateLeg) {
      result.add(((FloatingInterestRateLeg) receiveLeg).getFloatingReferenceRateId());
View Full Code Here

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

  }

  @Override
  public List<ExternalId> visitZeroCouponInflationSwapSecurity(final ZeroCouponInflationSwapSecurity security) {
    final List<ExternalId> result = new ArrayList<>();
    final SwapLeg payLeg = security.getPayLeg();
    final SwapLeg receiveLeg = security.getReceiveLeg();
    if (payLeg instanceof InflationIndexSwapLeg) {
      result.add(((InflationIndexSwapLeg) payLeg).getIndexId());
    }
    if (receiveLeg instanceof InflationIndexSwapLeg) {
      result.add(((InflationIndexSwapLeg) receiveLeg).getIndexId());
View Full Code Here

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

  }

  @Override
  public List<ExternalId> visitYearOnYearInflationSwapSecurity(final YearOnYearInflationSwapSecurity security) {
    final List<ExternalId> result = new ArrayList<>();
    final SwapLeg payLeg = security.getPayLeg();
    final SwapLeg receiveLeg = security.getReceiveLeg();
    if (payLeg instanceof InflationIndexSwapLeg) {
      result.add(((InflationIndexSwapLeg) payLeg).getIndexId());
    }
    if (receiveLeg instanceof InflationIndexSwapLeg) {
      result.add(((InflationIndexSwapLeg) receiveLeg).getIndexId());
View Full Code Here

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

    return null;
  }

  @Override
  public List<ExternalId> visitForwardSwapSecurity(final ForwardSwapSecurity security) {
    final SwapLeg payLeg = security.getPayLeg();
    final SwapLeg receiveLeg = security.getReceiveLeg();
    if (payLeg.getRegionId().equals(receiveLeg.getRegionId())) {
      return Arrays.asList(payLeg.getRegionId());
    }
    return Arrays.asList(payLeg.getRegionId(), receiveLeg.getRegionId());
  }
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.