public virtual void test_builder_defaults() { ResolvedIborFuture test = ResolvedIborFuture.builder().securityId(SECURITY_ID).currency(GBP).notional(NOTIONAL).iborRate(IborRateComputation.of(GBP_LIBOR_2M, LAST_TRADE_DATE, REF_DATA)).build(); assertEquals(test.Currency, GBP); assertEquals(test.Notional, NOTIONAL); assertEquals(test.AccrualFactor, ACCRUAL_FACTOR_2M); assertEquals(test.LastTradeDate, LAST_TRADE_DATE); assertEquals(test.Index, GBP_LIBOR_2M); assertEquals(test.Rounding, Rounding.none()); assertEquals(test.IborRate, IborRateComputation.of(GBP_LIBOR_2M, LAST_TRADE_DATE, REF_DATA)); }
public virtual void test_builder_defaults() { IborFuture test = IborFuture.builder().securityId(SECURITY_ID).currency(GBP).notional(NOTIONAL).lastTradeDate(LAST_TRADE_DATE).index(GBP_LIBOR_2M).build(); assertEquals(test.SecurityId, SECURITY_ID); assertEquals(test.Currency, GBP); assertEquals(test.Notional, NOTIONAL); assertEquals(test.AccrualFactor, ACCRUAL_FACTOR2); assertEquals(test.LastTradeDate, LAST_TRADE_DATE); assertEquals(test.Index, GBP_LIBOR_2M); assertEquals(test.Rounding, Rounding.none()); assertEquals(test.FixingDate, LAST_TRADE_DATE); }
public virtual void test_builder_default() { ResolvedOvernightFuture test = ResolvedOvernightFuture.builder().accrualFactor(ACCRUAL_FACTOR_1M).lastTradeDate(LAST_TRADE_DATE).overnightRate(RATE_COMPUTATION).notional(NOTIONAL).securityId(SECURITY_ID).build(); assertEquals(test.AccrualFactor, ACCRUAL_FACTOR_1M); assertEquals(test.Currency, USD); assertEquals(test.Index, USD_FED_FUND); assertEquals(test.LastTradeDate, LAST_TRADE_DATE); assertEquals(test.Notional, NOTIONAL); assertEquals(test.OvernightRate, RATE_COMPUTATION); assertEquals(test.Rounding, Rounding.none()); assertEquals(test.SecurityId, SECURITY_ID); }
//------------------------------------------------------------------------- public virtual void test_builder() { BondFutureOption test = sut(); assertEquals(test.PutCall, CALL); assertEquals(test.StrikePrice, STRIKE_PRICE); assertEquals(test.ExpiryDate, EXPIRY_DATE); assertEquals(test.ExpiryTime, EXPIRY_TIME); assertEquals(test.ExpiryZone, EXPIRY_ZONE); assertEquals(test.Expiry, ZonedDateTime.of(EXPIRY_DATE, EXPIRY_TIME, EXPIRY_ZONE)); assertEquals(test.Rounding, Rounding.none()); assertEquals(test.UnderlyingFuture, FUTURE); assertEquals(test.Currency, FUTURE.Currency); }
public virtual void test_builder_default() { OvernightFuture test = OvernightFuture.builder().securityId(SECURITY_ID).notional(NOTIONAL).accrualFactor(ACCRUAL_FACTOR).startDate(START_DATE).endDate(END_DATE).lastTradeDate(LAST_TRADE_DATE).index(USD_FED_FUND).accrualMethod(OvernightAccrualMethod.AVERAGED_DAILY).build(); assertEquals(test.SecurityId, SECURITY_ID); assertEquals(test.Currency, USD); assertEquals(test.Notional, NOTIONAL); assertEquals(test.AccrualFactor, ACCRUAL_FACTOR); assertEquals(test.LastTradeDate, LAST_TRADE_DATE); assertEquals(test.Index, USD_FED_FUND); assertEquals(test.Rounding, Rounding.none()); assertEquals(test.StartDate, START_DATE); assertEquals(test.EndDate, END_DATE); assertEquals(test.LastTradeDate, LAST_TRADE_DATE); assertEquals(test.AccrualMethod, OvernightAccrualMethod.AVERAGED_DAILY); }
//------------------------------------------------------------------------- public virtual void test_builder() { IborFutureOption test = sut(); assertEquals(test.PutCall, CALL); assertEquals(test.StrikePrice, STRIKE_PRICE); assertEquals(test.ExpiryDate, EXPIRY_DATE); assertEquals(test.ExpiryTime, EXPIRY_TIME); assertEquals(test.ExpiryZone, EXPIRY_ZONE); assertEquals(test.Expiry, ZonedDateTime.of(EXPIRY_DATE, EXPIRY_TIME, EXPIRY_ZONE)); assertEquals(test.Rounding, Rounding.none()); assertEquals(test.UnderlyingFuture, FUTURE); assertEquals(test.Currency, FUTURE.Currency); assertEquals(test.Index, FUTURE.Index); assertEquals(test.CrossCurrency, false); assertEquals(test.allPaymentCurrencies(), ImmutableSet.of(USD)); assertEquals(test.allCurrencies(), ImmutableSet.of(USD)); }
internal static OvernightFuture sut2() { return(OvernightFuture.builder().securityId(SECURITY_ID2).currency(GBP).notional(NOTIONAL2).accrualFactor(ACCRUAL_FACTOR2).startDate(START_DATE2).endDate(END_DATE2).lastTradeDate(LAST_TRADE_DATE2).index(GBP_SONIA).accrualMethod(OvernightAccrualMethod.COMPOUNDED).rounding(Rounding.none()).build()); }