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(LocalDate, 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. Interpolating points linearly in days ignores the
discount-factor structure of the forward; that is the interbank
convention for broken dates within a year and becomes biased for long
dates with large carry, where interpolating the implied carry is better.
Pre-spot dates (today, tomorrow) are read from explicit
SwapPointsCurve.Builder.preSpot quotes.
Covered interest parity connects the curve to rates: with continuously
compounded rates, F = S * exp((r_quote - r_base) * tau). The
impliedCarry(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(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.doubleimpliedCarry(LocalDate valueDate, DayCount dayCount) impliedCarry(LocalDate)with tau measured in the given day count.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). -
impliedCarry
impliedCarry(LocalDate)with tau measured in the given day count. -
spotDate
The spot settlement date all pillar offsets are measured from. -
spotRate
public double spotRate() -
pair
-
pillarTenors
Pillar tenors in date order (diagnostics/reporting).
-