Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Language Reference

CONVEXIT Function

calculates and returns a scalar containing the convexity of a non-contingent cash-flow

 { {CONVEXIT}( times,flows,ytm) }

The CONVEXIT function calculates and returns a scalar containing the convexity
of a non-contingent cash-flow.

times
is an n-dimensional column vector of times.
Elements should be non-negative.
flows
is an n-dimensional column vector of cash-flows.
ytm
is the per-period yield-to-maturity of the cash-flow stream. This is a scalar and should be positive.

Convexity is essentially a measure of how duration, the sensitivity of price to yield, changes as interest rates change:
C = [1/P] [( d2 P)/( dy2 )]

With cash-flows that are not yield sensitive, and the assumption of parallel shifts to a flat term-structure, convexity is given by:
C=
\frac{ \sum_{k=1}^K t_k (t_k+1)
\frac{ c(k) } { (1+y)^{t_k} } }
{ P (1+y)^2 }
where P is the present value, y is the effective per period yield-to-maturity, K is the number of cash-flows, the k-th cash-flow being c(k) tk periods from the present.

Example proc iml;
timesn=do(1,100,1);
timesn=T(timesn);
flows=repeat(10,100);
ytm=.1;
convexit=convexit(timesn,flows,ytm);
print convexit ;
quit;

CONVEXIT
199.26229

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.