​A selection of topics on IT and its application to finance. 
​Send me your comments, questions ​or suggestions by clicking


Some Common Bond Properties explained

Simple yield  -  Coupon / Price

Yield to Maturity - the yield that when used to discount the bond cashflows results in a value equal to  the current price of the bond


Modified Duration - A measure of price sensitivity of a bond to a change in interest rates.

Macaulay Duration - A measure of the weighted time to maturity of the cashflows of a bond.

To calculate MacD

For each cashflow    

    calculate its PVi    = cashflow/POWER(1+YTM,period)   

    Multiply the PV with the period  => Yi = PVi*period


Bond Price = SUM(PVi)

A    = SUM(Yi)

MacD = A/Price

e.g Bond A, YTM = 8%, Coupon = 9% Maturity 3 years

Period         1         2           3            SUM

Cashflow      9        9          109          127

PV               8.33    7.72      86.53      102.58        => price

PV*period    8.33    15.43    259.58     283.35       => A

Mac Dur = 283.35/102.58 = 2.7623

Mdur = Mac Dur/(1+(YTM/Coupon freq))   Coup Freq = 1 for annual ,2 for semi-annual etc …


Is a measure of the change in the duration of a bond w.r.t changes in interest rates.

To calculate Convexity

For each cashflow    

   calculate its PVi    = cashflow/POWER(1+YTM,period)    

   calculate convexity element = (1/(power(1+YTM,2))) * (PVi) *                                                          (power(period,2) + period) => Ci


Calculate SUM(PVi) => Price

Calculate SUM(Ci)  => A

Convexity = A/Price

Bond Spreads


Typically this is the difference between the yield of a bond at a  certain maturity point and and the equivalent yield of a Government bond at the same maturity point


The parallel shift required to the yield of a bond priced using the zero-coupon  treasury yield curve to price it at its market value

Asset Swap

A credit risk measure. The difference between the YTM of a bond and the equivalent LIBOR rate.