So let's do our final example of a linear contract which is swaps. So we talked already about swaps. Now, let's see how to price them. Okay, so it's going to be a series, basically a follow contracts and he's a bit of notation. So I'm going to only look at the classical interest rate swap. So there will be the payoff of one party. The one party will be receiving the floating rate, the random rates, which I will call L for LIBOR rates and the other party. And we will be paying the fixed rate. Okay, so party who is long the swap will be receiving the random floating rate L and we'll be paying the fixed rate called capital R. And this is going to happen in in time at times Ti. So there's going to be a sequence of times Ti, which are known in advance. Finally many of those. And then the payoff is the Ci. It's normalized by the by the length of the periods. And I'm going to assume that each period Ti -1 to Ti has the same length delta T. So delta T is just the Ti minus Ti-1. There is a LIBOR rate during that period. L of TI -1, TI. It's random, but it's known at the beginning of the Period Ti -1,Ti. And then at the end of the period you get the long party, gets this payoff gets the random rate that pays the fixed rate R, okay. It's just an exchange of the random rate for the fixed rate. So [COUGH] This is this is what we want to price. Well we want to price every Ci and then we're just going to add the price of all Ci is to get the price for the total swap. Now the LIBOR rate, by definition is this in terms of bonds I think of peace. So the notation here is P (Ti -1, Ti). Is the price of zero coupon default free bond. It's time Ti -1 and the bond matures and Ti. And the bond pays $1. Okay. I'm going to assume here for simplicity that the bond pays $1. So the assumption is that P (Ti,Ti) = 1. Which means that the bond pays $1 at the end. Okay. It's a zero coupon bond. They feel free to make things easier. And why is the definition like this? Well if you just multiply and rearrange this. This just means that if I moved in saran it will mean that one plus L. Let me not write a complete notation. Sorry, one plus L times P of Ti-1, Ti and times delta T is equal to, sorry. So this is not going to be like that delta T. Is going to be here, right, delta T is equal to one. So this just means that the, [COUGH] If you if you start with this much money and then you increase by the rates simple rate of L during the period Delta T, you will have $1 at the end. Okay. So that's why the definition is like that. Just in terms of a simple rate during one in draw, I'm going to delete all this. All right. If I use this definition in the, if I use this definition back in the Ci. Then you can compute it's a simple algebra to compute that Ci is of this form. It's one over the bond price minus one plus. So I actually have to price this. I have to price these two terms separately. And that will give me the price of the one leg of a swap. All right. So, let's do the easier part first. Which is one plus delta T. That's just a constant. So this is going to be paid at time Ti. Right. And we are computing the value. Let's say you're computing the value at times small t, which is less than the first payment of the swap, which Is at Time T0. So that's the assumption the first payment is a T0. And I'm computing the price before the swap started paying payments at small t. And the. Okay. And this amount is paid at time Ti. So what is the price? Well, the claim here is that the price is simply that amount one plus R delta T. Times the price of the corresponding bond. Bond that matures Ti pays $1 and its price. The time T answer why, why is this. Well, because bond by definition is zero coupon, bond is by definition if it's paying $1 P at small t is the price of $1. A small T. Yeah. Now this is one plus R delta $T. So the price of $1 is P (Ti Ti). By the definition of the zero coupon bond paying $1. Then the price of one plus R delta $T is just one plus R delta T times the price of $1. Okay so that's easy. It's easy to press one plus R delta T. That's the constant part of this of this formula for the payment of one leg of a swap, or one swap payments. So let's look now how to price, how to price the other term? This one over the bond price. Okay. Just all right to get the, okay, so let's move to the next slide. So here is a claim. We claim that the value at times healers and T0, you're still sitting at some initial time before the swap payments started. And we're looking at this pay of 1/P( Ti-1, Ti). But that's the payoff. We know this pair of the T -1, but it's paid at time Ti. It's pay the time Ti. And I claim that the price is equal to exactly to P( ti, Ti-1) to the bond price at time T of a bond which matures matures the Ti -1. So how does one prove that? Well, we could do the replication arguments by just assuming that we invest this much. Let's say we invest P(ti, Ti-1) at time T. Right? By buying a corresponding bond, which matures the ti- 1, right, which means that we are going to get $1 at time Ti -1. There is 9 months left to maturity, at the last payment date or resetting date of swab the six-month LIBOR was 6%. And the continuous 3 months and 9 month rates are now 5% and 7%., Let's assume that this swap is written on the nominal principle of 10,000. This is just to know [COUGH] how much the payments will be. All right. So if you want to use the notation from the previous two slides, T0 already happens. T0 was three months in the past. T1 is going to be the next payment which is six months from the beginning, which is three months from now, okay? So T1 is going to be three months from now, and then finally T2 which is also the final payment is nine months from now. And therefore T, we are measuring things in years. So in years It's going to be one-half 0.5 okay? So I cannot actually directly use my formula from before because my formula was for the price of the swap looking from the point in time, which is before this 0, okay? T0 has not yet happened, then I computed the price of the swap. But Here I am sitting at the time after T0. So I'm just going to repeat for exercise the same type of logic and price the swap term by term. I cannot quite use the formula from before again because I'm at a different time, the swap has already started. So there's going to be two payments, right? There is going to be payment C1 three months from now. We already know how these payments look like, they have this four. And this is on one unit of a national principal then at the end I'm just going to multiply everything by 10,000. I want to see how this investor will do in a swap like this. Okay. So there's going to be that payment three months from now, and there's going to be a similar payment nine months from now except that it's going to be P of T1 T2 here instead of P of T0 T1. But this term is the same. So I can pay this by the same that I applied previously for my general formula. I can price these terms. So let me first price C1, okay? So this is P of T0 T1, is known at the time that I'm sitting at because T0 has already happened. So this is the price of the bond at T0 but T0 is in the past. So I know this, so I know both this and this. So it's a constant term that I have to price which will be paid three months from now. So I know how to price it. The $1 costs if it's paid in three months, $1 is going to be the price of the three month bonds. And this many dollars, one over P T0 T1 minus 1 plus it's going to be that times the price of the three month bonds, okay? But I'm assuming that I know in terms of continuously compounded rate what the rate of the three month bond is and it was assumed to be 5%, right? Yes, the three month rate was assumed to be 5%. And so I just multiply the bond prices minus the rate times the time in years. Three months is a quarter of years of points 25. All right. So that was pricing that payment which is known at the time we are looking at, so I just multiply by the price of the three month bonds. [COUGH] Actually I said it's known, but we have to compute it. I didn't give it to you in the in the information on the previous slide. So we actually have to compute it. How we can compute it, well, we have this definition of the LIBOR rate which can be written like this, that the price of the bond times the LIBOR times delta T, should be 1, okay? Since I know that delta T and I know the LIBOR rate it was given in the problem as 6%, then I can get the P is 1 over 1.03. And I can plug it in here and I can compute C1 and I get the negative number -0.0198, okay? All right. So that was pricing the payment which would be paid three months from now in the swap. And finally I have to price the payment which will be paid nine months from now. And so, that payment, remember I already priced something like that, right? Let me look at the payment again just before we argue here. So this one is this, I'm going to just multiply by the price of the nine month bonds. The constant term but 1 over P2. I have to do that logic that it's the price. You know this is going to be paid at T1 sorry, at T2, but it's not in T1. So by the logic of the previous lights if you remember, the price is just P of T,T1, okay? So you just go back a couple of slides and that's P of t,T1. This one is the same as before, it just multiply 1 plus R delta T. Okay, but now you multiply it by nine months, sorry and it's not quite the same and now multiplied by the nine month bond rather than by the three month bonds, okay? So [COUGH] okay P of t,T1, that's the three months, T1 is 3 months. So I already know the price e to the -0.05 times 0.25, and that's just the three month bonds. And then here I have to multiply by the nine month bonds. [COUGH] R is known to be 10%, Delta T is every half year. So it's 0.5 a half and then T of T T2, T2 is nine months. And so the nine months is 0.75. And let's go back. So, and the nine month rate is okay is 7%. So I think I have a typo in the next slide. So let's deal with it. So there should be [INAUDIBLE], so this should be 0.7 here. Not 5. Okay, and then you get the number. I'm not sure whether now this is correct or not but you can check that yourself. And then if we go here, if you add up those two values, you get a number which is negative. [COUGH] That's [COUGH]. And then actually I think this was for the long position and our investor is sure to swap. So his value is 10,000 and there was the nominal value. So you multiply that 10,000 by whatever number you get here with the minus sign and [COUGH] that's the total swap value at the time three months after T0, okay? At the time we were looking at. Okay, so this example as you could have noticed that there was a couple of typos in the last two slides, I'm just going to leave that to you to figure out exactly whether everything is corrected.