Class ExplainKey<T>

  • Type Parameters:
    T - the type of the object associated with the key
    All Implemented Interfaces:
    Named, java.io.Serializable, java.lang.Comparable<ExplainKey<T>>

    public final class ExplainKey<T>
    extends TypedString<ExplainKey<T>>
    A key for the map of explanatory values.

    This key is used with ExplainMap to create a loosely defined data structure that allows an explanation of a calculation to be represented.

    See Also:
    Serialized Form
    • Field Detail

      • ENTRY_INDEX

        public static final ExplainKey<java.lang.Integer> ENTRY_INDEX
        The index of this entry within the parent. For example, this could be used to represent the index of the leg within the swap, or the index of the payment period within the leg.
      • ENTRY_TYPE

        public static final ExplainKey<java.lang.String> ENTRY_TYPE
        The type of this entry. For example, this could be used to distinguish between a swap leg, swap payment period and a FRA.
      • PAYMENT_EVENTS

        public static final ExplainKey<java.util.List<ExplainMap>> PAYMENT_EVENTS
        The list of payment events.
      • PAYMENT_PERIODS

        public static final ExplainKey<java.util.List<ExplainMap>> PAYMENT_PERIODS
        The list of payment periods.
      • ACCRUAL_PERIODS

        public static final ExplainKey<java.util.List<ExplainMap>> ACCRUAL_PERIODS
        The list of accrual periods.
      • RESET_PERIODS

        public static final ExplainKey<java.util.List<ExplainMap>> RESET_PERIODS
        The list of reset periods.
      • OBSERVATIONS

        public static final ExplainKey<java.util.List<ExplainMap>> OBSERVATIONS
        The list of rate observations.
      • COMPLETED

        public static final ExplainKey<java.lang.Boolean> COMPLETED
        The flag to indicate that the period has completed. For example, a swap payment period that has already paid would have this set to true. This will generally never be set to false.
      • PAYMENT_CURRENCY

        public static final ExplainKey<Currency> PAYMENT_CURRENCY
        The currency of the payment.
      • PAY_RECEIVE

        public static final ExplainKey<PayReceive> PAY_RECEIVE
        Whether the entry is being paid or received.
      • LEG_TYPE

        public static final ExplainKey<java.lang.String> LEG_TYPE
        An indication of the pay-off formula that applies to the leg. For example, this could be used to distinguish between fixed, overnight, IBOR and inflation.
      • NOTIONAL

        public static final ExplainKey<CurrencyAmount> NOTIONAL
        The effective notional, which may be converted from the contract notional in the case of FX reset.
      • TRADE_NOTIONAL

        public static final ExplainKey<CurrencyAmount> TRADE_NOTIONAL
        The notional, as defined in the trade. This is the notional in the trade, which may be converted to the actual notional by FX reset.
      • PAYMENT_DATE

        public static final ExplainKey<java.time.LocalDate> PAYMENT_DATE
        The payment date, adjusted to be a valid business day if necessary.
      • UNADJUSTED_PAYMENT_DATE

        public static final ExplainKey<java.time.LocalDate> UNADJUSTED_PAYMENT_DATE
        The payment date, before any business day adjustment.
      • START_DATE

        public static final ExplainKey<java.time.LocalDate> START_DATE
        The accrual start date, adjusted to be a valid business day if necessary.
      • UNADJUSTED_START_DATE

        public static final ExplainKey<java.time.LocalDate> UNADJUSTED_START_DATE
        The accrual start date, before any business day adjustment.
      • END_DATE

        public static final ExplainKey<java.time.LocalDate> END_DATE
        The accrual end date, adjusted to be a valid business day if necessary.
      • UNADJUSTED_END_DATE

        public static final ExplainKey<java.time.LocalDate> UNADJUSTED_END_DATE
        The accrual end date, before any business day adjustment.
      • ACCRUAL_DAY_COUNT

        public static final ExplainKey<DayCount> ACCRUAL_DAY_COUNT
        The day count used to calculate the year fraction.
      • ACCRUAL_YEAR_FRACTION

        public static final ExplainKey<java.lang.Double> ACCRUAL_YEAR_FRACTION
        The year fraction between the start and end dates.
      • ACCRUAL_DAYS

        public static final ExplainKey<java.lang.Integer> ACCRUAL_DAYS
        The number of accrual days between the start and end dates.
      • DAYS

        public static final ExplainKey<java.lang.Integer> DAYS
        The actual number of days between the start and end dates.
      • DISCOUNT_FACTOR

        public static final ExplainKey<java.lang.Double> DISCOUNT_FACTOR
        The discount factor, typically derived from a curve.
      • FIXED_RATE

        public static final ExplainKey<java.lang.Double> FIXED_RATE
        The fixed rate, as defined in the contract.
      • INDEX

        public static final ExplainKey<Index> INDEX
        The observed index, such as an Ibor or Overnight index.
      • FORWARD_RATE_START_DATE

        public static final ExplainKey<java.time.LocalDate> FORWARD_RATE_START_DATE
        The start date used to calculate the forward rate.
      • FORWARD_RATE_END_DATE

        public static final ExplainKey<java.time.LocalDate> FORWARD_RATE_END_DATE
        The end date used to calculate the forward rate.
      • FIXING_DATE

        public static final ExplainKey<java.time.LocalDate> FIXING_DATE
        The fixing date.
      • INDEX_VALUE

        public static final ExplainKey<java.lang.Double> INDEX_VALUE
        The observed index value, typically derived from a curve. This may be known exactly if the fixing has occurred.
      • FROM_FIXING_SERIES

        public static final ExplainKey<java.lang.Boolean> FROM_FIXING_SERIES
        The flag to indicate that the that the observed value is from a fixing time-series. This will generally never be set to false.
      • WEIGHT

        public static final ExplainKey<java.lang.Double> WEIGHT
        The weight of this observation. Weighting applies when averaging more than one observation to produce the final rate.
      • COMBINED_RATE

        public static final ExplainKey<java.lang.Double> COMBINED_RATE
        The combined rate, including weighting. This rate differs from the observed rate if there is more than one fixing involved. For example, IborInterpolatedRateComputation has two observed rates which are combined to create this rate.
      • SPREAD

        public static final ExplainKey<java.lang.Double> SPREAD
        The spread, added to the forward rate.
      • GEARING

        public static final ExplainKey<java.lang.Double> GEARING
        The gearing, that the rate is multiplied by.
      • PAY_OFF_RATE

        public static final ExplainKey<java.lang.Double> PAY_OFF_RATE
        The pay-off rate, which includes adjustments like weighting, spread and gearing.
      • UNIT_AMOUNT

        public static final ExplainKey<java.lang.Double> UNIT_AMOUNT
        The unit amount. This is typically the rate multiplied by the year fraction, before multiplication by the notional.
      • STRIKE_VALUE

        public static final ExplainKey<java.lang.Double> STRIKE_VALUE
        The strike value.
      • CONVEXITY_ADJUSTED_RATE

        public static final ExplainKey<java.lang.Double> CONVEXITY_ADJUSTED_RATE
        The convexity adjusted rate.
      • FORWARD_RATE

        public static final ExplainKey<java.lang.Double> FORWARD_RATE
        The forward rate.
    • Method Detail

      • of

        public static <R> ExplainKey<R> of​(java.lang.String name)
        Obtains an instance from the specified name.

        Field names may contain any character, but must not be empty.

        Type Parameters:
        R - the inferred type of the key
        Parameters:
        name - the name of the field
        Returns:
        a field with the specified name