Bond_Functions

FunctionIt equals the first date in the accrual schedule and does not necessarily coincide with the payment date of the first coupon.

Function

It is defined as the present value of all cash flows received after

There exist 3 distinct methods for obtaining the dirty price:

If

Function

It is defined as the bond's dirty price at

There exist 4 distinct methods for obtaining the clean price:

If

Function

It equals the first date in the accrual schedule and does not necessarily coincide with the payment date of the first coupon.

Function

It equals the last date in the accrual schedule and does not necessarily coincide with the payment date of the last coupon.

Function

If

Function

If

Function

If

Function

If

Function

If

Function

If

Function

If

Function

If

Function

If

Function

Note the reference period can differ from the corresponding accrual period and is needed in the calculation of the time length of the accrual period by a few day count conventions, such as ACT/ACT(ICMA)

If

Function

Note the reference period can differ from the corresponding accrual period and is needed in the calculation of the time length of the accrual period by a few day count conventions, such as ACT/ACT(ICMA)

If

Function

This equals the number of calendar days of the accrual period containing

If

Function

This equals the number of calendar days of the accrual period containing

If

Function

This equals the number of calendar days from the start of the accrual period containing

If

Function

This equals the number of calendar days from the start of the accrual period containing

If

Function

This equals the interest amount that has been earned up to

If

Function

The result is the change in NPV (on a notional of 100) due to a uniform 1-basis-point change in the rate paid by the cash flows.

There exist 2 distinct methods for obtaining the NPV:

If

Function

This is the theoretical flat coupon rate that the bond would need to have in order for its calculated clean price to equal a given clean price input.

A discounting yield curve must be provided.

If a clean price is not provided, it is calculated from the given discounting yield curve.

If

Function

The exact duration definition should be specified out of the list Bond::Duration Type

If

Function

KRD is defined and implemented outside of QuantLib as follows:

Let

KRD is an array of

More specifically,

Similarly,

Note that both the bond's yield

Also the yield curve is built using linear interpolation and flat extrapolation with respect to the zero rates.

This means, shifting for example the rate

Similarly, the rate

If

Function

The convexity is defined as follows:

Let

Let

Then the second derivative (a measure of curvature)

Note that

Convexity is then defined as

If

Function

It equals the change in NPV (on a notional of 100) caused by an increase in yield by one basis point.

Obtained by setting dy = 0.0001 in the 2nd-order Taylor series expansion.

If

Function

The yield value of a one basis point change in price is the derivative of the yield with respect to the price multiplied by 0.01

If

Function

Here the Z-spread is defined as the single rate

This function requires the input of a "risk-free" curve - a treasury or swap curve - that is used to imply the time-dependent rate

It also needs the bond clean price as of time

If

Function

Here the yield is defined as the single rate

There exist 2 distinct methods for obtaining the yield:

If

Function

This is based on the actual bond's notional (not scaled to 100).

The theoretical settlement value is returned if no clean price is provided.

The default bond settlement date is used for calculation.