Class ExplainKey<T>

  • Type Parameters:
    T - the type of the object associated with the key
    All Implemented Interfaces:
    Named, Serializable, 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


        public static final ExplainKey<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<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.

        public static final ExplainKey<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.

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

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

        public static final ExplainKey<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.

        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.

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

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

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

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

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

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

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

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

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

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

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

        public static final ExplainKey<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.

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

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

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

        public static final ExplainKey<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<Double> WEIGHT
        The weight of this observation. Weighting applies when averaging more than one observation to produce the final rate.

        public static final ExplainKey<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<Double> SPREAD
        The spread, added to the forward rate.
      • GEARING

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

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

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

        public static final ExplainKey<Double> STRIKE_VALUE
        The strike value.

        public static final ExplainKey<Double> CONVEXITY_ADJUSTED_RATE
        The convexity adjusted rate.

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

      • of

        public static <R> ExplainKey<R> of​(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
        name - the name of the field
        a field with the specified name