Class DiscountCurve

java.lang.Object
com.quantfinlib.rates.DiscountCurve

public final class DiscountCurve extends Object
A dated discount curve P(t) built from pillar discount factors: the object both an OIS discount curve and a projection curve (for example a 3M forwarding curve, a pseudo-discount curve whose ratios give the index forwards) are made of. Built by MultiCurveBootstrap or directly from pillars with of(LocalDate, double[], double[], CurveInterpolation).

Time axis: t is the ACT/365 (fixed) year fraction from the valuation date, so P(0) = 1. Interpolation acts on y(t) = -ln P(t), see CurveInterpolation.

Conventions of the derived quantities:

  instantaneous forward  f(t) = dy/dt                          (continuous comp.)
  zero rate              z(t) = y(t) / t                        (continuous comp.)
  simple forward         F(s,e) = (P(s)/P(e) - 1) / tau(s,e)    tau from the day count
  • Method Details

    • of

      public static DiscountCurve of(LocalDate valuationDate, double[] times, double[] discountFactors, CurveInterpolation interpolation)
      A curve from pillar times (ACT/365F years after valuationDate, strictly increasing, positive) and their discount factors (positive). Arrays are copied.
    • time

      public double time(LocalDate date)
      Curve time of a date: ACT/365F years from the valuation date.
    • valuationDate

      public LocalDate valuationDate()
    • interpolation

      public CurveInterpolation interpolation()
    • pillarCount

      public int pillarCount()
    • pillarTime

      public double pillarTime(int i)
      Time of pillar i (0-based).
    • pillarDiscountFactor

      public double pillarDiscountFactor(int i)
      Discount factor of pillar i (0-based).
    • discountFactor

      public double discountFactor(double time)
      P(t) for t >= 0.
    • discountFactor

      public double discountFactor(LocalDate date)
      P at a date on or after the valuation date.
    • zeroRate

      public double zeroRate(double time)
      Continuously compounded zero rate y(t)/t; at t = 0 the short forward.
    • forwardRate

      public double forwardRate(LocalDate start, LocalDate end, DayCount dayCount)
      Simple forward (P(s)/P(e) - 1)/tau with tau from dayCount.
    • instantaneousForward

      public double instantaneousForward(double time)
      Instantaneous forward f(t). Log-linear: the interval's constant forward (right-continuous at pillars). Monotone-convex: continuous.
    • parallelShift

      public DiscountCurve parallelShift(double shift)
      A copy with every pillar's continuously compounded zero rate shifted by shift (a parallel shift of the pillar zero curve).