Weird conclusion about variance/covariance from differentiating This is probably an easy question but i'm confused, it's presented in a finance textbook (often proofs aren't really rigorous in such), but for me it makes absolutely no sense.
Edit: (To those guys who understand finance).
The claim is exactly that $X$ is the return of the minimum-variance portfolio of $Y$ the return on some other efficient portfolio. The assignment states: There is a formula of the form $Cov(X,Y)=A\cdot Var(X)$ [Hint: Consider the portfolios $(1-a)X+aY$, and consider small variations of the variance of such portfolios near $a=0$.]
I promise I'm not keeping any information from you, I just tried to take all the finance out, since I expected it to creep you guys out.
I got two stochastic variables $X$ and $Y$ with all relevant moments. I want to look at the variance of a convex combination of them to conclude something about their covariance, here's how:
$$Var(aX+(1-a)Y)=a^2Var(X)+(1-a)^2Var(Y)+2\cdot a\cdot (1-a)Cov(X,Y)$$
I can then evaluate:$$\frac{\partial}{\partial a}Var(aX+(1-a)Y)=2aVar(X)-2(1-a)Var(Y)+2Cov(X,Y)-4aCov(X,Y)$$
If I evaluate this at $a=1$  and set equal to zero I get:
$$2Var(X)-2Cov(X,Y)=0\implies Var(X)=Cov(X,Y)$$
I pretty much don't get the conclusion, I got the feeling that I would always be able to do this trick.
So after this proof what would be fair to conclude and what not?
Hope someone is willing to help.
 A: First, just use your derivative calculation to solve for the optimal value of $a$, ignoring the other criteria for the moment. Then you get:
$$ a = \frac{\text{Var}(Y) - \text{COV}(X,Y)}{\text{Var}(X) + \text{Var}(Y) - 2\text{COV}(X,Y)}.$$
Now, further suppose that $a$ must be identified such that $\text{COV}(X,Y)=a\text{Var}(X)$. Then we can substitute this into the above equation to get a quadratic in the variable $a$.
$$ a = \frac{\text{Var}(Y) - a\text{Var}(X)}{\text{Var}(Y) - a\text{Var}(X) + (1-a)\text{Var}(X)} ...$$
$$ \Rightarrow -2\text{Var}(X)a^{2} + [\text{Var}(Y)+2\text{Var}(X)]a - \text{Var}(Y) = 0. $$
By inspection we can see that $a=1$ is a solution. If you chase out the algebra, you can see that the other solution for $a$ is not permitted due to the constraint assumptions. You'll get an expression like
$$ a = \frac{\text{Var}(Y)}{2\text{Var(X)}},$$
for which, when you plug in the assumed relationship, only $a=0$ will work. But $a=0$ contradicts the fact that the weight is chosen to optimize the portfolio variance, unless we know that $\text{Var}(Y) = 0$, which is usually something assumed false from the outset of all these types of problems.
A: [Edit: This answer refers to a previous version of the question.]
The error seems to be the following: you assume that $$\frac{\partial}{\partial a}Var(aX+(1-a)Y)$$ evaluated at $a=1$ must vanish. Why would that be the case?
Under general conditions, the equality $Var(X)=Cov(X,Y)$ cannot hold. We have $Cov(X,Y)=0$ whenever $X$ and $Y$ are independent, for instance.
