ZonedDateTime.of(LocalDateTime.of(year + 11, 6, 1, 1, 0), ZoneOffset.UTC),
"Cpty",
new FloatingInterestRateLeg(DAY_COUNT, SimpleFrequency.QUARTERLY,
ExternalSchemes.financialRegionId("US+GB"),
BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Modified Following"),
new InterestRateNotional(Currency.USD, 1.0E7),
false,
USDLIBOR3M,
FloatingRateType.IBOR),
new FixedInterestRateLeg(DayCountFactory.INSTANCE.getDayCount("30U/360"),
SimpleFrequency.SEMI_ANNUAL,
ExternalSchemes.financialRegionId("US+GB"),
BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Modified Following"),
new InterestRateNotional(Currency.USD, 1.0E7),
false,
0.04));
swap1.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
swap1.setName("Swap: pay 3m Libor vs 4% fixed, start=" + swap1.getEffectiveDate().toLocalDate() + ", maturity=" + swap1.getMaturityDate().toLocalDate() + ", notional=USD 10MM");
storeFinancialSecurity(swap1);
final SwaptionSecurity swaption1 = new SwaptionSecurity(false, swap1.getExternalIdBundle().getExternalId(ExternalScheme.of(ID_SCHEME)),
true, new Expiry(ZonedDateTime.of(LocalDateTime.of(year + 1, 6, 1, 1, 0), ZoneOffset.UTC)),
true, Currency.USD, null, europeanExerciseType, null);
swaption1.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
swaption1.setName("Vanilla swaption, 1Y x 10Y, USD 10,000,000 @ 4%");
securities.add(swaption1);
final SwapSecurity swap2 = new SwapSecurity(
ZonedDateTime.of(LocalDateTime.of(year + 2, 6, 1, 1, 0), ZoneOffset.UTC),
ZonedDateTime.of(LocalDateTime.of(year + 2, 6, 1, 1, 0), ZoneOffset.UTC),
ZonedDateTime.of(LocalDateTime.of(year + 4, 6, 1, 1, 0), ZoneOffset.UTC),
"Cpty",
new FloatingInterestRateLeg(DAY_COUNT, SimpleFrequency.QUARTERLY,
ExternalSchemes.financialRegionId("US+GB"),
BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Modified Following"),
new InterestRateNotional(Currency.USD, 3000000.0),
false,
USDLIBOR3M,
FloatingRateType.IBOR),
new FixedInterestRateLeg(DayCountFactory.INSTANCE.getDayCount("30U/360"),
SimpleFrequency.SEMI_ANNUAL,
ExternalSchemes.financialRegionId("US+GB"),
BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Modified Following"),
new InterestRateNotional(Currency.USD, 3000000.0),
false,
0.01));
swap2.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
swap2.setName("Swap: pay 3m Libor vs 1% fixed, start=" + swap2.getEffectiveDate().toLocalDate() + ", maturity=" + swap2.getMaturityDate().toLocalDate() + ", notional=USD 3MM");
storeFinancialSecurity(swap2);
final SwaptionSecurity swaption2 = new SwaptionSecurity(false, swap2.getExternalIdBundle().getExternalId(ExternalScheme.of(ID_SCHEME)),
false, new Expiry(ZonedDateTime.of(LocalDateTime.of(year + 2, 6, 1, 1, 0), ZoneOffset.UTC)),
true, Currency.USD, null, europeanExerciseType, null);
swaption2.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
swaption2.setName("Vanilla swaption, 2Y x 2Y, USD 3,000,000 @ 1%");
securities.add(swaption2);
final SwapSecurity swap3 = new SwapSecurity(
ZonedDateTime.of(LocalDateTime.of(year + 5, 6, 1, 1, 0), ZoneOffset.UTC),
ZonedDateTime.of(LocalDateTime.of(year + 5, 6, 1, 1, 0), ZoneOffset.UTC),
ZonedDateTime.of(LocalDateTime.of(year + 20, 6, 1, 1, 0), ZoneOffset.UTC),
"Cpty",
new FloatingInterestRateLeg(DAY_COUNT, SimpleFrequency.QUARTERLY,
ExternalSchemes.financialRegionId("US+GB"),
BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Modified Following"),
new InterestRateNotional(Currency.USD, 6000000.0),
false,
USDLIBOR3M,
FloatingRateType.IBOR),
new FixedInterestRateLeg(DayCountFactory.INSTANCE.getDayCount("30U/360"),
SimpleFrequency.SEMI_ANNUAL,
ExternalSchemes.financialRegionId("US+GB"),
BusinessDayConventionFactory.INSTANCE.getBusinessDayConvention("Modified Following"),
new InterestRateNotional(Currency.USD, 6000000.0),
false,
0.035));
swap3.addExternalId(ExternalId.of(ID_SCHEME, GUIDGenerator.generate().toString()));
swap3.setName("Swap: pay 3m Libor vs 3.5% fixed, start=" + swap3.getEffectiveDate().toLocalDate() + ", maturity=" + swap3.getMaturityDate().toLocalDate() + ", notional=USD 6MM");
storeFinancialSecurity(swap3);