Class BondFutureTradeCalculations


  • public class BondFutureTradeCalculations
    extends Object
    Calculates pricing and risk measures for trades in a futures contract based on a basket of bonds.

    This provides a high-level entry point for future pricing and risk measures.

    Each method takes a ResolvedBondFutureTrade, whereas application code will typically work with BondFutureTrade. Call BondFutureTrade::resolve(ReferenceData) to convert BondFutureTrade to ResolvedBondFutureTrade.

    Price

    Strata uses decimal prices for bond futures in the trade model, pricers and market data. This is coherent with the pricing of FixedCouponBond. The bond futures delivery is a bond for an amount computed from the bond future price, a conversion factor and the accrued interest.
    • Method Detail

      • pv01CalibratedSum

        public MultiCurrencyAmount pv01CalibratedSum​(ResolvedBondFutureTrade trade,
                                                     LegalEntityDiscountingProvider discountingProvider)
        Calculates present value sensitivity for a single set of market data.

        This is the sensitivity of present value to a one basis point shift in the calibrated curves. The result is the sum of the sensitivities of all affected curves.

        Parameters:
        trade - the trade
        discountingProvider - the market data
        Returns:
        the present value sensitivity
      • pv01CalibratedBucketed

        public CurrencyParameterSensitivities pv01CalibratedBucketed​(ResolvedBondFutureTrade trade,
                                                                     LegalEntityDiscountingProvider discountingProvider)
        Calculates present value sensitivity for a single set of market data.

        This is the sensitivity of present value to a one basis point shift in the calibrated curves. The result is provided for each affected curve and currency, bucketed by curve node.

        Parameters:
        trade - the trade
        discountingProvider - the market data
        Returns:
        the present value sensitivity
      • pv01MarketQuoteSum

        public MultiCurrencyScenarioArray pv01MarketQuoteSum​(ResolvedBondFutureTrade trade,
                                                             LegalEntityDiscountingMarketDataLookup lookup,
                                                             ScenarioMarketData marketData)
        Calculates present value sensitivity across one or more scenarios.

        This is the sensitivity of present value to a one basis point shift in the market quotes used to calibrate the curves. The result is the sum of the sensitivities of all affected curves.

        Parameters:
        trade - the trade
        lookup - the lookup used to query the market data
        marketData - the market data
        Returns:
        the present value sensitivity, one entry per scenario
      • pv01MarketQuoteSum

        public MultiCurrencyAmount pv01MarketQuoteSum​(ResolvedBondFutureTrade trade,
                                                      LegalEntityDiscountingProvider ratesProvider)
        Calculates present value sensitivity for a single set of market data.

        This is the sensitivity of present value to a one basis point shift in the market quotes used to calibrate the curves. The result is the sum of the sensitivities of all affected curves.

        Parameters:
        trade - the trade
        ratesProvider - the market data
        Returns:
        the present value sensitivity
      • pv01MarketQuoteBucketed

        public CurrencyParameterSensitivities pv01MarketQuoteBucketed​(ResolvedBondFutureTrade trade,
                                                                      LegalEntityDiscountingProvider ratesProvider)
        Calculates present value sensitivity for a single set of market data.

        This is the sensitivity of present value to a one basis point shift in the market quotes used to calibrate the curves. The result is provided for each affected curve and currency, bucketed by curve node.

        Parameters:
        trade - the trade
        ratesProvider - the market data
        Returns:
        the present value sensitivity
      • parSpread

        public double parSpread​(ResolvedBondFutureTrade trade,
                                LegalEntityDiscountingProvider discountingProvider)
        Calculates par spread for a single set of market data.
        Parameters:
        trade - the trade
        discountingProvider - the market data
        Returns:
        the par spread
      • unitPrice

        public DoubleScenarioArray unitPrice​(ResolvedBondFutureTrade trade,
                                             LegalEntityDiscountingMarketDataLookup lookup,
                                             ScenarioMarketData marketData)
        Calculates unit price across one or more scenarios.

        This is the price of a single unit of the security.

        Price

        Strata uses decimal prices for bond futures in the trade model, pricers and market data. This is coherent with the pricing of FixedCouponBond. The bond futures delivery is a bond for an amount computed from the bond future price, a conversion factor and the accrued interest.
        Parameters:
        trade - the trade
        lookup - the lookup used to query the market data
        marketData - the market data
        Returns:
        the present value, one entry per scenario
      • unitPrice

        public double unitPrice​(ResolvedBondFutureTrade trade,
                                LegalEntityDiscountingProvider discountingProvider)
        Calculates unit price for a single set of market data.

        This is the price of a single unit of the security.

        Price

        Strata uses decimal prices for bond futures in the trade model, pricers and market data. This is coherent with the pricing of FixedCouponBond. The bond futures delivery is a bond for an amount computed from the bond future price, a conversion factor and the accrued interest.
        Parameters:
        trade - the trade
        discountingProvider - the market data
        Returns:
        the present value
      • currencyExposure

        public MultiCurrencyAmount currencyExposure​(ResolvedBondFutureTrade trade,
                                                    LegalEntityDiscountingProvider discountingProvider)
        Calculates currency exposure for a single set of market data.

        The currency risk, expressed as the equivalent amount in each currency.

        Parameters:
        trade - the trade
        discountingProvider - the market data
        Returns:
        the currency exposure