Term Structures

Overview

A term structure model is a model that allows you price various fixed instrument contracts. Typically this means a curve, but the davinci quantlib wrapper includes models that price fixed income optionality as a term structure model as well.

In order to price the contract, the projected cash flows need to be discounted using a discount curve. The curve used should reflect the riskiness of the cash flows. That is, if the bond has been issued by an entity that has some risk of default (see credit risk), then a curve that prices in the credit risk should be used when discounting the cash flows.

Construction

Constructing a term structure in quantlib follows the same basic process regardless of the term structure type. A set of instruments (contracts) is constructed with prices (or rates) associated with each contract. (in the native quantlib library, these are called helpers).

The term structure is then built from this set of observations. Note, even if you are building a curve such as a Nelson Siegel type curve (one that is built from a set of 4 parameters), the quantlib library still requires a set of instruments. That is, it calculates what the four parameters should be based on the observed prices. You cannot construct the curve from just a set of Nelson Siegel parameters. The short around this is to construct a set of ficttitious instruments from the set of parameters. (That is, construct, create a list of contracts and calculate what the price would be based on the nelson siegel parameters, then pass these instruments to the nelson siegel constructor)

The davinci wrapper library makes no distinction between a contract and a helper. The contract object has a price or rate property which defaults to None. If you are constructing the contract in order to build a curve, you need to supply an observeed price or rate. The library will construct the necessary helpers in the background.

Topics

Option Models

Option models allow you to price options that are embedded within a fixed income contract. The most common type of model is the short rate model, using a tree structure.