Class SwapPointsCurve
Forward FX does not trade as outright prices — it trades as points
(pips to add to spot) at standard tenors (ON, 1W, 1M, 3M, ...). This class
stores the pillar dates resolved through CurrencyPair.tenorDate(java.time.LocalDate, java.lang.String)
(so modified-following / end-end are already applied) and interpolates
points linearly in actual days between pillars — the interbank
convention for broken dates. Beyond the last pillar it extrapolates the
slope of the final segment; before the first pillar it interpolates from
zero points at spot.
Covered interest parity connects the curve to rates: with continuously
compounded rates, F = S * exp((r_quote - r_base) * tau). The
impliedCarry(java.time.LocalDate) accessor inverts that, giving the rate differential
the points imply — the bridge to rates.YieldCurve bootstrapping
and the input NDF pricing needs for restricted currencies.
The curve is immutable after SwapPointsCurve.Builder.build(); lookups are
allocation-free (binary search over primitive arrays), so a pricing loop
can call outright(java.time.LocalDate) per tick if needed.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAccumulates tenor/points quotes, then freezes them into a curve. -
Method Summary
Modifier and TypeMethodDescriptionstatic SwapPointsCurve.Builderbuilder(CurrencyPair pair, LocalDate tradeDate, double spotRate) doubleforwardPoints(LocalDate valueDate) Interpolated forward points (price terms) for a settlement date: linear in actual days, anchored at zero on the spot date.doubleimpliedCarry(LocalDate valueDate) Continuously compounded rate differential (quote minus base) implied by covered interest parity at a date:ln(F/S) / tau, ACT/365.doubleOutright forward for a market tenor of this curve's pair.doubleOutright forward: spot plus interpolated points.pair()String[]Pillar tenors in date order (diagnostics/reporting).spotDate()The spot settlement date all pillar offsets are measured from.doublespotRate()
-
Method Details
-
builder
public static SwapPointsCurve.Builder builder(CurrencyPair pair, LocalDate tradeDate, double spotRate) -
forwardPoints
Interpolated forward points (price terms) for a settlement date: linear in actual days, anchored at zero on the spot date. -
outright
Outright forward: spot plus interpolated points. -
outright
Outright forward for a market tenor of this curve's pair. -
impliedCarry
Continuously compounded rate differential (quote minus base) implied by covered interest parity at a date:ln(F/S) / tau, ACT/365. Positive when the quote currency yields more (points ascending). -
spotDate
The spot settlement date all pillar offsets are measured from. -
spotRate
public double spotRate() -
pair
-
pillarTenors
Pillar tenors in date order (diagnostics/reporting).
-