# When / how do I vol-scale portfolio weights when optimizing the portfolio?

I have a set of portfolio weights $$w$$. I'm using cvxpy to optimise the portfolio sharpe, subject to a set of constraints.

$$\text{maximize} \hspace{10mm} \mu^Tw - w^T\Sigma w$$ $$\text{subject to:} \hspace{5mm} 1^Tw = 0 \hspace{5mm} \text{(Long/Short cash neutral)}$$ $$||w||_1 \leq L_{max} \hspace{5mm} \text{(Leverage limit)}$$ $$|w_i| \leq c, \forall i$$

where $$\mu$$ are the expected returns, $$w$$ are the target weights, $$\Sigma$$ is the covariance matrix of returns, $$1$$ is a vector of ones, $$c$$ is a maximimum concentration limit per asset (e.g. 1%), and $$L_{max}$$ is the maximum allowable leverage.

The issue now is, I want to scale the position sizes by a portfolio volatility target in this process, and I am not sure how. In other words, I would like to target, say, an 10% annualised volatility.

I could scale $$w$$ using a standard method:

$$w_{\text{vol scaled}} = w \times \frac{\text{vol target}}{std(r)}$$

where $$std(r)$$ is the standard deviation of the returns over the last $$n$$ periods (e.g. 12 months). The problem with this method is that some weights will break the constraints above after having optimised the portfolio.

How can I meet a volatility target, either before, as part of or after portfolio optimisation?

$$\min \frac{1}{2}w^T\Sigma w \quad \mathrm{s.t.} \quad w^T\mu=\mu_c$$
and subject to your other constraints. Then, trace out $$\mu_c$$ until the optimal solution reaches your target risk level.