Class DiscountCurve
java.lang.Object
com.quantfinlib.rates.DiscountCurve
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 Summary
Modifier and TypeMethodDescriptiondoublediscountFactor(double time) P(t)fort >= 0.doublediscountFactor(LocalDate date) Pat a date on or after the valuation date.doubleforwardRate(LocalDate start, LocalDate end, DayCount dayCount) Simple forward(P(s)/P(e) - 1)/tauwithtaufromdayCount.doubleinstantaneousForward(double time) Instantaneous forwardf(t).static DiscountCurveof(LocalDate valuationDate, double[] times, double[] discountFactors, CurveInterpolation interpolation) A curve from pillar times (ACT/365F years aftervaluationDate, strictly increasing, positive) and their discount factors (positive).parallelShift(double shift) A copy with every pillar's continuously compounded zero rate shifted byshift(a parallel shift of the pillar zero curve).intdoublepillarDiscountFactor(int i) Discount factor of pillari(0-based).doublepillarTime(int i) Time of pillari(0-based).doubleCurve time of a date: ACT/365F years from the valuation date.doublezeroRate(double time) Continuously compounded zero ratey(t)/t; att = 0the short forward.
-
Method Details
-
of
public static DiscountCurve of(LocalDate valuationDate, double[] times, double[] discountFactors, CurveInterpolation interpolation) A curve from pillar times (ACT/365F years aftervaluationDate, strictly increasing, positive) and their discount factors (positive). Arrays are copied. -
time
Curve time of a date: ACT/365F years from the valuation date. -
valuationDate
-
interpolation
-
pillarCount
public int pillarCount() -
pillarTime
public double pillarTime(int i) Time of pillari(0-based). -
pillarDiscountFactor
public double pillarDiscountFactor(int i) Discount factor of pillari(0-based). -
discountFactor
public double discountFactor(double time) P(t)fort >= 0. -
discountFactor
Pat a date on or after the valuation date. -
zeroRate
public double zeroRate(double time) Continuously compounded zero ratey(t)/t; att = 0the short forward. -
forwardRate
-
instantaneousForward
public double instantaneousForward(double time) Instantaneous forwardf(t). Log-linear: the interval's constant forward (right-continuous at pillars). Monotone-convex: continuous. -
parallelShift
A copy with every pillar's continuously compounded zero rate shifted byshift(a parallel shift of the pillar zero curve).
-