So hedging using futures, long hedge. Suppose today is September 1st, and a baker needs 500 bushels of wheat on December 1st. So the baker faces the risk of an uncertain price on December 1st. This baker can use a futures contract to fix the price that it could be exposed to on a December 1st. Here's the hedging strategy. You buy 100 futures contracts maturing on December 1st, each for 5,000 bushels. So you now have taken on futures contracts that are for 500,000 bushels. What happens with the cash flow on December 1st? The futures position at maturity is going to be F capital T, whatever is the futures price at time capital T minus F zero whatever is the current price for the futures contract. I know that at time capital T, F of T is equal to S of T. Therefore, the futures position at maturity is going to be S capital T minus F zero. If you were to buy the bushels of wheat in the spot market, you have to pay S capital T. So the effective cash flow that you get, that is, you buy in the spot market and you take the profits that you get from the futures position, the effective cash flow that the baker gets is ST which is the payment. This piece of the payment is coming from the futures position and this is the payment that the baker has to make at the spot market. So S of T cancels and effectively the price of the baker is fixed at F zero. The price is fixed at F zero. Did this cost anything? If you look at the initial position and the final position, it would appear as if nothing happened. You could get into the futures contract without putting any money upfront, you end up getting the difference between the spot price and the future time minus the current price as the profit from the futures position. If you combine that by the cost in the spot market, it appears that by not putting up any money, you were able to fix the price of wheat to be F zero which is the current futures price. But in reality in order for all of this to workout, you have to put money into a margin account, and you have to keep adding money to the margin account in case there are margin calls. If at any point during the time from zero to capital T from September 1st to December 1st, there is a margin call and you're not able to provide the money necessary to keep your position going, the broker is going to cancel your position and all the benefits that you were thinking about getting from the future position are no longer available. So even though it's not transparent, one has to keep in mind that there are costs associated with making sure that there's enough cash there to put up the margin calls when necessary. In the previous example, we had a perfect hedge. We assume that the futures contract matures right at the time that we want the money. But perfect hedges are not always possible. The date capital T, at which we have a cash flow, may not be a futures expiration date. The cash flows associated with whatever the quantity that we are trying to hedge may not correspond to an integer number of futures contracts. It was very lucky that we were buying 500,000 bushels of wheat because the futures contracts were written on 5,000 bushels of wheat. A futures contract on the underlying may not be available. If I want to hedge kidney beans, I don't have a futures contract on it. The futures contract might not be liquid. I may not be able to get enough quantity of the futures contract that I need. The payoff, P of T, may be non-linear in the underlying. Then the futures contract, which only gives me a linear payoff, will not be sufficient to hedge. The difference between the spot price for the underlying and the futures price is called the basis. Futures price, here, refers to whatever futures contracts that we're buying in order to hedge the underlying asset whose stock price is stochastic or random. When there is a perfect hedge, then the basis is equal to zero. When there is no perfect hedge, because one of the reasons listed above, the basis is not equal to zero at time T. The spot price of the underlying is not equal to the futures price of the contract that we're using to hedge the underlying. This is what is called basis risk. A basis risk arises because the futures contract is on a related but different asset, or expires at a different time. Here's an example. Today is September 1st, and a taco company needs 500,000 bushels of kidney beans on December 1st. The story is the same except now instead of wheat, this particular company needs to hedge the price of kidney beans. Taco company faces the risk of an uncertain price of kidney beans. The problem is that there are no kidney beans futures available. So we have to hedge this particular uncertainty using a futures contract written on some other underlying, and therefore have to take on basis risk. So I'm going to buy soybean futures to hedge kidney beans. The reason I'm going to do this is because I think that the price of kidney beans is correlated with soybeans. As a result, because soybean futures price is going to be correlated with soybean spot price, perhaps I can use soybeans to hedge kidney beans. I'm going to buy an amount y of the soybean futures. Each of these futures contracts are for 5,000 bushels of soybeans. So what are going to be my cash flows? The cash flow associated with the futures position at maturity is going to be F of capital T minus F zero times y. Then I'm going to buy kidney beans in the spot market. So it's going to be some cash that I have to pay for that which is P capital T. So the effective cash flow is going to be y of FT minus F zero plus PT, which is the cash flow associated with buying kidney beans in the spot market. PT is not equal to y times FT for any y, and therefore a perfect hedge is impossible. Now, what happens? What can we do? So instead of trying to get a perfect hedge where the effective cash flow is exactly equal to zero, I'm going to try to minimize the variance of the cash flow. Variance of CT can be written as variance of PT plus the variance of y times FT minus F zero plus two times a correlation between y F T minus F zero and PT. Now F zero is a constant because at time T equal to zero this is known. So this expression can be written as the variance of PT which is the same term as before. Now, I'm ignoring the constant, so I write this as variance of y times FT. I take the y outside, and whenever I pull a constant out of the variance, I get the square of that constant. So it becomes y squared times the variance of FT. I can ignore the constant here when I'm calculating the covariance. I'm going to take the y outside, but when I take y outside of the covariance just the y comes out. So it's going to be two times y plus the covariance of FT and PT. I'm going to take the derivative of this expression with respect to y. So y is unknown. I don't know how many of these contracts I want to buy. So when taking the derivative with respect to y, you end up getting the expression to be two times y variance of FT plus two times covariance of FT and PT must be equal to zero. This is this is the amount of y that is going to give me the minimum variance hedge. Therefore, the optimal number of futures contract is simply given by the solution of that equation, which is minus the covariance of FT, PT divided by the variance of FT. This tells me exactly how many contracts am I going to buy in order to hedge the kidney beans.