Interface CreditRatesProvider

  • All Known Implementing Classes:
    ImmutableCreditRatesProvider

    public interface CreditRatesProvider
    The 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.

    • Method Detail

      • getValuationDate

        LocalDate getValuationDate()
        Gets the valuation date.

        The raw data in this provider is calibrated for this date.

        Returns:
        the valuation date
      • survivalProbabilities

        LegalEntitySurvivalProbabilities survivalProbabilities​(StandardId legalEntityId,
                                                               Currency currency)
        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.

        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
        Throws:
        IllegalArgumentException - if the survival probabilities are not available
      • discountFactors

        CreditDiscountFactors discountFactors​(Currency currency)
        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.

        Parameters:
        currency - the currency to get the discount factors for
        Returns:
        the discount factors for the specified currency
      • recoveryRates

        RecoveryRates recoveryRates​(StandardId legalEntityId)
        Gets the recovery rates for a standard ID.

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

        Parameters:
        legalEntityId - the standard ID of legal entity to get the discount factors for
        Returns:
        the recovery rates
        Throws:
        IllegalArgumentException - if the recovery rates are not available
      • singleCreditCurveParameterSensitivity

        CurrencyParameterSensitivity singleCreditCurveParameterSensitivity​(PointSensitivities pointSensitivities,
                                                                           StandardId legalEntityId,
                                                                           Currency currency)
        Computes the parameter sensitivity for a specific credit curve.

        The credit curve is specified by legalEntityId and currency.

        Parameters:
        pointSensitivities - the point sensitivity
        legalEntityId - the legal entity
        currency - the currency
        Returns:
        the sensitivity to the curve parameters
      • singleDiscountCurveParameterSensitivity

        CurrencyParameterSensitivity singleDiscountCurveParameterSensitivity​(PointSensitivities pointSensitivities,
                                                                             Currency currency)
        Computes the parameter sensitivity for a specific discount curve.

        The discount curve is specified by currency.

        Parameters:
        pointSensitivities - the point sensitivity
        currency - the currency
        Returns:
        the sensitivity to the curve parameters
      • findData

        <T> Optional<T> findData​(MarketDataName<T> name)
        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.

        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
      • toImmutableCreditRatesProvider

        ImmutableCreditRatesProvider toImmutableCreditRatesProvider()
        Converts this provider to an equivalent ImmutableCreditRatesProvider.
        Returns:
        the equivalent immutable legal entity provider