BloombergEQVanillaOptionChain { public BloombergEQVanillaOptionChain narrowByExpiry(int monthsFromToday) { return narrowByExpiry(LocalDate.now(OpenGammaClock.getInstance()), monthsFromToday); } BloombergEQVanillaOptionChain(Set<ExternalId> identifiers);  BloombergEQVanillaOptionChain(List<ExternalId> identifiers);  BloombergEQVanillaOptionChain(BloombergEQVanillaOptionChain original); BloombergEQVanillaOptionChain narrowByOptionType(final OptionType optionType); BloombergEQVanillaOptionChain narrowByExpiry(int monthsFromToday); BloombergEQVanillaOptionChain narrowByExpiry(LocalDate referenceDate, final int monthsFromReferenceDate); BloombergEQVanillaOptionChain narrowByStrike(final double referencePrice, int strikeOffset); NavigableSet<ExternalId> getIdentifiers();  }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_0_Pre () { LocalDate refDate = s_referenceDatePreExpiration; int months = 0; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(156, refDate, months, chain); assertExpiry(Month.APRIL, 16, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_0_Post () { LocalDate refDate = s_referenceDatePostExpiration; int months = 0; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(138, refDate, months, chain); assertExpiry(Month.MAY, 21, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_1_Pre () { LocalDate refDate = s_referenceDatePreExpiration; int months = 1; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(138, refDate, months, chain); assertExpiry(Month.MAY, 21, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_1_Post () { LocalDate refDate = s_referenceDatePostExpiration; int months = 1; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(138, refDate, months, chain); assertExpiry(Month.MAY, 21, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_2_Pre () { LocalDate refDate = s_referenceDatePreExpiration; int months = 2; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(120, refDate, months, chain); assertExpiry(Month.JUNE, 18, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_2_Post () { LocalDate refDate = s_referenceDatePostExpiration; int months = 2; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(120, refDate, months, chain); assertExpiry(Month.JUNE, 18, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_3_Pre () { LocalDate refDate = s_referenceDatePreExpiration; int months = 3; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(156, refDate, months, chain); assertExpiry(Month.JULY, 16, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_3_Post () { LocalDate refDate = s_referenceDatePostExpiration; int months = 3; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(156, refDate, months, chain); assertExpiry(Month.JULY, 16, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_4_Pre () { LocalDate refDate = s_referenceDatePreExpiration; int months = 4; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(156, refDate, months, chain); assertExpiry(Month.JULY, 16, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_4_Post () { LocalDate refDate = s_referenceDatePostExpiration; int months = 4; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(156, refDate, months, chain); assertExpiry(Month.JULY, 16, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_5_Pre () { LocalDate refDate = s_referenceDatePreExpiration; int months = 5; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(152, refDate, months, chain); assertExpiry(Month.OCTOBER, 22, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_5_Post () { LocalDate refDate = s_referenceDatePostExpiration; int months = 5; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(152, refDate, months, chain); assertExpiry(Month.OCTOBER, 22, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_6_Pre () { LocalDate refDate = s_referenceDatePreExpiration; int months = 6; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(152, refDate, months, chain); assertExpiry(Month.OCTOBER, 22, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_6_Post () { LocalDate refDate = s_referenceDatePostExpiration; int months = 6; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(152, refDate, months, chain); assertExpiry(Month.OCTOBER, 22, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Plus_100 () { LocalDate refDate = s_referenceDatePreExpiration; int months = 100; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(144, refDate, months, chain); assertExpiry(Month.JANUARY, 19, 2013, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Forward_0 () { LocalDate refDate = LocalDate.of(2012, Month.NOVEMBER, 11); int months = 0; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(144, refDate, months, chain); assertExpiry(Month.JANUARY, 19, 2013, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Minus_0 () { LocalDate refDate = s_referenceDateForTestingMinus; int months = 0; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(152, refDate, months, chain); assertExpiry(Month.OCTOBER, 22, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Minus_1 () { LocalDate refDate = s_referenceDateForTestingMinus; int months = -1; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(152, refDate, months, chain); assertExpiry(Month.OCTOBER, 22, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Minus_2 () { LocalDate refDate = s_referenceDateForTestingMinus; int months = -2; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(152, refDate, months, chain); assertExpiry(Month.OCTOBER, 22, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Minus_3 () { LocalDate refDate = s_referenceDateForTestingMinus; int months = -3; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(156, refDate, months, chain); assertExpiry(Month.JULY, 16, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Minus_4 () { LocalDate refDate = s_referenceDateForTestingMinus; int months = -4; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(156, refDate, months, chain); assertExpiry(Month.JULY, 16, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Minus_5 () { LocalDate refDate = s_referenceDateForTestingMinus; int months = -5; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(120, refDate, months, chain); assertExpiry(Month.JUNE, 18, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Minus_6 () { LocalDate refDate = s_referenceDateForTestingMinus; int months = -6; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(138, refDate, months, chain); assertExpiry(Month.MAY, 21, 2011, refDate, months, chain); }
@Test(dependsOnMethods="preTest") public void testExpiry_Minus_100 () { LocalDate refDate = s_referenceDateForTestingMinus; int months = -100; BloombergEQVanillaOptionChain chain = s_chain.narrowByExpiry(refDate, months); assertCount(156, refDate, months, chain); assertExpiry(Month.APRIL, 16, 2011, refDate, months, chain); }