Examples of StubType


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

  @Test(expectedExceptions = IllegalArgumentException.class)
  public void undefinedStubTest() {
    final LocalDate startDate = LocalDate.of(2012, 6, 7);
    final LocalDate endDate = LocalDate.of(2015, 11, 29); // sunday
    final Period step = Period.ofMonths(3);
    final StubType stubType = StubType.NONE;
    final boolean protectionStart = false;
    @SuppressWarnings("unused")
    final ISDAPremiumLegSchedule schedule = new ISDAPremiumLegSchedule(startDate, endDate, step, stubType, FOLLOWING, CALENDAR, protectionStart);
  }
View Full Code Here

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

    ArgumentChecker.isTrue(n == accEnd.length, null);

    final LocalDate startDate = LocalDate.of(2012, 6, 7);
    final LocalDate endDate = LocalDate.of(2015, 11, 29); // sunday
    final Period step = Period.ofMonths(3);
    final StubType stubType = StubType.FRONTSHORT;
    final boolean protectionStart = true;

    final ISDAPremiumLegSchedule schedule = new ISDAPremiumLegSchedule(startDate, endDate, step, stubType, FOLLOWING, CALENDAR, protectionStart);
    assertEquals(n, schedule.getNumPayments());
    for (int i = 0; i < n; i++) {
View Full Code Here

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

    ArgumentChecker.isTrue(n == accEnd.length, null);

    final LocalDate startDate = LocalDate.of(2012, 6, 30); // Saturday
    final LocalDate endDate = LocalDate.of(2013, 12, 20); // IMM date
    final Period step = Period.ofMonths(3);
    final StubType stubType = StubType.FRONTLONG;
    final boolean protectionStart = true;

    final ISDAPremiumLegSchedule schedule = new ISDAPremiumLegSchedule(startDate, endDate, step, stubType, FOLLOWING, CALENDAR, protectionStart);
    assertEquals(n, schedule.getNumPayments());
    for (int i = 0; i < n; i++) {
View Full Code Here

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

    ArgumentChecker.isTrue(n == accEnd.length, null);

    final LocalDate startDate = LocalDate.of(2012, 6, 20); // IMM date
    final LocalDate endDate = LocalDate.of(2013, 9, 20); // IMM date
    final Period step = Period.ofMonths(3);
    final StubType stubType = StubType.BACKSHORT;
    final boolean protectionStart = true;

    final ISDAPremiumLegSchedule schedule = new ISDAPremiumLegSchedule(startDate, endDate, step, stubType, FOLLOWING, CALENDAR, protectionStart);
    assertEquals(n, schedule.getNumPayments());
    for (int i = 0; i < n; i++) {
View Full Code Here

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

    ArgumentChecker.isTrue(n == accEnd.length, null);

    final LocalDate startDate = LocalDate.of(2012, 5, 10);
    final LocalDate endDate = LocalDate.of(2013, 10, 20);
    final Period step = Period.ofMonths(3);
    final StubType stubType = StubType.BACKLONG;
    final boolean protectionStart = true;

    final ISDAPremiumLegSchedule schedule = new ISDAPremiumLegSchedule(startDate, endDate, step, stubType, FOLLOWING, CALENDAR, protectionStart);
    assertEquals(n, schedule.getNumPayments());
    for (int i = 0; i < n; i++) {
View Full Code Here

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

    final Period tenor = Period.ofYears(2);
    final LocalDate stepIn = tradeDate.plusDays(1);
    final LocalDate startDate = getPrevIMMDate(stepIn);
    final LocalDate endDate = getNextIMMDate(tradeDate).plus(tenor);
    final Period paymentInt = Period.ofMonths(3);
    final StubType stub = StubType.FRONTSHORT;
    final double notional = 1e7;
    final double coupon = 1e-2;

    final ISDAPremiumLegSchedule schedule = new ISDAPremiumLegSchedule(startDate, endDate, paymentInt, stub, FOLLOWING, CALENDAR, true);
View Full Code Here

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

  @Test
  public void SingleCDSTest() {
    final Period tenor = Period.ofMonths(3);
    final boolean payAccOnDefault = true;
    final StubType stubType = StubType.FRONTSHORT;
    final boolean protectionStart = true;

    final double pointsUpFront = 0.007;
    final double permium = 100. / 10000;
    final double recovery = 0.4;
View Full Code Here

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

  @Test
  public void SingleCDSTest2() {
    final Period tenor = Period.ofMonths(6);
    final boolean payAccOnDefault = true;
    final StubType stubType = StubType.FRONTLONG;
    final boolean protectionStart = true;

    final double parSpread = 143.4 / 10000;
    final double permium = 500. / 10000;
    final double recovery = 0.4;
View Full Code Here

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

  @Test
  public void MultiCDSTest() {
    final Period tenor = Period.ofMonths(3);
    final boolean payAccOnDefault = true;
    final StubType stubType = StubType.FRONTSHORT;
    final boolean protectionStart = true;
    final double permium = 100. / 10000;
    final double recovery = 0.4;

    final int n = 7;
View Full Code Here

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 SimpleCreditCurveBuilder calibrator = new SimpleCreditCurveBuilder();
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.