quantfin-0.1.0.1: Quant finance library in pure Haskell.

Safe HaskellSafe-Inferred
LanguageHaskell2010

Quant.YieldCurve

Synopsis

Documentation

class YieldCurve a where Source

The YieldCurve class defines the basic operations of a yield curve.

Minimal complete definition: disc.

Minimal complete definition

disc

Methods

disc :: YieldCurve a => a -> Double -> Double Source

Calculate the discount factor for a given maturity.

forward :: YieldCurve a => a -> Double -> Double -> Double Source

Calculate the forward rate between a t1 and t2

spot :: YieldCurve a => a -> Double -> Double Source

Calculate the spot rate for a given maturity.

data FlatCurve Source

A flat curve is just a flat curve with one continuously compounded rate at all points on the curve.

Constructors

FlatCurve Double 

data NetYC a Source

YieldCurve that represents the difference between two YieldCurves.

Constructors

NetYC a a 

Instances