# Variance reduction techniques - control variates technique

In control variate technique we have to calculate $$b=\frac{\text{cov}\{{X,Y}\}}{\text{var}\{{X}\}}$$ where $$X$$ is a payoff from standard call option and $$Y$$ is a payoff from for example barrier option. Why we have to estimate $$b$$ before we use this method and we cant use payoffs which we use during pricing? Or maybe I can first calculate the payoffs for these options, then based on them, calculate the option price, and finally calculate $$b$$ using the same payoffs and change the price of the barrier option accordingly?

EDIT: My current problem: I try to calculate value of Up and out call option using MC simulation. I use three methods: 1) standard Monte Carlo, 2) anthitetic variates MC, 3) control variates MC using standard call option. The correct price in BS model is $$1.3341$$. My three methods (with the same parameters and number of simulations equal $$100000$$) gives me these results:

1. MC: $$1.3621$$

2. Antithetic MC: $$1.3763$$

3. Control variates MC: $$1.3703$$

Suppose you want to price a derivative $$X$$ (e.g. a barrier option). You simulate $$M$$ sample paths and compute $$M$$ potential discounted payoffs, $$f_X$$. The standard Monte Carlo estimate for the price of $$X$$ is simply the (arithmetic) average, $$\text{Price}=\bar{f_X}=\frac{1}{M}\sum_{i=1}^Mf_X(i).$$
The idea of control variates is that you use your $$M$$ paths to price another derivative, $$Y$$, which is (very) similar to $$X$$. For example, if you price a barrier option, then you can use a vanilla option as control variate. Importantly, for this control variate (the derivative $$Y$$), you need to know a closed-form solution, call it $$f_Y^*$$.
Now, you have got $$M$$ sample payoffs for $$X$$ (denoted by $$f_X$$) and $$M$$ sample payoffs for $$Y$$ (denoted by $$f_Y$$) as well as the closed-form solution for $$Y$$ (denoted by $$f_Y^*$$). Based on your sample payoffs, let's calculate $$\hat\beta = \frac{\mathbb{C}\text{ov}(f_X,f_Y)}{\mathbb{V}\text{ar}[f_Y]}.$$ This looks like a regression coefficient (market beta) or a minimum variance hedge. The new control variate estimate for the price of your derivative is then $$\text{Price}=\bar{f_X}+\hat\beta(f_Y^*-\bar{f_Y}).$$ The term $$f_Y^*-\bar{f_Y}$$ is the bias of your random numbers. Scaling the bias correction by $$\hat\beta$$ ensures that the new variance is at smaller (or equal to) the sample variance of $$f_X$$. The idea is that $$\hat\beta$$ emerges as optimal (i.e. variance minimising) solution of the problem $$\min_\beta\; \mathbb{V}\text{ar}[f_X+\beta(f_Y^*-f_Y)]=\mathbb{V}\text{ar}[f_X]+\beta^2\mathbb{V}\text{ar}[f_Y]-2\beta\mathbb{C}\text{ov}(f_X,f_Y).$$
Clearly, the more $$f_X$$ and $$f_Y$$ correlate, the better the method. Imagine you price a down-and-out put option. This payoff actually correlates negatively with a vanilla put payoff. Not including $$\hat\beta$$ could make your price estimate worse!
Check out Boyle, Broadie and Glasserman (1997) for more details. For example, you can use several instruments simultaneously as control variates and the optimal $$\hat\beta$$ coefficients will, of course, look similar to those from a multi linear regression.