I have been asked to look to refactor some code.
There is a line shown below:
$\text{implied covariance} = -\frac{(\text{var}_1 - \text{var}_2 - \text{var}_3)} {2}$,
where $\text{var}_1$ is the implied variance of AUDUSD, $\text{var}_2$ is the implied variance of USDCAD and $\text{var}_3$ is the implied variance AUDCAD
I understand that this is a calculation of covariance between AUDCAD.
However I don't understand the $\text{var}_1 - \text{var}_2 - \text{var}_3$ line. I thought the covariance between two variables was the variance of the two variables multiplied together divided by $n-1$.