Up until this point, we focused on how to price derivative securities, in particular fixed income derivative securities, in the context of the binomial model. However, we have not said anything yet, about how to calibrate these models. In particular, how should we choose the parameters of these models so that the model prices match the prices that we see in the marketplace. It is particularly important with derivative securities models that our model prices match market prices. That is the problem of model calibration and we're going to discuss that problem in this module. Up until now we focused on the pricing of derivative securities. We've taken our model and the parameters of the model as given. What we've done is we've priced everything our bonds, our options on bonds, forwards, futures and bonds, caplets, swaps, and swaptions. We've priced all of these securities using risk mutual pricing. Using risk mutual pricing, ensured that our models were overcharge free. However, a model is no good, unless at the very least, we can get the model prices to agree with the market prices of liquid securities that we see in the marketplace. Security such as caps and floors, caplets, floorlets, swaps and swaptions are all very liquidly traded. And we can see the prices of these securities in the marketplace. So what we want to do with our model is to pick the parameters of our model in such a way that the model prices of the securities match the market prices of these securities. This process is called calibration. What we want to do is calibrate our parameters so that the model prices agree with the market prices of liquid securities. So we're going to discuss that further in this module. The first thing to keep in mind is that they're actually very money-free parameters in our binomial model. We have rij's and qij's for all ij. So in fact, there's going to be some sort of approximation to cn squared parameters in our model where n is the number of periods in our binomial model. So what we typically do is we fix some of these parameters, and so that's in fact what we've been doing until now. We just fixed our qij to be equal to q, which is equal to half for all ij. So we actually assumed our risk neutral parameters or risk neutral probabilities were half at all notes. We've also assumed that the short rates, rij, were also given to us up until this point. We started off with r being 6%, we let it rise by a factor of 1.25, or fall by a factor of 0.9. Well, we can no longer do that. If we want our model prices to match market prices, we're going to actually have to have some free parameters that we can use to calibrate the market prices. And so that's what we're going to do here. One possible way to do this is to use a parametric form for the rij's. So for example, the Ho-Lee model assumes that rij is equal to ai plus bi times j. So if you recall i is time and j is state. So it assumes that there is a drift component parameter ai and then there is a volatility component bi. Why do I call this a volatility component? We remember j is the state that we're going to see a time i. j is a random variable. We don't know what statement will be in a time j, so we can interpret bi, the multiplier of the state j as being a volatility parameter. So in this case, we actually only get 2n parameters, ai and bi for i equals 0 up to n minus 1. You can actually check that the standard deviation of the one period rate is then bi over 2 if you're conditioning on where you are at time i minus 1. Now the Ho-Lee model that should be set is actually not a very realistic model at all. There is some real problems with the dynamics induced by this assumption here. However, it has been a very influential model in the term structure literature and some very interesting term structure models have grown out of some of the ideas that were present in the original paper by Ho-Lee. We're going to focus here instead on the Black-Derman-Toy model. The Black-Derman-Toy model assumes that the interest rate at node N(i,j) is given by rij equals ai times e to the b i j. So actually if I take logs across here I'll see that what we're assuming is that the log of rij is equal to the log of ai plus bi times j. So we can interpret log ai is being a drift parameter for the log of the short rate. I make it an interpret bi is being in volatility parameter for the log of the short rate. Remember, as I said it on the previous slide that the random variable here is the stage j. And that's why I can interpret bi which multiplies the random variable as been in volatility parameter. What we want to do is we need to calibrate the model to the observed term-structure in the marketplace and ideally other security prices. So certainly at the very least, any term structure model that you want to use should ensure that the zero-coupon bond prices are equivalently the term structure of interest rates matches the time structure of interest rates we see in the marketplace. So we're certainly going to want to calibrate our model to zero-coupon bond prices. Ideally, we would also want to calibrate to other liquid security prices like caplets, and swaps, and floors, swaptions, and so on. So this is done in general by choosing the ai's and the bi's to match market prices. For relatively few periods we can actually do this in Excel using the Solver Add-In and indeed we're going to do this in a few minutes, but also more efficient algorithms and software could be used in general. In fact, it would be very straightforward to do this and/or applies in MATLAB or C++. We'll also see how to calibrate the Black-Derman-Toy model to market zero-coupon bond prices using Excel, the Solver Add-In in Excel, and the forward equations. So to get us started let's assume that we have an n-period binomial lattice model as usual. We will let s1 up to sn be the term structure of interest rates observed in the marketplace. So these interest rates are given, they're fixed. We see them in the marketplace right now. We're going to assume spot rates are compounded per period. There's no loss of generality in doing this because we can always use any compounding convention that we like. For now, we're going to make the assumption that bi is equal to b and that this is known for all i. So this is actually quite a heroic assumption, we'll come back to this in a moment. We're doing this for several reasons, number one is we just want to calibrate our model to the time structure of interest rates. There are n interest rates, one for each period. There are n parameters ai. So if we fix the b's, and assume they're known, we then have n equations and n unknowns. We're going to need to solve for n ai's using n equations. And those n equations will be the equations that matched the term structure in the marketplace to the term structure in the model. So here's how we're going to do this or at least this is how we could do it if we wanted to using the forward equations. We're actually going to be a little bit lazy and let Excel do all the work for us or let Solver in Excel do all the work for us. But this is one way we could go about doing this. We know the following. Well, we know that 1 over 1 plus si to the i is equal to this sum here of elementary security prices. What is this sum on the right inside? Well if you think about it, i is fixed, so this is the time i, state j elementary security price summing over all states j at time i. Well we know that this is just a zero-coupon bond price at time zero, which matures at time i. And indeed, this indeed is equal to 1 over 1 + si to the power of i. Remember, the fair value of a zero-coupon bond that matures at time i, well that's equal to 1 over 1 + si to the power of i. So this is how we can express an equation for si, in terms of quantities in our model. These are going to be the elementary security prices. We're going to use the forward equations to actually compute and expression for each of these guys here. So how can we do that? Well, if you recall the forward equations that we saw in the previous module we can substitute n for each pij. When j equals zero we just get one term, when j equals i we get this term. So this term actually corresponds to pii. This term is equal to pi0. And then this term here is simply pij, when j is between 1 and i minus 1. So these are quantities this expression is coming from the forward equations that we saw on the previous module. Given this we could actually now solve iteratively if we wanted to for the ai's. For example, suppose we start off with i equal to 1. Well, in that case we're going to have the following equation. 1 over 1 plus s1 will be equal to p00 over 1 plus a0 times 2 plus p00 over twice 1 plus a0 e to the power of 0 times 2. And this, of course, is equal to p00 divided by 1 + a0. So in fact, we know that p00 = 1, we will know s1 from the marketplace and so this will give us a0. Given a0, this will then give us r00, which we can see from over here. If we know a0, remember, the b's are assumed to be known and fixed. So if we know a0, we're going to know r00. So we have r00, we can then use the forward equations to get p10 and p01. And now we can move on to i = 2. We can actually use this equation we can get 1 over 1 plus s2 to the power of 2 is equal to and we can sub in these terms. These terms will just have the p1s, p10 and p11 which we will know already. They will have an a1, which we don't know, but that's what we will solve for. And they will have s2 which we see in the marketplace. So we'll get some quantity here which will depend on a1, we will know everything else and we will there for be able to determine, a1. And we can continue on, on this iterative manner working forwards to determine all the ai's by comparing the si's, which we see in the marketplace, using this equation to compare them with what the model says si must be and figure out what the ai's are. So, in this spreadsheet, we're actually going to perform such a calibration. We have here a 14 period model, you can think of periods corresponding to years and months, whatever you like. We have the market terms structure of interest rates, so we have 7.3% for 1 year or 1 period, 7.6% for 2 years, 8.1% for 3 years or 3 periods and so on. The important thing here is that we see the term structure of interest rates in the marketplace and it's given to us here in these highlighted cells. We need to assume some starting values for the a values. So we'll just put in the value of 5 for all of these values. The calibration's going to actually determine what the correct values of a should be so that the model prices of zero-coupon bonds or the term structure matches the market term structure. Right now for example, we can see here is the market spot rates, 7.3% up to 12.32%. Down here, we have our short rate lattice, this short rate lattice is the Black–Derman-Toy lattice. You can actually see that we're constructing this lattice using the b and a parameters from Black-Derman-Toy. Very important to note over here, we've actually fixed the volatility parameter b, we've assumed that b is a constant for all periods i, and we've set it equal to 0.005. We will certainly be returning to this issue in awhile. Now we've got the risk neutral probabilities which we've assumed to be q and 1 minus q and that they're both equal to a half. We compute the elementary prices down here using the forward equations, so we actually copy in our formula in this cell. And then we can drag the formula in this cell throughout the lattice to complete the elementary prices at all other nodes. So we have our short rate lattice, we have our elementary prices. Note that these elementary prices are a function of b and these a's, which at the moment are all set equal to 5. Below that, we can actually sum the elementary prices for each period, to get zero-coupon bond prices. So for example, if I sum these three guys here, I'm going to get 0.907. If I sum all of these, I'm going to get 0.709. So we're just using what we've seen in an earlier module. That is how we can use the elementary security prices to compute the zero-coupon bond prices. Once I have the zero-coupon bond prices in the model I can invert them in the usual way to get the spot rates in my models. So I'm seeing here that the spot rates are 5%, 5.01%, 5.06% and so on. So a very flat term structure where all the interest rates are approximately 5%, and this is following because I've actually assumed that the a's are all 5, and that's to begin with. So what I want to do is, is to do a simple calibration. What I want is, I want to choose the ai's, so that these spot rates down here, that I've highlighted in row 48, I want to choose them so that they match the market spot rates in row 4. Right now they certainly don't. So how am I going to force them to match that? Well I'm just going to use Solver. I'm going to compute the square differences between those cells, so this number here for example will be the difference between 5.04 which is the model spot rate and the market spot rate, which is up in cell I4. I'm going to square it and I get this number here. I'm going to do that for all the periods from i = 1 out to 14, and then down here I summed them. So here is sum of the squared differences, and I want this to be equal to 0. So this is what I'm going to do with Solver. I'm going to try and choose the ai's up there in row 5. I'm going to tell Solver to choose the a's in row 5 so as to minimize this sum here. I want this to as close to zero as possible. So we can do that in Solver. So let's do that. So we have Solver and installed Solver in Excel add-in. We've set the objective to be cell D51. And I want to minimize D51 by changing the variable cells C5 to P5. These are the cells that contain the A's, A0 up to A13. So let's run it. For some reason we're using a Mac here. Solver seems to be quite slow using a Mac. We can see the solution we're getting. I'm getting an objective function of 0.001. Now this looks pretty small. It looks pretty good, but actually I expect it to be even smaller, so I'm going to actually run Solver again and try to get a better solution. When I do this on Excel for Windows I don't need to run it again. I seem to get a very good solution when I run it in Windows. So as you can see I'm actually getting it much smaller now. I'm getting a number by 8.7 by 10 to the minus 11. And so if you noticed, the values of A have now changed. I no longer have 5 in all these cells, by running Solver to minimize the square differences between the market spot rates and the model spot rates, I have succeeded in matching the market spot rates to the model spot rates. So 7.3% let's pick a value. So 9.64% is the market spot rate. My model spot rate is 9.64% for the same period. So now the term structure of interest rates in my model matches the term structure of interest rates in the market. You might also ask the question at this point well we've just calibrated our model to the term structure of interest rates in the marketplace. Is that enough? Should we not also be calibrating to other security prices? And the answer to that is absolutely, yes, and we return to that issue in the next module.