Module curves

Module curves 

Source
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.
DiscountCurve
Discount curve data structure.
DiscountCurveBuilder
Builder for DiscountCurve.
FlatCurve
Flat curve data structure.
FlatCurveBuilder
Builder for FlatCurve.
ForwardCurve
Forward curve data structure.
ForwardCurveBuilder
Builder for ForwardCurve.
SpotCurve
Spot curve data structure.
SpotCurveBuilder
Builder for SpotCurve.

Enums§

DiscountCurveBuilderError
Error type for DiscountCurveBuilder
FlatCurveBuilderError
Error type for FlatCurveBuilder
ForwardCurveBuilderError
Error type for ForwardCurveBuilder
SpotCurveBuilderError
Error type for SpotCurveBuilder

Traits§

CurveIndex
Curve index trait.
Curves
Generic trait for curves.