I am somewhat confused when it comes to modern portfolio theory, mean-variance portfolio optimization and its quadratic programming formulation.
Issue 1: Formulation of mean-variance portfolio optimization
I learned that the mean-variance portfolio is given by the problem:
Minimize with respect to $\mathbf{x}$: $\mathbf{x}^T \mathbf{\Sigma}\mathbf{x}$
Subject to the constraints: $\mathbf{\mu}^T\mathbf{x} \geq r, \mathbf{1}^T\mathbf{x}=1 $
where $\mathbf{x}$ is the portfolio and $r$ is the target return
However, on Wikipedia I find that modern portfolio theory involves the following optimization problem:
Minimize with respect to $\mathbf{x}$: $\mathbf{x}^T \mathbf{\Sigma}\mathbf{x} - q\times\mathbf{\mu}^T\mathbf{x}$
Subject to the constraint: $\mathbf{1}^T\mathbf{x}=1 $
How are these two formulations identical?
Issue 2: Form of quadratic programming problem
In most references (among other on Wikipedia) the quadratic programming problem is given by:
Minimize with respect to $\mathbf{x}$: $\frac{1}{2} \mathbf{x}^T Q\mathbf{x} + \mathbf{c}^T \mathbf{x}$
Subject to the constraints: $ A\mathbf{x} \leq \mathbf b, $ $ E\mathbf{x} = \mathbf d $
However, the R function quadprog::solve.QP solves the following problem:
Minimize with respect to $\mathbf{x}$: $\frac{1}{2} \mathbf{x}^T Q\mathbf{x} - \mathbf{g}^T \mathbf{x}$
Subject to the constraints: $ K\mathbf{x} \geq \mathbf m $
Note:
- the sign of c is opposite
- the inequality constraint is opposite
- the equality constraint is missing
How are these two identical? I can accept the sign change for $\mathbf c$ as cosmetic but the rest...