Interface LegalEntityDiscountingMarketDataLookup

  • All Superinterfaces:
    CalculationParameter

    public interface LegalEntityDiscountingMarketDataLookup
    extends CalculationParameter
    The lookup that provides access to legal entity discounting in market data.

    The legal entity discounting market lookup provides access to repo and issuer curves.

    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 LegalEntityDiscountingMarketDataLookup of​(Map<SecurityId,​RepoGroup> repoCurveSecurityGroups,
                                                         Map<LegalEntityId,​RepoGroup> repoCurveGroups,
                                                         Map<Pair<RepoGroup,​Currency>,​CurveId> repoCurveIds,
                                                         Map<LegalEntityId,​LegalEntityGroup> issuerCurveGroups,
                                                         Map<Pair<LegalEntityGroup,​Currency>,​CurveId> issuerCurveIds)
        Obtains an instance based on a maps for repo and issuer curves.

        Both the repo and issuer curves are defined in two parts. The first part maps the issuer ID to a group, and the second part maps the group and currency to the identifier of the curve.

        Parameters:
        repoCurveSecurityGroups - the per security repo curve groups overrides, mapping security ID to group
        repoCurveGroups - the repo curve groups, mapping issuer ID to group
        repoCurveIds - the repo curve identifiers
        issuerCurveGroups - the issuer curve groups, mapping issuer ID to group
        issuerCurveIds - the issuer curves identifiers, keyed by issuer ID and currency
        Returns:
        the rates lookup containing the specified curves
      • of

        static LegalEntityDiscountingMarketDataLookup of​(Map<SecurityId,​RepoGroup> repoCurveSecurityGroups,
                                                         Map<LegalEntityId,​RepoGroup> repoCurveGroups,
                                                         Map<Pair<RepoGroup,​Currency>,​CurveId> repoCurveIds,
                                                         Map<LegalEntityId,​LegalEntityGroup> issuerCurveGroups,
                                                         Map<Pair<LegalEntityGroup,​Currency>,​CurveId> issuerCurveIds,
                                                         ObservableSource obsSource)
        Obtains an instance based on a maps for repo and issuer curves.

        Both the repo and issuer curves are defined in two parts. The first part maps the issuer ID to a group, and the second part maps the group and currency to the identifier of the curve.

        Parameters:
        repoCurveSecurityGroups - the per security repo curve groups overrides, mapping security ID to group
        repoCurveGroups - the repo curve groups, mapping issuer ID to group
        repoCurveIds - the repo curve identifiers
        issuerCurveGroups - the issuer curve groups, mapping issuer ID to group
        issuerCurveIds - the issuer curves identifiers, keyed by issuer ID and currency
        obsSource - the source of market data for quotes and other observable market data
        Returns:
        the rates lookup containing the specified curves
      • of

        static LegalEntityDiscountingMarketDataLookup of​(Map<LegalEntityId,​RepoGroup> repoCurveGroups,
                                                         Map<Pair<RepoGroup,​Currency>,​CurveId> repoCurveIds,
                                                         Map<LegalEntityId,​LegalEntityGroup> issuerCurveGroups,
                                                         Map<Pair<LegalEntityGroup,​Currency>,​CurveId> issuerCurveIds)
        Obtains an instance based on a maps for repo and issuer curves.

        Both the repo and issuer curves are defined in two parts. The first part maps the issuer ID to a group, and the second part maps the group and currency to the identifier of the curve.

        Parameters:
        repoCurveGroups - the repo curve groups, mapping issuer ID to group
        repoCurveIds - the repo curve identifiers
        issuerCurveGroups - the issuer curve groups, mapping issuer ID to group
        issuerCurveIds - the issuer curves identifiers, keyed by issuer ID and currency
        Returns:
        the rates lookup containing the specified curves
      • of

        static LegalEntityDiscountingMarketDataLookup of​(Map<LegalEntityId,​RepoGroup> repoCurveGroups,
                                                         Map<Pair<RepoGroup,​Currency>,​CurveId> repoCurveIds,
                                                         Map<LegalEntityId,​LegalEntityGroup> issuerCurveGroups,
                                                         Map<Pair<LegalEntityGroup,​Currency>,​CurveId> issuerCurveIds,
                                                         ObservableSource obsSource)
        Obtains an instance based on a maps for repo and issuer curves.

        Both the repo and issuer curves are defined in two parts. The first part maps the issuer ID to a group, and the second part maps the group and currency to the identifier of the curve.

        Parameters:
        repoCurveGroups - the repo curve groups, mapping issuer ID to group
        repoCurveIds - the repo curve identifiers
        issuerCurveGroups - the issuer curve groups, mapping issuer ID to group
        issuerCurveIds - the issuer curves identifiers, keyed by issuer ID and currency
        obsSource - the source of market data for quotes and other observable market data
        Returns:
        the rates lookup containing the specified curves
      • of

        static LegalEntityDiscountingMarketDataLookup of​(LegalEntityCurveGroup curveGroup,
                                                         Map<SecurityId,​RepoGroup> repoCurveSecurityGroups,
                                                         Map<LegalEntityId,​RepoGroup> repoCurveGroups,
                                                         Map<LegalEntityId,​LegalEntityGroup> issuerCurveGroups)
        Obtains an instance based on a curve group and group maps.

        The two maps define mapping from the issuer ID to a group.

        Parameters:
        curveGroup - the curve group to base the lookup on
        repoCurveSecurityGroups - the per security repo curve groups overrides, mapping security ID to group
        repoCurveGroups - the repo curve groups, mapping issuer ID to group
        issuerCurveGroups - the issuer curve groups, mapping issuer ID to group
        Returns:
        the rates lookup containing the specified curves
      • of

        static LegalEntityDiscountingMarketDataLookup of​(LegalEntityCurveGroup curveGroup,
                                                         Map<LegalEntityId,​RepoGroup> repoCurveGroups,
                                                         Map<LegalEntityId,​LegalEntityGroup> issuerCurveGroups)
        Obtains an instance based on a curve group and group maps.

        The two maps define mapping from the issuer ID to a group.

        Parameters:
        curveGroup - the curve group to base the lookup on
        repoCurveGroups - the repo curve groups, mapping issuer ID to group
        issuerCurveGroups - the issuer curve groups, mapping issuer ID to group
        Returns:
        the rates lookup containing the specified curves
      • of

        static LegalEntityDiscountingMarketDataLookup of​(Map<LegalEntityId,​RepoGroup> repoCurveGroups,
                                                         Map<Pair<RepoGroup,​Currency>,​CurveId> repoCurveIds)
        Obtains an instance based on maps for repo curves.

        The repo curves are defined in two parts. The first part maps the issuer ID to a group, and the second part maps the group and currency to the identifier of the curve.

        Issuer curves are not defined in the instance.

        Parameters:
        repoCurveGroups - the repo curve groups, mapping issuer ID to group
        repoCurveIds - the repo curve identifiers, keyed by repo group and currency
        Returns:
        the rates lookup containing the specified curves
      • of

        static LegalEntityDiscountingMarketDataLookup of​(Map<LegalEntityId,​RepoGroup> repoCurveGroups,
                                                         Map<Pair<RepoGroup,​Currency>,​CurveId> repoCurveIds,
                                                         ObservableSource obsSource)
        Obtains an instance based on maps for repo curves.

        The repo curves are defined in two parts. The first part maps the issuer ID to a group, and the second part maps the group and currency to the identifier of the curve.

        Issuer curves are not defined in the instance.

        Parameters:
        repoCurveGroups - the repo curve groups, mapping issuer ID to group
        repoCurveIds - the repo curve identifiers, keyed by repo group and currency
        obsSource - the source of market data for quotes and other observable market data
        Returns:
        the rates lookup containing the specified curves
      • of

        static LegalEntityDiscountingMarketDataLookup of​(LegalEntityCurveGroup curveGroup,
                                                         Map<LegalEntityId,​RepoGroup> repoCurveGroups)
        Obtains an instance based on a curve group and group map.

        The two maps define mapping from the issuer ID to a group.

        Issuer curves are not defined in the instance.

        Parameters:
        curveGroup - the curve group to base the lookup on
        repoCurveGroups - the repo curve groups, mapping issuer ID to group
        Returns:
        the rates lookup containing the specified curves
      • requirements

        FunctionRequirements requirements​(SecurityId securityId,
                                          LegalEntityId issuerId,
                                          Currency currency)
        Creates market data requirements for the specified security and issuer.
        Parameters:
        securityId - the security ID
        issuerId - the legal entity issuer ID
        currency - the currency of the security
        Returns:
        the requirements
        Throws:
        IllegalArgumentException - if unable to create requirements
      • requirements

        FunctionRequirements requirements​(LegalEntityId issuerId,
                                          Currency currency)
        Creates market data requirements for the specified issuer.
        Parameters:
        issuerId - the legal entity issuer ID
        currency - the currency of the security
        Returns:
        the requirements
        Throws:
        IllegalArgumentException - if unable to create requirements
      • marketDataView

        default LegalEntityDiscountingScenarioMarketData 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 LegalEntityDiscountingMarketData 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
      • discountingProvider

        LegalEntityDiscountingProvider discountingProvider​(MarketData marketData)
        Obtains a discounting provider based on the specified market data.

        This provides a LegalEntityDiscountingProvider suitable for pricing a product. Although this method can be used directly, it is typically invoked indirectly via LegalEntityDiscountingMarketData:

          // bind the baseData to this lookup
          LegalEntityDiscountingMarketData view = lookup.marketView(baseData);
          
          // pass around RatesMarketData within the function to use in pricing
          LegalEntityDiscountingProvider provider = view.discountingProvider();
         
        Parameters:
        marketData - the complete set of market data for one scenario
        Returns:
        the discounting provider