well we want to talk about next is hedging more in detail. We talked about it already but will be more precise here. And we're going to start with kind of traditional hedging, going way back 50 years ago or more before option pricing theory. Before dynamic continuous time or multi period models. In particular, the first thing we're going to talk about is static hedging, meaning there is some payoff that you want to hedge in the future. But the way you do it, you just take some positions at time 0 and once static. And then you don't do anything until maturity, okay? And futures are particularly convenient for that because futures markets are liquid. The biggest spreads are narrow so people use futures a lot for hedging. This is going to be mathematically easier than there is not going to be any brand in motion because we are doing a static model. All right now, there is a perfect situation in which you simply can buy or sell the futures contract that is exactly on the payoff that you have to deliver or you will receive at maturity. For example, you need to have €5000.03 months from now. And you can buy exactly the futures contract on euros and on three months from now, okay? Then you will have a perfect catch exactly the asset you want to hedge and exactly the maturity you need. If that one of these is not the case, maybe it's an asset on which there is no futures contract or maybe you cannot find the maturity that you need. Then we talk about us at mismatch or maturity mismatch. And the way you hedge it's called cross hedging. Is just a fancy name for hedging with some other futures contract, which is not exactly the one that you need. And let's do that case. The perfect case is easy. You just by yourself than futures contract that you need. The other cases more interesting. And here is some notation. For example, you need to either deliver or you will receive a payoff as one of capital T. Think of it as some assets, whether it's a stock or something else. Maybe exchange rates, we will have an example like that. And you hedge it potentially with the futures contract on some other assets too. So that's why I call the futures here contract F2 and maybe the maturity is not the same. Maybe the maturity of the futures contract is U, which is larger equal than the maturity at which you will receive or pay this. And the difference. So you're going to what we want to find is the optimal number of futures contract to go either long or short depending on whether you have to receive or pay the asset. S1 of T. So delta is going to be the name for the notation for the number of futures contracts. And you look at the difference, call it X. That's called usually basis in futures terminology. So X is the difference between what you want to hedge and the futures contract with which you are doing the hedging. And the way we are going to do the optimization. We are going to measure the error in terms of the variance. We want to minimize the variance of X. We want to minimize the various aspects in that way, that's kind of measuring the distance in terms of randomness of random variables. How much your futures contracts are far away from your targets, which is just one of casualty and mathematically extractable way. It also makes intuitive sense to minimize the variance kind of minimizing square they're expected square there. Let's compute variance. So what I have here is simply a general formula for the variance of a difference of two random variables. I just did not hear that It's from the point of view of time T. So the variance is going to be the some of the variances. Variance of S1, delta goes with a square. So delta squared variance of F2 because of the minus sign, I have a minus twice the co variance. Now delta goes just out of the covariance and then the covariance S1 and F2. All right, that's just the usual formula from your probability theory on the variance of a difference of two random variables. Just to remind you the formula for the covariance of two random variables. So called, let me just do it up here. So co variance of X and Y. By definition is expectation of X x y- expectation of X times expectation of Y, okay? So it's expected value of the product mine is the product of expectations, okay? And now we want to minimize this with respect to delta. That's easy calculus. Now it's a quadratic function in delta, I take derivative and put it =0. Set it equal to 0 derivative. This doesn't depend on delta. So this year will become to delta variance of F2-2. Delta will disappear when you take the derivative co variance, okay? So it's going to be delta is going to be covering over the variance. It's co variance of F1 and F2 with the variance of F2. That's the formula for our optimal number of futures contracts to hold when hedging one of capital T. Here, I have a more succinct notation. Just again to remind you in terms of the correlation role. So just to remind you what correlation is. So raw of X and Y. He had just used raw without without mentioning the random variables. So raw X and Y by definition is co variance of X and Y over the product of standard deviations. Which I will write sigma X, sigma Y, okay? Yeah, so square roots of variances, standard deviations. So if you from here coherence is equal to roll time, sigma X sigma Y. So if I do that here it's going to be road times sigma S which is S1 just I'm just writing us times sigma. F2 but I'm just trying to over variance. I'll have to sew over sigma F squared. Okay, if you write it in terms of correlation and use this relationship between correlation corollary is this is what you get now. Sigma F will cancel one sigma here and that's that's why I get this. Rousing masks over sigma, all right. Just a different way to to write the optimal number of futures contracts to enter. By the way, if you are familiar with regressions and statistics, this is really nothing else. But the regression coefficient in linear regression when you regress one random variable on another. Because in regression you're also minimizing the square there and you get the same formula for the regression coefficient, okay? Let's compute what the optimal variance is, the minimum variance is. How do we do that? We were going to substitute this formula for delta here instead of the L task here, puts this expression for the delta and also here. And then it's easy algebra to compute it and I have the formula and the next slide and what we get. Let's look at it. You get this, you get the optimal or the minimum variance is the variance of S1 minus covariance squared over variance of 2. Just to give a little bit of intuition that this formula makes sense. Let's look at the extreme case of the perfect hedge. In other words, let's assume that we can exactly hedge with the futures contract on S1. So let's assume S1 is S2 where S2 is the is the asset on which the futures contract is written. And Let's assume that the maturity is also the right one that capital U is in fact capital T. Then let's see what I have then. And if I go back to the formula for optimal delta. I have covered in the West one and this would be F1 at U. Actually that was on the next slide, right? S1 we know from before is able to F1 of the at maturity the futures price and the spot price become one and the same, right? Otherwise there would be arbitrated. The futures price of a futures contract that immediately matures is simply the spot price. And because the maturity U is equal to T and 1 is equal to 2. S1 is equal to S2. This is just F2 of the U. So F2 of T,U in my formula in the previous slide is going to be just S1 of T. So if I use that and go back I have covariance of S1 and S1 over the variance S1 again, okay? And what is that? What is the covariance of S1 and S1 in general? What is the co variance of X and X. While intuitively it should be the various but you can also check that from the definition right? It's U of X x X which is X squared- E of X x E of X which is EX squared. And that's by definition two variants selects, right? So the covariance of X with X is the variance. So that means that in that case if I have perfect hedge, then the numerator there is covariance of S1 and S1. And therefore it's equal to variance of S1 squared. So sorry not square, it's just a variants of this one over wearing the best one again. So it's just one delta is just one which makes complete sense. If you can hedge exactly with the futures contract on that asset with the same maturity, you should just for each unit of the asset you should buy or sell one unit of the futures contract. So delta is 1. Just to check that in this extreme case the formula makes sense. In general we see that you get so that's delta, delta is 1. How about the minimum variance? Well, the minimum variance is going to be so the covariance of S1 and S1. That's variance squared, I have a square here. It's going to be variance squared over variance. It's just the variance and I have various minus variance. The minimum variance is going to be 0. There is no error. There is no risk involved. If I can buy exactly the futures contract with exact maturity and exact asset that I needed. The minimum variance is just going to be 0. Variance squared, our variance Variance =0, okay? That's the extreme case in general. What we see you reduce the risk of holding S1 right? This would be this would be the risk that you are exposed to. If you don't hedge just the various of S1 of the this is the risk. If you don't hedge now, if you have you subtract something. And that's something that's going to be higher, which means lower risk because I'm subtracting it. It's going to be higher the higher the correlation or the co variances between the original asset and the asset with which you're hedging. Which makes again intuitively sense more correlation you have the better less risk you have. In terms of hedging better you can approximate your random pay off with the futures contract. All right, this is a the general formulas do an example.