Class MarketDataRequirements

  • All Implemented Interfaces:
    Bean, ImmutableBean

    public final class MarketDataRequirements
    extends java.lang.Object
    implements ImmutableBean
    Requirements for market data.

    This class is used as the input to MarketDataFactory. It includes the market data identifiers that the application needs.

    • Method Detail

      • of

        public static MarketDataRequirements of​(CalculationRules calculationRules,
                                                java.util.List<? extends CalculationTarget> targets,
                                                java.util.List<Column> columns,
                                                ReferenceData refData)
        Obtains an instance from a set of targets, columns and rules.

        The targets will typically be trades. The columns represent the measures to calculate.

        Parameters:
        calculationRules - the rules defining how the calculation is performed
        targets - the targets for which values of the measures will be calculated
        columns - the columns that will be calculated
        refData - the reference data
        Returns:
        the market data requirements
      • of

        public static MarketDataRequirements of​(MarketDataId<?> id)
        Obtains an instance containing a single market data ID.
        Parameters:
        id - the ID of the only market data value required
        Returns:
        a set of requirements containing a single market data ID
      • empty

        public static MarketDataRequirements empty()
        Obtains an instance specifying that no market data is required.
        Returns:
        a set of requirements specifying that no market data is required
      • builder

        public static MarketDataRequirementsBuilder builder()
        Returns an empty mutable builder for building up a set of requirements.
        Returns:
        an empty mutable builder for building up a set of requirements
      • combine

        public static MarketDataRequirements combine​(java.util.List<MarketDataRequirements> requirements)
        Merges multiple sets of requirements into a single set.
        Parameters:
        requirements - market data requirements
        Returns:
        a single set of requirements containing all the requirements from the input sets
      • getObservables

        public com.google.common.collect.ImmutableSet<ObservableId> getObservables()
        Gets keys identifying the market data values required for the calculations.
        Returns:
        the value of the property, not null
      • getNonObservables

        public com.google.common.collect.ImmutableSet<MarketDataId<?>> getNonObservables()
        Gets keys identifying the market data values required for the calculations.
        Returns:
        the value of the property, not null
      • getTimeSeries

        public com.google.common.collect.ImmutableSet<ObservableId> getTimeSeries()
        Gets keys identifying the time series of market data values required for the calculations.
        Returns:
        the value of the property, not null
      • getOutputCurrencies

        public com.google.common.collect.ImmutableSet<Currency> getOutputCurrencies()
        Gets the currencies in the calculation results. The market data must include FX rates in the to allow conversion into the reporting currency. The FX rates must have the output currency as the base currency and the reporting currency as the counter currency.
        Returns:
        the value of the property, not null
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object