Finance as a field of study is sometimes somewhat flippantly said to deal with the value of two things: time and risk. While this is not the whole story, there is a deal of truth in it. These are the two issues which is always present. We start our discussion by ignoring risk and only considering the implications of the fact that anybody prefers to get something earlier rather than later, or the value of time.
To find the present value of these future cash flows one need a set of prices of future
cash flows. Suppose is
the price one would pay today for the right to recive one dollar at a future date .
If one knows this set of prices one would calculate the present value as the sum of the preent values of
the different elements.
However, knowing the set of prices of all future dates is not always feasible. As a first approximation we assume that there is one interest rate which is used for discounting, (this is termed a flat term structure), and the prices of future payments , which is also called a discount factor, is calculated from this interest rate.
The best known example, known as discrete compounding, is calculated as
However, such discrete compounding is not the only alternative way to approximate the discount
factor. The discretely compounded case assumes that interest is added at discrete points in time (hence
the name). However, an alternative assumption is to assume that interest is added continously.
If compounding is continous, and is the interes rate, one would calculate the current price of
reciving one dollar at a future date as
The internal rate of return of a set of cash flows is the interest rate that makes the present value of
the cash flows equal to zero. Finding an internal rate of return is thus to find a root of of the
If we know that there is one IRR, the following method is probably simplest, bisection. It is an adaption of the bracketing approach discussed in Press et al. (1992), chapter 9. Note that this approach will only find one interest rate, if there is more than one irr, the simplest is always to graph the PV as a function of interest rates, and use that to understand when an investment is a good one.
If you worry about finding more than one IRR, the code shown in code 2.4 implements a simple check for that. It is only a neccesary condition for a unique IRR, not sufficient, so you may still have a well-defined IRR even if this returns false.
The first test is just to count the number of sign changes in the cash flow. From Descartes rule we know that the number of real roots is one if there is only one sign change. If there is more than one change in the sign of cash flows, we can go further and check the aggregated cash flows for sign changes (See Norstrom (1972), or Berck and Sydsæter (1995)).
In this part we look at the treatment of bonds and similar fixed income securities. What distinguishes bonds is that the future payments (of coupon, principal) are decided when the security is issued. We again limit ourselves to the case of a flat term structure, and return to bond pricing with more general term structures later.
Let us look at two versions of the bond price algorithm for the continous case.
There are two version of the routine listed, one which is called with both interest and principal vectors (code 2.5) and another (code 2.6) which is simply called with the cashflows. I show both to make one think about the fact that for most purposes the distinction between coupons and principals is not necessary to make, what counts is the cashflows, which is the sum of coupons and principal. There are cases where the distinction is important, for example when taxes are involved. Then we need to keep track of what is interest and what is principal. But in the simple cases considered here I stick to the case of one set of cashflows, it makes the routines easier to follow.
Let us also look at the case of discrete (annual) compounding, shown in code 2.7.
The yield to maturity is the interest rate that makes the present value of the future coupon payments
equal to the current bondprice, that is, for a known price , the yield is the solution to the
Alternatively one can calculate the yield to maturity for the bond, and use that in estimating the
bond price. This is called Macaulay Duration
First one calculates , the yield to maturity, from
Convexity measures the curvature of the approximation done when using duration.
It is calculated as