quantlib.models.shortrate.onefactor_model.

OneFactorAffineModel

class OneFactorAffineModel

Bases: OneFactorModel

Single-factor affine base class

Single-factor models with an analytical formula for discount bonds should inherit from this class. They must then implement the functions A(T,t) and B(T,t) such that

P(t, T, r_t) = A(t, T)\exp\{-B(t, T) r_t\}.

Attributes:
dynamics

short-rate dynamics

Methods

discount_bond(self, Time now, Time maturity, ...)

discount_bond_option(self, ...)

params(self)

set_params(self, Array params)