예제 #1
0
        public virtual void test_summarize_floor()
        {
            IborCapFloorTrade    trade    = IborCapFloorTrade.builder().info(TRADE_INFO).product(PRODUCT_FLOOR).build();
            PortfolioItemSummary expected = PortfolioItemSummary.builder().id(TRADE_INFO.Id.orElse(null)).portfolioItemType(PortfolioItemType.TRADE).productType(ProductType.IBOR_CAP_FLOOR).currencies(Currency.EUR).description("5Y EUR 1mm Rec EUR-EURIBOR-3M Floor 3.25% : 17Mar11-17Mar16").build();

            assertEquals(trade.summarize(), expected);
        }
예제 #2
0
        public virtual void test_resolve_noPremium()
        {
            IborCapFloorTrade         test     = IborCapFloorTrade.builder().info(TRADE_INFO).product(PRODUCT).build();
            ResolvedIborCapFloorTrade expected = ResolvedIborCapFloorTrade.builder().info(TRADE_INFO).product(PRODUCT.resolve(REF_DATA)).build();

            assertEquals(test.resolve(REF_DATA), expected);
        }
예제 #3
0
        public virtual void test_builder_min()
        {
            IborCapFloorTrade test = IborCapFloorTrade.builder().product(PRODUCT).build();

            assertEquals(test.Premium.Present, false);
            assertEquals(test.Product, PRODUCT);
            assertEquals(test.Info, TradeInfo.empty());
        }
예제 #4
0
        //-------------------------------------------------------------------------
        public virtual void coverage()
        {
            IborCapFloorTrade test1 = sut();

            coverImmutableBean(test1);
            IborCapFloor      product = IborCapFloor.of(IborCapFloorLeg.builder().calculation(RATE_CALCULATION).floorSchedule(CAP).notional(NOTIONAL).paymentDateOffset(PAYMENT_OFFSET).paymentSchedule(SCHEDULE).payReceive(PAY).build());
            IborCapFloorTrade test2   = IborCapFloorTrade.builder().product(product).build();

            coverBeanEquals(test1, test2);
        }
예제 #5
0
 //-------------------------------------------------------------------------
 internal virtual IborCapFloorTrade sut()
 {
     return(IborCapFloorTrade.builder().info(TRADE_INFO).product(PRODUCT).premium(PREMIUM).build());
 }