Package com.opengamma.financial.security.swap

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


      //return AnnuityCouponONSpreadSimplifiedDefinition.from(startDate, maturityTenor, 1, spread, isPayer, indexON, paymentLag, calendar, businessDayConvention, paymentPeriod, eomLeg);
      return Pair.of(new FloatingSpreadIRLeg(dayCount,
                                             PeriodFrequency.of(paymentPeriod),
                                             indexConvention.getRegionCalendar(),
                                             businessDayConvention,
                                             new InterestRateNotional(currency, _amount),
                                             eomLeg,
                                             floatingReferenceRateId,
                                             FloatingRateType.OIS,
                                             _rate),
                     Triple.of(startDate, spotDateLeg, _valuationTime.plus(maturityTenor)));
    }
    //return AnnuityCouponONSimplifiedDefinition.from(startDate, maturityTenor, 1, isPayer, indexON, paymentLag, calendar, businessDayConvention, paymentPeriod, eomLeg);
    return Pair.of(new FloatingInterestRateLeg(dayCount,
                                               PeriodFrequency.of(maturityTenor),
                                               indexConvention.getRegionCalendar(),
                                               businessDayConvention,
                                               new InterestRateNotional(currency, _amount),
                                               eomLeg,
                                               floatingReferenceRateId, FloatingRateType.OIS),
                   Triple.of(startDate, spotDateLeg, _valuationTime.plus(maturityTenor)));

  }
View Full Code Here


  private static SwapLeg fixedLeg(final Frequency frequency) {
    return new FixedInterestRateLeg(DayCountFactory.INSTANCE.getDayCount("Actual/360"),
        frequency,
        ExternalId.of("Reg", "123"),
        BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following"),
        new InterestRateNotional(Currency.USD, 1234),
        true,
        0.1);
  }
View Full Code Here

  private static SwapLeg floatingLeg(final Frequency frequency) {
    return new FloatingInterestRateLeg(DayCountFactory.INSTANCE.getDayCount("Actual/360"),
        frequency,
        ExternalId.of("Reg", "123"),
        BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following"),
        new InterestRateNotional(Currency.GBP, 1234),
        true,
        ExternalId.of("Rate", "ABC"),
        FloatingRateType.IBOR);
  }
View Full Code Here

  private static SwapLeg fixedInflationLeg(final Frequency frequency) {
    return new FixedInflationSwapLeg(DayCountFactory.INSTANCE.getDayCount("Actual/360"),
        frequency,
        ExternalId.of("Reg", "123"),
        BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following"),
        new InterestRateNotional(Currency.USD, 1234),
        true,
        0.1);
  }
View Full Code Here

  private static SwapLeg indexInflationLeg(final Frequency frequency) {
    return new InflationIndexSwapLeg(DayCountFactory.INSTANCE.getDayCount("Actual/360"),
        frequency,
        ExternalId.of("Reg", "123"),
        BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Following"),
        new InterestRateNotional(Currency.USD, 1234),
        true,
        ExternalId.of("Test", "AD"),
        2,
        3,
        InterpolationMethod.MONTH_START_LINEAR);
View Full Code Here

  public static InterestRateInstrumentType getSwapType(final SwapSecurity security) {
    final SwapLeg payLeg = security.getPayLeg();
    final SwapLeg receiveLeg = security.getReceiveLeg();
    if (payLeg.getNotional() instanceof InterestRateNotional && receiveLeg.getNotional() instanceof InterestRateNotional) {
      final InterestRateNotional payNotional = (InterestRateNotional) payLeg.getNotional();
      final InterestRateNotional receiveNotional = (InterestRateNotional) receiveLeg.getNotional();
      if (!payNotional.getCurrency().equals(receiveNotional.getCurrency())) {
        return InterestRateInstrumentType.SWAP_CROSS_CURRENCY;
      }
    }
    if (!payLeg.getRegionId().equals(receiveLeg.getRegionId())) {
      throw new OpenGammaRuntimeException("Pay and receive legs must be from same region; have " + payLeg.getRegionId() + " and " + receiveLeg.getRegionId());
View Full Code Here

    final DayCount dayCount = security.getDayCount();
    final BusinessDayConvention businessDayConvention = security.getBusinessDayConvention();
    final boolean immAdjustMaturityDate = false;
    final boolean adjustEffectiveDate = false;
    final boolean adjustMaturityDate = false;
    final InterestRateNotional notional = security.getNotional();
    final boolean includeAccruedPremium = false;
    final boolean protectionStart = false;
    final double parSpread = security.getIndexCoupon();
    final LegacyVanillaCDSSecurity cds = new LegacyVanillaCDSSecurity(
        isBuy,
View Full Code Here

TOP

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

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.