//-------------------------------------------------------------------------
        // gets the settlement price
        private double settlementPrice(ResolvedOvernightFutureTrade trade, RatesProvider ratesProvider)
        {
            StandardId standardId = trade.Product.SecurityId.StandardId;
            QuoteId    id         = QuoteId.of(standardId, FieldName.SETTLEMENT_PRICE);

            return(ratesProvider.data(id) / 100);    // convert market quote to value needed
        }
예제 #2
0
        //-------------------------------------------------------------------------
        // gets the settlement price
        private double settlementPrice(ResolvedIborFutureOptionTrade trade, RatesProvider ratesProvider)
        {
            StandardId standardId = trade.Product.SecurityId.StandardId;
            QuoteId    id         = QuoteId.of(standardId, FieldName.SETTLEMENT_PRICE);

            return(ratesProvider.data(id));
        }
예제 #3
0
        //-------------------------------------------------------------------------
        // gets the settlement price
        private double settlementPrice(ResolvedDsfTrade trade, RatesProvider ratesProvider)
        {
            StandardId standardId = trade.Product.SecurityId.StandardId;
            QuoteId    id         = QuoteId.of(standardId, FieldName.SETTLEMENT_PRICE);
            double     price      = ratesProvider.data(id);

            ArgChecker.isTrue(price < 10, "Price must be in decimal form, such as 1.007 for a 0.7% present value, but was: {}", price);
            return(price);
        }