Interface BondFutureOptionMarketDataLookup

  • All Superinterfaces:
    CalculationParameter

    public interface BondFutureOptionMarketDataLookup
    extends CalculationParameter
    The lookup that provides access to bond future volatilities in market data.

    The bond future option market lookup provides access to the volatilities used to price bond future options.

    The lookup implements CalculationParameter and is used by passing it as an argument to CalculationRules. It provides the link between the data that the function needs and the data that is available in ScenarioMarketData.

    Implementations of this interface must be immutable.

    • Method Detail

      • of

        static BondFutureOptionMarketDataLookup of​(SecurityId securityId,
                                                   BondFutureVolatilitiesId volatilityId)
        Obtains an instance based on a single mapping from security ID to volatility identifier.

        The lookup provides volatilities for the specified security ID.

        Parameters:
        securityId - the security ID
        volatilityId - the volatility identifier
        Returns:
        the bond future options lookup containing the specified mapping
      • of

        static BondFutureOptionMarketDataLookup of​(java.util.Map<SecurityId,​BondFutureVolatilitiesId> volatilityIds)
        Obtains an instance based on a map of volatility identifiers.

        The map is used to specify the appropriate volatilities to use for each security ID.

        Parameters:
        volatilityIds - the volatility identifiers, keyed by security ID
        Returns:
        the bond future options lookup containing the specified volatilities
      • getVolatilitySecurityIds

        com.google.common.collect.ImmutableSet<SecurityId> getVolatilitySecurityIds()
        Gets the set of security IDs that volatilities are provided for.
        Returns:
        the set of security IDs
      • getVolatilityIds

        com.google.common.collect.ImmutableSet<MarketDataId<?>> getVolatilityIds​(SecurityId securityId)
        Gets the identifiers used to obtain the volatilities for the specified security ID.

        The result will typically refer to a surface or cube. If the security ID is not found, an exception is thrown.

        Parameters:
        securityId - the security ID for which identifiers are required
        Returns:
        the set of market data identifiers
        Throws:
        java.lang.IllegalArgumentException - if the security ID is not found
      • requirements

        default FunctionRequirements requirements​(SecurityId... securityIds)
        Creates market data requirements for the specified security IDs.
        Parameters:
        securityIds - the security IDs, for which volatilities are required
        Returns:
        the requirements
      • requirements

        FunctionRequirements requirements​(java.util.Set<SecurityId> securityIds)
        Creates market data requirements for the specified security IDs.
        Parameters:
        securityIds - the security IDs, for which volatilities are required
        Returns:
        the requirements
      • marketDataView

        default BondFutureOptionScenarioMarketData marketDataView​(ScenarioMarketData marketData)
        Obtains a filtered view of the complete set of market data.

        This method returns an instance that binds the lookup to the market data. The input is ScenarioMarketData, which contains market data for all scenarios.

        Parameters:
        marketData - the complete set of market data for all scenarios
        Returns:
        the filtered market data
      • marketDataView

        default BondFutureOptionMarketData marketDataView​(MarketData marketData)
        Obtains a filtered view of the complete set of market data.

        This method returns an instance that binds the lookup to the market data. The input is MarketData, which contains market data for one scenario.

        Parameters:
        marketData - the complete set of market data for one scenario
        Returns:
        the filtered market data
      • volatilities

        BondFutureVolatilities volatilities​(SecurityId securityId,
                                            MarketData marketData)
        Obtains bond future volatilities based on the specified market data.

        This provides BondFutureVolatilities suitable for pricing bond future options. Although this method can be used directly, it is typically invoked indirectly via BondFutureOptionMarketData:

          // bind the baseData to this lookup
          BondFutureOptionMarketData view = lookup.marketDataView(baseData);
          
          // pas around BondFutureOptionMarketData within the function to use in pricing
          BondFutureVolatilities vols = view.volatilities(securityId);
         
        Parameters:
        securityId - the security ID
        marketData - the complete set of market data for one scenario
        Returns:
        the volatilities
        Throws:
        MarketDataNotFoundException - if the security ID is not found