Lagrange optimization of vectors with two constraints

59 Views Asked by At

I hope here is he correct place to ask my question. I am trying to develop a portfolio strategy with three assets (one of which is risk free). For this I need to determine a vector of weights (w) and maximize the return. However, I want that the volatility/variance of the portfolio is set to a predetermined level (constraint 1) and that the sum of the weights is 1 (second constraint). I found the following formula:

$ \max_{L=w, \lambda_1, \lambda_2} = w' \mu + \lambda_1 (\sigma_{target}^2 - 0.5 w'\Sigma w) + \lambda_2 * (1 - w'\textbf{1})$

Can anyone help me solve this problem? I work with R. Is there any package that can help me with this?