Class LegalEntitySurvivalProbabilities

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

    public final class LegalEntitySurvivalProbabilities
    extends Object
    implements org.joda.beans.ImmutableBean, Serializable
    The legal entity survival probabilities.

    This represents the survival probabilities of a legal entity for a single currency.

    See Also:
    Serialized Form
    • Method Detail

      • getCurrency

        public Currency getCurrency()
        Gets the currency.

        The currency that survival probabilities are provided for.

        Returns:
        the currency
      • getValuationDate

        public LocalDate getValuationDate()
        Gets the valuation date.

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

        Returns:
        the valuation date
      • getParameterKeys

        public DoubleArray getParameterKeys()
        Obtains the parameter keys of the underlying curve.
        Returns:
        the parameter keys
      • survivalProbability

        public double survivalProbability​(LocalDate date)
        Gets the survival probability for the specified date.

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

        Parameters:
        date - the date
        Returns:
        the survival probability
        Throws:
        RuntimeException - if the value cannot be obtained
      • zeroRate

        public double zeroRate​(double yearFraction)
        Gets the continuously compounded zero hazard rate for specified year fraction.
        Parameters:
        yearFraction - the year fraction
        Returns:
        the zero hazard rate
        Throws:
        RuntimeException - if the value cannot be obtained
      • zeroRatePointSensitivity

        public CreditCurveZeroRateSensitivity zeroRatePointSensitivity​(LocalDate date)
        Calculates the zero rate point sensitivity at the specified date.

        This returns a sensitivity instance referring to the zero hazard rate sensitivity of the points that were queried in the market data. The sensitivity typically has the value (-survivalProbability * yearFraction). The sensitivity refers to the result of survivalProbability(LocalDate).

        Parameters:
        date - the date
        Returns:
        the point sensitivity of the zero rate
        Throws:
        RuntimeException - if the result cannot be calculated
      • zeroRatePointSensitivity

        public CreditCurveZeroRateSensitivity zeroRatePointSensitivity​(double yearFraction)
        Calculates the zero rate point sensitivity at the specified year fraction.

        This returns a sensitivity instance referring to the zero hazard rate sensitivity of the points that were queried in the market data. The sensitivity typically has the value (-survivalProbability * yearFraction). The sensitivity refers to the result of survivalProbability(LocalDate).

        Parameters:
        yearFraction - the year fraction
        Returns:
        the point sensitivity of the zero rate
        Throws:
        RuntimeException - if the result cannot be calculated
      • zeroRatePointSensitivity

        public CreditCurveZeroRateSensitivity zeroRatePointSensitivity​(LocalDate date,
                                                                       Currency sensitivityCurrency)
        Calculates the zero rate point sensitivity at the specified date specifying the currency of the sensitivity.

        This returns a sensitivity instance referring to the zero hazard rate sensitivity of the points that were queried in the market data. The sensitivity typically has the value (-survivalProbability * yearFraction). The sensitivity refers to the result of survivalProbability(LocalDate).

        This method allows the currency of the sensitivity to differ from the currency of the market data.

        Parameters:
        date - the date
        sensitivityCurrency - the currency of the sensitivity
        Returns:
        the point sensitivity of the zero rate
        Throws:
        RuntimeException - if the result cannot be calculated
      • zeroRatePointSensitivity

        public CreditCurveZeroRateSensitivity zeroRatePointSensitivity​(double yearFraction,
                                                                       Currency sensitivityCurrency)
        Calculates the zero rate point sensitivity at the specified year fraction specifying the currency of the sensitivity.

        This returns a sensitivity instance referring to the zero hazard rate sensitivity of the points that were queried in the market data. The sensitivity typically has the value (-survivalProbability * yearFraction). The sensitivity refers to the result of survivalProbability(LocalDate).

        This method allows the currency of the sensitivity to differ from the currency of the market data.

        Parameters:
        yearFraction - the year fraction
        sensitivityCurrency - the currency of the sensitivity
        Returns:
        the point sensitivity of the zero rate
        Throws:
        RuntimeException - if the result cannot be calculated
      • parameterSensitivity

        public CurrencyParameterSensitivities parameterSensitivity​(CreditCurveZeroRateSensitivity pointSensitivity)
        Calculates the parameter sensitivity from the point sensitivity.

        This is used to convert a single point sensitivity to parameter sensitivity. The calculation typically involves multiplying the point and unit sensitivities.

        Parameters:
        pointSensitivity - the point sensitivity to convert
        Returns:
        the parameter sensitivity
        Throws:
        RuntimeException - if the result cannot be calculated
      • getLegalEntityId

        public StandardId getLegalEntityId()
        Gets the legal entity identifier.

        This identifier is used for the reference legal entity of a credit derivative.

        Returns:
        the value of the property, not null
      • getSurvivalProbabilities

        public CreditDiscountFactors getSurvivalProbabilities()
        Gets the underlying curve.

        The metadata of the curve must define a day count.

        Returns:
        the value of the property, not null
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object