So i'm revising for my exam and i'm struggling with this particular KKT question.
Here is a link to the question, I'd do it as a picture but I don't have enough reputation to do it.
- Consider the following portfolio management problem for a large company. There is a market containing one riskless and $n$ risky assets, whose returns are given by $\left(R_{0}, \vec{R}\right),$ where $R_{0}>0$ is the (deterministic) return on the riskless asset and $\vec{R}=\left(R_{1}, \ldots, R_{n}\right)^{\mathrm{T}}$ are the returns on the risky assets. Let $\sigma_{i j}=\operatorname{Cov}\left(R_{i}, R_{j}\right),$ for $i, j=1 \ldots, n,$ and define the covariance matrix of the returns on risky assets by $\Sigma=\left(\sigma_{i j}\right)_{i, j=1, \ldots, n} .$ Assume that $\Sigma$ is invertible.
Let $X$ be some given random variable, representing an asset held by the company, and let $c_{i}=$ $\operatorname{Cov}\left(R_{i}, X\right),$ for $i=1, \ldots, n,$ and $\vec{c}=\left(c_{1}, \ldots, c_{n}\right)^{\top}$ Let $\overrightarrow{1}=(1, \ldots, 1)^{\top} \in \mathbb{R}^{n},$ and define the constants $A=\overrightarrow{1}^{\top} \Sigma^{-1} \overrightarrow{1}$ and $E=\vec{c}^{\top} \Sigma^{-1} \overrightarrow{1}$ (a) Initially, the company seeks portfolio weights $\left(w_{0}, \vec{w}\right)$ which solve the following optimisation problem: $$ \begin{array}{l} \text { Minimise } f\left(w_{0}, \vec{w}\right)=\vec{w}^{\top} \boldsymbol{\Sigma} \vec{w}+2 \vec{w}^{\top} \vec{c} \text { over }\left(w_{0}, \vec{w}\right) \in \mathbb{R}^{n+1} \hspace{5mm} (1) \\ \text { subject to } \quad g_{1}\left(w_{0}, \vec{w}\right)=w_{0}+\vec{w}^{\top} \overrightarrow{1}-1 \leq 0 \hspace{5mm} (1a) \end{array} $$ (i) Explain briefly why (1) is a convex optimisation problem.
(ii) Show that the Karush-Kuhn-Tucker (KKT) conditions for (1) are equivalent to $$ \begin{array}{r} 2 \Sigma \vec{w}+2 \vec{c}=\overrightarrow{0} \\ \lambda_{1}=0 \\ w_{0}+\vec{w}^{\top} \overrightarrow{1}-1 \leq 0 \end{array} $$ and hence show that an optimal solution is given by $$ \left(w_{0}, \vec{w}\right)=\left(1+E,-\Sigma^{-1} \vec{c}\right) $$
My attempt: So for the critical point condition, I know I need to calculate the gradient of f and g but here's where I am struggling.
For the gradient of f, would it be 2Σw + 2c? I'm not too sure on the 2c.
for the gradient of g, i'm guessing it's just 1?
Feel a bit lost though and not sure if it's correct.