Click or drag to resize
BondConvexity Method
Returns the convexity for a security.

Namespace: Imsl.Finance
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.2.0
Syntax
public static double Convexity(
	DateTime settlement,
	DateTime maturity,
	double coupon,
	double yield,
	BondFrequency frequency,
	DayCountBasis basis
)

Parameters

settlement
Type: SystemDateTime
The DateTime settlement date of the security.
maturity
Type: SystemDateTime
The DateTime maturity date of the security.
coupon
Type: SystemDouble
A double which specifies the security's annual coupon rate.
yield
Type: SystemDouble
A double which specifies the security's annual yield.
frequency
Type: Imsl.FinanceBondFrequency
A int which specifies the number of coupon payments per year (1 for annual, 2 for semiannual, 4 for quarterly).
basis
Type: Imsl.FinanceDayCountBasis
A DayCountBasis object which contains the type of day count basis to use.

Return Value

Type: Double
A double which specifies the convexity for a security.
Remarks

Convexity is the sensitivity of the duration of a security to changes in yield. It is computed using the following:

{{{1 \over {\left( {q \times {\it
            frequency}} \right)^2 }}\left\{ {\sum\limits_{t = 1}^n {t\left( {t +
            1} \right)} \left( {{{\it coupon} \over {\it frequency}}} \right)q^{
            - t} + n\left( {n + 1} \right)q^{ - n} } \right\}} \over {\left(
            {\sum\limits_{t = 1}^n {\left( {{{\it coupon} \over {\it
            frequency}}} \right)q^{ - t} }  + q^{ - n} } \right)}}
where n is calculated from Coupnum, and q = 1 +
            {{\it yield} \over {\it frequency}}.

See Also