Class ForwardCurve
java.lang.Object
com.quantfinlib.pricing.ForwardCurve
Implied FX forward curve construction from market outright forwards, with
interpolation, implied rate differentials, and covered-interest-parity
arbitrage checks against deposit rates.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddPoint(double tenorYears, double outrightForward) doubleforward(double tenorYears) Interpolated outright forward at the tenor (linear in forward points between pillars; flat-slope extrapolation beyond the last pillar).doubleforwardPoints(double tenorYears) Forward points at the tenor (outright minus spot).doubleimpliedRateDifferential(double tenorYears) Implied continuously-compounded rate differential (domestic minus foreign) from covered interest parity:F = S * e^((rd-rf)*t).doublemispricingBps(double tenorYears, double domesticRate, double foreignRate) Covered-interest-parity arbitrage check: market forward versus the deposit-implied forward, in basis points (positive = market forward rich).doublespot()static doubletheoreticalForward(double spot, double domesticRate, double foreignRate, double tenorYears) CIP-theoretical forward from SIMPLE deposit rates (see the convention note onimpliedRateDifferential(double)).
-
Constructor Details
-
ForwardCurve
public ForwardCurve(double spot)
-
-
Method Details
-
addPoint
-
spot
public double spot() -
forward
public double forward(double tenorYears) Interpolated outright forward at the tenor (linear in forward points between pillars; flat-slope extrapolation beyond the last pillar). -
forwardPoints
public double forwardPoints(double tenorYears) Forward points at the tenor (outright minus spot). -
impliedRateDifferential
public double impliedRateDifferential(double tenorYears) Implied continuously-compounded rate differential (domestic minus foreign) from covered interest parity:F = S * e^((rd-rf)*t).Convention note — this method is CONTINUOUS while
theoreticalForward(double, double, double, double)uses SIMPLE deposit rates, because each matches how its own input is quoted (a differential is usually consumed in cc form; deposits are quoted simple). Feeding this output back throughtheoreticalForwardtherefore shows a spurious ~12bp "basis" at 1y/5% that is pure compounding convention, not arbitrage — convert first. -
theoreticalForward
public static double theoreticalForward(double spot, double domesticRate, double foreignRate, double tenorYears) CIP-theoretical forward from SIMPLE deposit rates (see the convention note onimpliedRateDifferential(double)). -
mispricingBps
public double mispricingBps(double tenorYears, double domesticRate, double foreignRate) Covered-interest-parity arbitrage check: market forward versus the deposit-implied forward, in basis points (positive = market forward rich).
-