Package com.opengamma.financial.convention.daycount

Examples of com.opengamma.financial.convention.daycount.DayCount


      throw new OpenGammaRuntimeException("Could not get ON Index publication lag for " + indexConvention.getIdentifiers());
    }
    final ConventionBundle brlSwapConvention = _conventionSource.getConventionBundle(simpleNameSecurityId("BRL_DI_SWAP"));
    final IndexON index = new IndexON(floatLeg.getFloatingReferenceRateId().getValue(), currency, indexConvention.getDayCount(), publicationLag);
    final String name = index.getName();
    final DayCount fixedLegDayCount = fixedLeg.getDayCount();
    final BusinessDayConvention businessDayConvention = fixedLeg.getBusinessDayConvention();
    final boolean isEOM = fixedLeg.isEom();
    final int spotLag = brlSwapConvention.getSwapFixedLegSettlementDays();
    final int paymentLag = brlSwapConvention.getSwapFixedLegSettlementDays();
    final double notional = ((InterestRateNotional) fixedLeg.getNotional()).getAmount();
View Full Code Here


    final Double rate = _marketData.getDataPoint(_dataId);
    if (rate == null) {
      throw new OpenGammaRuntimeException("Could not get market data for " + _dataId);
    }
    final Currency currency = convention.getCurrency();
    final DayCount dayCount = convention.getDayCount();
    final BusinessDayConvention businessDayConvention = convention.getBusinessDayConvention();
    final boolean eomLeg = convention.isIsEOM();
    final int spotLagLeg = convention.getSettlementDays();
    final ZonedDateTime spotDateLeg = ScheduleCalculator.getAdjustedDate(_valuationTime, spotLagLeg, calendar);
    final ZonedDateTime startDate = ScheduleCalculator.getAdjustedDate(spotDateLeg, swapNode.getStartTenor().getPeriod(), businessDayConvention, calendar, eomLeg);
View Full Code Here

      }
      throw new OpenGammaRuntimeException("Convention of the underlying was not an ibor index convention; have " + underlyingConvention.getClass());
    }
    final IborIndexConvention indexConvention = (IborIndexConvention) underlyingConvention;
    final Currency currency = indexConvention.getCurrency();
    final DayCount dayCount = indexConvention.getDayCount();
    final BusinessDayConvention businessDayConvention = indexConvention.getBusinessDayConvention();
    final boolean eomIndex = indexConvention.isIsEOM();
    final boolean eomLeg = convention.isIsEOM();
    final Period indexTenor = convention.getResetTenor().getPeriod();
    final Calendar calendar = CalendarUtils.getCalendar(_regionSource, _holidaySource, indexConvention.getFixingCalendar());
View Full Code Here

      }
      throw new OpenGammaRuntimeException("Convention of the underlying was not an ibor index convention; have " + underlyingConvention.getClass());
    }
    final IborIndexConvention indexConvention = (IborIndexConvention) underlyingConvention;
    final Currency currency = indexConvention.getCurrency();
    final DayCount dayCount = indexConvention.getDayCount();
    final BusinessDayConvention businessDayConvention = indexConvention.getBusinessDayConvention();
    final boolean eomIndex = indexConvention.isIsEOM();
    final boolean eomLeg = convention.isIsEOM();
    final Period indexTenor = convention.getCompositionTenor().getPeriod();
    final Period paymentTenor = convention.getPaymentTenor().getPeriod();
View Full Code Here

  private AnnuityDefinition<? extends PaymentDefinition> getOISLeg(final OISLegConvention convention, final SwapNode swapNode, final boolean isPayer,
      final boolean isMarketDataSpread) {
    final OvernightIndexConvention indexConvention = (OvernightIndexConvention) _conventionSource.getConvention(convention.getOvernightIndexConvention());
    final Currency currency = indexConvention.getCurrency();
    final DayCount dayCount = indexConvention.getDayCount();
    final int publicationLag = indexConvention.getPublicationLag();
    final Calendar calendar = CalendarUtils.getCalendar(_regionSource, _holidaySource, indexConvention.getRegionCalendar());
    final int spotLagLeg = convention.getSettlementDays();
    final ZonedDateTime spotDateLeg = ScheduleCalculator.getAdjustedDate(_valuationTime, spotLagLeg, calendar);
    final Period maturityTenor = swapNode.getMaturityTenor().getPeriod();
View Full Code Here

  private Expiry expiry() {
    return new Expiry(ZonedDateTime.now().plusMonths(14));
  }

  private FixedInterestRateLeg fixedInterestRateLeg(final Notional notional) {
    final DayCount dayCount = dayCount();
    final Frequency frequency = frequency();
    final ExternalId regionIdentifier = region();
    final BusinessDayConvention businessDayConvention = businessDayConvention();
    final boolean eom = bool();
    final double rate = 0;
View Full Code Here

    final double rate = 0;
    return new FixedInterestRateLeg(dayCount, frequency, regionIdentifier, businessDayConvention, notional, eom, rate);
  }

  private FloatingInterestRateLeg floatingInterestRateLeg(final Notional notional) {
    final DayCount dayCount = dayCount();
    final Frequency frequency = frequency();
    final ExternalId regionIdentifier = region();
    final BusinessDayConvention businessDayConvention = businessDayConvention();
    final boolean eom = bool();
    final ExternalId floatingReferenceRateId = ExternalId.of(ExternalSchemes.BLOOMBERG_TICKER, "US0003M Index");
View Full Code Here

    final YieldConvention yieldConvention = yieldConvention();
    final Expiry lastTradeDate = expiry();
    final String couponType = "couponType";
    final double couponRate = 1.5;
    final Frequency couponFrequency = frequency();
    final DayCount dayCountConvention = dayCount();
    final ZonedDateTime interestAccrualDate = ZonedDateTime.now().minusMonths(24);
    final ZonedDateTime settlementDate = ZonedDateTime.now().minusMonths(12);
    final ZonedDateTime firstCouponDate = interestAccrualDate;
    final Double issuancePrice = 100d;
    final double totalAmountIssued = 1e9;
View Full Code Here

    final YieldConvention yieldConvention = yieldConvention();
    final Expiry lastTradeDate = expiry();
    final String couponType = "couponType";
    final double couponRate = 1.5;
    final Frequency couponFrequency = frequency();
    final DayCount dayCountConvention = dayCount();
    final ZonedDateTime interestAccrualDate = ZonedDateTime.now().minusMonths(24);
    final ZonedDateTime settlementDate = ZonedDateTime.now().minusMonths(12);
    final ZonedDateTime firstCouponDate = interestAccrualDate;
    final Double issuancePrice = 100d;
    final double totalAmountIssued = 1e9;
View Full Code Here

    final YieldConvention yieldConvention = yieldConvention();
    final Expiry lastTradeDate = expiry();
    final String couponType = "couponType";
    final double couponRate = 1.5;
    final Frequency couponFrequency = frequency();
    final DayCount dayCountConvention = dayCount();
    final ZonedDateTime interestAccrualDate = ZonedDateTime.now().minusMonths(24);
    final ZonedDateTime settlementDate = ZonedDateTime.now().minusMonths(12);
    final ZonedDateTime firstCouponDate = interestAccrualDate;
    final Double issuancePrice = 100d;
    final double totalAmountIssued = 1e9;
View Full Code Here

TOP

Related Classes of com.opengamma.financial.convention.daycount.DayCount

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.