//-------------------------------------------------------------------------
        public virtual void test_summary_position()
        {
            StandardId           id          = StandardId.of("X", "Y");
            SecurityPosition     position    = SecurityPosition.builder().securityId(SecurityId.of("A", "B")).longQuantity(123).info(PositionInfo.of(id)).build();
            string               description = "desc";
            PortfolioItemSummary expected    = PortfolioItemSummary.of(id, PortfolioItemType.POSITION, ProductType.SECURITY, ImmutableSet.of(GBP), description);

            assertEquals(SummarizerUtils.summary(position, ProductType.SECURITY, description, GBP), expected);
        }
Exemplo n.º 2
0
        private static Position trade()
        {
            PositionInfo info = PositionInfo.of(StandardId.of("OG-Position", "1"));

            return(GenericSecurityPosition.ofNet(info, SECURITY, 6));
        }