Interface FiniteDifferenceInterestRateProduct

All Superinterfaces:
FiniteDifferenceProduct<FiniteDifferenceInterestRateModel>, Product
All Known Implementing Classes:
Bond, OptionOnBond, Swap, SwapLeg, Swaption, Swaption.ResolvedSwaption

public interface FiniteDifferenceInterestRateProduct extends FiniteDifferenceProduct<FiniteDifferenceInterestRateModel>
Interface for products valued by a finite-difference interest-rate model.

This interface specializes the generic FiniteDifferenceProduct to the case of interest-rate finite-difference models.

Interest-rate products typically involve event times such as fixing dates, coupon dates, payment dates, exercise dates, call dates, or redemption dates. These are exposed via getEventTimes().

At an event time t, the backward induction first produces the continuation value

V(t^{+},x),

and the product then applies its event rule to obtain

V(t^{-},x) = \mathcal{J}_{t}(V(t^{+},x),x).

Typical examples are:

  • adding a coupon or redemption amount,
  • applying early exercise,
  • applying callability,
  • processing a fixing-dependent cashflow.

Products without intermediate events may return an empty array from getEventTimes() and use the default implementation of applyEventCondition(double, double[], FiniteDifferenceInterestRateModel).

Author:
Alessandro Gnoatto
  • Method Details

    • getModelClass

      default Class<FiniteDifferenceInterestRateModel> getModelClass()
      Description copied from interface: FiniteDifferenceProduct
      Returns the value.
      Specified by:
      getModelClass in interface FiniteDifferenceProduct<FiniteDifferenceInterestRateModel>
      Returns:
      The value.
    • getEventTimes

      default double[] getEventTimes()
      Returns the event times of the product.

      Event times are the dates where the backward induction may have to apply a jump or another event condition, for example because of coupon accrual, coupon payment, fixing, exercise, callability, or redemption.

      Products without intermediate events may return an empty array.

      Returns:
      The event times of the product.
    • applyEventCondition

      default double[] applyEventCondition(double time, double[] valuesAfterEvent, FiniteDifferenceInterestRateModel model)
      Applies the event condition at a given event time.

      The input array valuesAfterEvent represents the continuation values immediately after the event time, that is

      V(t^{+},x).

      The returned array represents the values immediately before the event time, that is

      V(t^{-},x).

      The ordering of the entries must match the state-space ordering of the underlying finite-difference model.

      The default implementation leaves the continuation values unchanged.

      Parameters:
      time - The event time.
      valuesAfterEvent - The continuation values immediately after the event.
      model - The finite-difference interest-rate model.
      Returns:
      The values immediately before the event.