Saturday, 1 August 2015

First coupon adjustment to the simple bond pricer

$ c(\frac{1-{\frac{1}{(1+r)^n}}}{1-\frac{1}{(1+r)}}) + \frac{P}{(1+r)^{n}}$

To make this slightly better, I will improve the first part of the equation - the annuity.  This is the equality of the sum of $n$ payments starting with the amount $c$.  But with a bond, you never start with $c$.  You will either (1) have a whole period to wait (that is, you start with $\frac{c}{(1+r)}$), or else (2) you're a day away from the coupon payment, in which case if you do buy the bond, you have to compensate the buyer by giving him an accrued interest payment equivalent to almost that whole coupon, or else (3) you're somewhere in between, in which case you can assume you get coupon minus accrued interest, which is a time-linear fraction of the coupon.

So the equation at the top is too generous to you, since it assumes the first coupon payment is $c$.  Best case, it is  $\frac{c}{(1+r)}$, but probably some fraction of that.  Notice that on the bottom line $1- \frac{1}{(1+r)}$ is also expressed as $\frac{r}{(1+r)}$, which means you multiply by $\frac{(1+r)}{r}$.  But if best case I only get an annuity of $\frac{c}{(1+r)}$, the  expression simplifies and you have:


$ c(\frac{1-{\frac{1}{(1+r)^n}}}{r}) + \frac{P}{(1+r)^{n}}$

Lastly you can just make an adjustment for the fact that you only get some fraction $f$ of that first coupon of $\frac{c}{(1+r)}$ anyway.

$ c(\frac{1-{\frac{1}{(1+r)^n}}}{r}) + \frac{P}{(1+r)^{n}} - f(\frac{c}{(1+r)})$


Ukrainian sovereign bond pricer


Displaying image001.png

I took the equation for a simple bond pricer discussed in my last post and created an excel formula with it.  I then loaded up a Ukrainian bond and checked out its maturity date, face value, coupon and current market price.  I used these to work out which value of the discounting value $r$ returned the current market price of the bond.  I then subtracted the risk free rate, and the resulting implied credit spread was really surprisingly close to the actual credit spread of the bond.  I just used Excel's goal seek functionality to find $r$ based on the inputs.  

Wednesday, 29 July 2015

Simple fixed income pricer

To recap on the annuity remember this is a finite series of evenly spaced payments out into the future.  Given this regularity, we use the sum of a sequence of $n$ elements of a geometric series to work out the value of the annuity.  We then switch context and imagine that the regular payments are just like a bond's coupons.  And the growth rate (the common ratio $r$ of the geometric series) is then a discount factor, a present value scaling factor, described as $\frac{1}{(1+r)^n}$, where $r$ is a period rate and $n$ is the number of payments.

The formula $ c(\frac{1-{\frac{1}{(1+r)^n}}}{1-\frac{1}{(1+r)}})$  immediately in one equation tells you the present value of all $n$ coupons, assuming a single discounting rate $r$ can be found.  Add to this the present value of the final maturity amount ($\frac{F}{(1+r)^n}$, where $F$ is the face value of the bond and $n$ is the final payment period count) and you have a basic bond pricer.

Setting $c=1$ arbitrarily I can plot this as a function of the discount rate, for various values of compounding period $n$.   

First, when (semi-annual) rates are 10%.  You can see the present value of the principal soon dies away to nothing.  And the present value of the coupons reaches a stable value.  Notice how this flattens, just as the perpetuity would indicate.  Notice that this is probably a decent map for most corporate bonds.  The present values are equal around 10 periods in - or about 5 years.


The picture at 4% for the discount rate looks like this:

Notice how the principal PV loses its value more slowly, and the value of the coupon rises more gradually to a higher point.

Finally, the curves when rates are ultra low (10 bps) look like this:

The principal hardly loses its value and the coupon value rises almost linearly in the number of compounding periods.

When the lines cross that means, for theoretical bonds with those terms, there's as much fixed income value in the coupon as there is in the principal.  As your maturity lengthens, then coupons are usually the more valuable part of the fixed income.  As rates increase, the '50-50' theoretical bond (one where you derive just as much value from the coupon as from the principal) have a shorter and shorter maturity.  For a 4% interest bond, the 7 year mark is about when there's equal value in the coupons and the principal.

So when you chart the sum of those two present values together, the resulting curve represents a decent first stab at the value of a corporate bond. This is the bond with a face value of 20 and a coupon of 1 (representing about 5%).



Again, taking more extreme points, when rates are 10% the PV of the corporate bond changes dramatically.



And in a very low rate environment (10 bps) you get:


This last chart is just telling you that if money doesn't lose its value then theoretical bonds with longer maturities are always going to be worth more, in an almost linear way.