Class Bond

java.lang.Object
net.finmath.finitedifference.interestrate.products.Bond
All Implemented Interfaces:
FiniteDifferenceProduct<FiniteDifferenceInterestRateModel>, FiniteDifferenceInterestRateProduct, Product

public class Bond extends Object implements FiniteDifferenceInterestRateProduct
Finite-difference valuation of a deterministic-cashflow bond.

This class is the reduced-scope PDE analogue of the analytic bond products in finmath. It is intentionally restricted to deterministic cashflows:

  • zero-coupon bonds,
  • fixed-coupon bonds,
  • deterministic redemption at maturity.

The class does not yet support floating coupons, credit-risk survival curves, basis-factor curves, or recovery payments.

Let T_i denote the payment dates of the schedule, \delta_i the corresponding accrual factors, c the fixed coupon rate, N the notional, and R the redemption paid on the final payment date. The deterministic cashflow paid at T_i is

C_i = N c \delta_i

for intermediate periods, and

C_n = N c \delta_n + R

on the final payment date.

In the event-based finite-difference framework this is represented through jumps of the value function at payment dates:

V(T_i^{-},x) = V(T_i^{+},x) + C_i.

The current implementation uses the one-dimensional theta-method solver and therefore requires a one-dimensional finite-difference interest-rate model.

Author:
Alessandro Gnoatto
  • Constructor Details

    • Bond

      public Bond(Schedule schedule, double fixedCoupon, double notional)
      Creates a fixed-coupon bond with redemption equal to the notional.
      Parameters:
      schedule - The payment schedule.
      fixedCoupon - The fixed coupon rate.
      notional - The notional.
    • Bond

      public Bond(Schedule schedule, double fixedCoupon, double notional, double redemption)
      Creates a deterministic-cashflow bond.
      Parameters:
      schedule - The payment schedule.
      fixedCoupon - The fixed coupon rate.
      notional - The notional.
      redemption - The redemption paid on the final payment date.
  • Method Details

    • ofZeroCouponBond

      public static Bond ofZeroCouponBond(double maturity)
      Creates a zero-coupon bond with unit notional.
      Parameters:
      maturity - The maturity.
      Returns:
      A zero-coupon bond.
    • ofZeroCouponBond

      public static Bond ofZeroCouponBond(double maturity, double notional)
      Creates a zero-coupon bond.
      Parameters:
      maturity - The maturity.
      notional - The notional paid at maturity.
      Returns:
      A zero-coupon bond.
    • getValue

      public double[] getValue(double evaluationTime, FiniteDifferenceInterestRateModel model)
      Description copied from interface: FiniteDifferenceProduct
      Returns the value.
      Specified by:
      getValue in interface FiniteDifferenceProduct<FiniteDifferenceInterestRateModel>
      Parameters:
      evaluationTime - The value.
      model - The value.
      Returns:
      The value.
    • getValues

      public double[][] getValues(FiniteDifferenceInterestRateModel model)
      Description copied from interface: FiniteDifferenceProduct
      Returns the value.
      Specified by:
      getValues in interface FiniteDifferenceProduct<FiniteDifferenceInterestRateModel>
      Parameters:
      model - The value.
      Returns:
      The value.
    • getEventTimes

      public double[] getEventTimes()
      Description copied from interface: FiniteDifferenceInterestRateProduct
      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.

      Specified by:
      getEventTimes in interface FiniteDifferenceInterestRateProduct
      Returns:
      The event times of the product.
    • applyEventCondition

      public double[] applyEventCondition(double time, double[] valuesAfterEvent, FiniteDifferenceInterestRateModel model)
      Description copied from interface: FiniteDifferenceInterestRateProduct
      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.

      Specified by:
      applyEventCondition in interface FiniteDifferenceInterestRateProduct
      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.
    • getSchedule

      public Schedule getSchedule()
      Returns the payment schedule.
      Returns:
      The payment schedule.
    • getFixedCoupon

      public double getFixedCoupon()
      Returns the fixed coupon rate.
      Returns:
      The fixed coupon rate.
    • getNotional

      public double getNotional()
      Returns the notional.
      Returns:
      The notional.
    • getRedemption

      public double getRedemption()
      Returns the redemption amount paid on the final payment date.
      Returns:
      The redemption amount.
    • getMaturity

      public double getMaturity()
      Returns the maturity, equal to the last payment date of the schedule.
      Returns:
      The maturity.
    • getCashflow

      public double getCashflow(int periodIndex)
      Returns the deterministic cashflow paid at the given period index.
      Parameters:
      periodIndex - The period index.
      Returns:
      The cashflow paid at the corresponding payment date.
    • toString

      public String toString()
      Overrides:
      toString in class Object