Class MarketDataRequirements

  • All Implemented Interfaces:
    org.joda.beans.Bean, org.joda.beans.ImmutableBean

    public final class MarketDataRequirements
    extends Object
    implements org.joda.beans.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,
                                                List<? extends CalculationTarget> targets,
                                                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​(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 ImmutableSet<ObservableId> getObservables()
        Gets keys identifying the market data values required for the calculations.
        Returns:
        the value of the property, not null
      • getNonObservables

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

        public 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 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object