public virtual void test_weekly()
        {
            EtdVariant test = EtdVariant.ofWeekly(2);

            assertEquals(test.Type, EtdExpiryType.WEEKLY);
            assertEquals(test.DateCode.Value, 2);
            assertEquals(test.SettlementType.Present, false);
            assertEquals(test.OptionType.Present, false);
            assertEquals(test.Flex, false);
            assertEquals(test.Code, "W2");
        }
Ejemplo n.º 2
0
        public virtual void test_optionId_weekly()
        {
            SecurityId test = EtdIdUtils.optionId(ExchangeIds.ECAG, FGBS, YearMonth.of(2017, 6), EtdVariant.ofWeekly(3), 0, PutCall.CALL, -1.45);

            assertEquals(test.StandardId, StandardId.of("OG-ETD", "O-ECAG-FGBS-201706W3-CM1.45"));
        }
Ejemplo n.º 3
0
 internal static EtdOptionSecurity sut2()
 {
     return(EtdOptionSecurity.builder().info(SecurityInfo.of(SecurityId.of("B", "C"), SecurityPriceInfo.of(Currency.EUR, 10))).contractSpecId(EtdContractSpecId.of("test", "234")).expiry(YearMonth.of(2017, 9)).variant(EtdVariant.ofWeekly(2)).version(4).putCall(PutCall.CALL).strikePrice(3).underlyingExpiryMonth(YearMonth.of(2017, 12)).build());
 }
Ejemplo n.º 4
0
        public virtual void test_futureId_weekly()
        {
            SecurityId test = EtdIdUtils.futureId(ExchangeIds.ECAG, FGBS, YearMonth.of(2017, 6), EtdVariant.ofWeekly(2));

            assertEquals(test.StandardId, StandardId.of("OG-ETD", "F-ECAG-FGBS-201706W2"));
        }
 internal static EtdFutureSecurity sut2()
 {
     return(EtdFutureSecurity.builder().info(SecurityInfo.of(SecurityId.of("B", "C"), SecurityPriceInfo.of(Currency.EUR, 10))).contractSpecId(EtdContractSpecId.of("test", "234")).expiry(YearMonth.of(2017, 9)).variant(EtdVariant.ofWeekly(2)).build());
 }