Expand description
Base curve data structure and implementations. Curves (in the financial sense) are functions that map a time to a value, such as a yield curve or a swap curve. They may also be known as term structures depending on the context. Curves module.
This module contains the following curve structures:
Curves are constructed from a set of dates and rates, and can be used to interpolate rates for dates that are not in the curve. Currently, the curves are fit to a Nelson-Siegel-Svensson model via particle swarm optimization (thanks to the argmin crate), and a log-cosh loss function, however these may change in the future.
The curves are fit to the models “lazily” in the sense that no fitting takes place until the user requests a rate for a date that is not present in the curve. At that point, the curve is fit to the model and the rate is interpolated.
Structs§
- Curve
- Curve data structure.
- Discount
Curve - Discount curve data structure.
- Discount
Curve Builder - Builder for
DiscountCurve. - Flat
Curve - Flat curve data structure.
- Flat
Curve Builder - Builder for
FlatCurve. - Forward
Curve - Forward curve data structure.
- Forward
Curve Builder - Builder for
ForwardCurve. - Spot
Curve - Spot curve data structure.
- Spot
Curve Builder - Builder for
SpotCurve.
Enums§
- Discount
Curve Builder Error - Error type for DiscountCurveBuilder
- Flat
Curve Builder Error - Error type for FlatCurveBuilder
- Forward
Curve Builder Error - Error type for ForwardCurveBuilder
- Spot
Curve Builder Error - Error type for SpotCurveBuilder
Traits§
- Curve
Index - Curve index trait.
- Curves
- Generic trait for curves.