Class FixingHistory
java.lang.Object
com.quantfinlib.rates.FixingHistory
Published fixings of one index (for example SOFR), by fixing date. A
seasoned trade needs them: a coupon whose fixings are already in the past
is not forecast off a curve, it is computed from what was published.
Rule used by the legs: a fixing dated before the valuation date must be in the history (else the valuation throws, because silently forecasting a past fixing would misprice a seasoned trade); a fixing dated on the valuation date is taken from the history when present and forecast otherwise; later fixings are always forecast.
-
Method Summary
Modifier and TypeMethodDescriptionstatic FixingHistoryempty()A history with no fixings (a forward-starting or unseasoned trade).The fixing published fordate, if any.static FixingHistoryA history from a date-to-rate map (decimal rates, finite).intsize()Number of fixings held.
-
Method Details
-
empty
A history with no fixings (a forward-starting or unseasoned trade).- Returns:
- the empty history
-
of
A history from a date-to-rate map (decimal rates, finite). The map is copied.- Parameters:
fixings- fixing date to published rate- Returns:
- the history
-
fixing
The fixing published fordate, if any.- Parameters:
date- fixing date- Returns:
- the fixing or empty
-
size
public int size()Number of fixings held.- Returns:
- the count
-