Package com.opengamma.analytics.financial.credit

Examples of com.opengamma.analytics.financial.credit.StubType


    for (int i = 0; i < n; i++) {
      coupons[i] /= 10000;
    }

    final Period tenor = Period.ofMonths(3);
    final StubType stubType = StubType.FRONTSHORT;
    final boolean payAccOndefault = true;
    final boolean protectionStart = true;
    final double recovery = 0.4;

    final ISDACompliantCurveCalibrator calibrator = new ISDACompliantCurveCalibrator();
View Full Code Here


  @Override
  public CDSAnalytic visitLegacyVanillaCDSSecurity(final LegacyVanillaCDSSecurity security) {
    final ExternalId regionId = security.getRegionId();
    final Calendar calendar = new HolidaySourceCalendarAdapter(_holidaySource, _regionSource.getHighestLevelRegion(regionId));
    final StubType stubType = security.getStubType().toAnalyticsType();
    final Period period = (IMMDateGenerator.isIMMDate(security.getMaturityDate())) ? getPeriodFrequency(security.getCouponFrequency()).getPeriod() :
        Period.ofMonths(6); // non IMM forced to semi annual
    final CDSAnalytic cdsAnalytic = new CDSAnalytic(_valuationDate,
                                                    security.getEffectiveDate().toLocalDate(),
                                                    // Hard code or get from somewhere?
View Full Code Here

  @Override
  public CDSAnalytic visitStandardVanillaCDSSecurity(final StandardVanillaCDSSecurity security) {
    final ExternalId regionId = security.getRegionId();
    final Calendar calendar = new HolidaySourceCalendarAdapter(_holidaySource, _regionSource.getHighestLevelRegion(regionId));
    final StubType stubType = security.getStubType().toAnalyticsType();
    final Period period = (IMMDateGenerator.isIMMDate(security.getMaturityDate())) ? getPeriodFrequency(security.getCouponFrequency()).getPeriod() :
        Period.ofMonths(6); // non IMM forced to semi annual
    final CDSAnalytic cdsAnalytic = new CDSAnalytic(_valuationDate,
                                                    security.getEffectiveDate().toLocalDate(),
                                                    // Hard code or get from somewhere?
View Full Code Here

  public ZonedDateTime[] constructISDACompliantCreditDefaultSwapPremiumLegSchedule(final CreditDefaultSwapDefinition cds) {
    ArgumentChecker.notNull(cds, "cds");
    final ZonedDateTime startDate = cds.getStartDate();
    final ZonedDateTime endDate = cds.getMaturityDate();
    final boolean protectStart = cds.getProtectionStart();
    final StubType stubType = cds.getStubType();
    if (protectStart && endDate.equals(startDate)) {
      //note no adjustment of either date
      return new ZonedDateTime[] {startDate, startDate.plusDays(1)};
    }
    // Is the stub at the front end of the payment schedule
View Full Code Here

TOP

Related Classes of com.opengamma.analytics.financial.credit.StubType

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.