Class ImmutableCreditRatesProvider

  • All Implemented Interfaces:
    CreditRatesProvider, java.io.Serializable, Bean, ImmutableBean

    public final class ImmutableCreditRatesProvider
    extends java.lang.Object
    implements CreditRatesProvider, ImmutableBean, java.io.Serializable
    The immutable rates provider, used to calculate analytic measures.

    The primary usage of this provider is to price credit default swaps on a legal entity. This includes credit curves, discounting curves and recovery rate curves.

    See Also:
    Serialized Form
    • Method Detail

      • survivalProbabilities

        public LegalEntitySurvivalProbabilities survivalProbabilities​(StandardId legalEntityId,
                                                                      Currency currency)
        Description copied from interface: CreditRatesProvider
        Gets the survival probabilities for a standard ID and a currency.

        If both the standard ID and currency are matched, the relevant LegalEntitySurvivalProbabilities is returned.

        If the valuation date is on the specified date, the survival probability is 1.

        Specified by:
        survivalProbabilities in interface CreditRatesProvider
        Parameters:
        legalEntityId - the standard ID of legal entity to get the discount factors for
        currency - the currency to get the discount factors for
        Returns:
        the survival probabilities
      • discountFactors

        public CreditDiscountFactors discountFactors​(Currency currency)
        Description copied from interface: CreditRatesProvider
        Gets the discount factors for a currency.

        The discount factor represents the time value of money for the specified currency when comparing the valuation date to the specified date.

        If the valuation date is on the specified date, the discount factor is 1.

        Specified by:
        discountFactors in interface CreditRatesProvider
        Parameters:
        currency - the currency to get the discount factors for
        Returns:
        the discount factors for the specified currency
      • recoveryRates

        public RecoveryRates recoveryRates​(StandardId legalEntityId)
        Description copied from interface: CreditRatesProvider
        Gets the recovery rates for a standard ID.

        If both the standard ID and currency are matched, the relevant RecoveryRates is returned.

        Specified by:
        recoveryRates in interface CreditRatesProvider
        Parameters:
        legalEntityId - the standard ID of legal entity to get the discount factors for
        Returns:
        the recovery rates
      • findData

        public <T> java.util.Optional<T> findData​(MarketDataName<T> name)
        Description copied from interface: CreditRatesProvider
        Finds the market data with the specified name.

        This is most commonly used to find a Curve using a CurveName. If the market data cannot be found, empty is returned.

        Specified by:
        findData in interface CreditRatesProvider
        Type Parameters:
        T - the type of the market data value
        Parameters:
        name - the name to find
        Returns:
        the market data value, empty if not found
      • getValuationDate

        public java.time.LocalDate getValuationDate()
        Gets the valuation date.

        All curves and other data items in this provider are calibrated for this date.

        Specified by:
        getValuationDate in interface CreditRatesProvider
        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