# Portfolio Weight Constraints

Hi,

So I was asked to calculate the maximum sharpe ratio using solver in excel but it gave me really big numbers for the portfolio weights. So I was wondering what is a good constraint to add and why is it bad or if it is even feasible to have portfolio weights so heavily in a long or short position?

Cheers.

• if your issue is large portfolio weights then consider ridge regression or lasso regression. They are both regularisation techniques which you can investigate on wikipedia – Attack68 Oct 13 '20 at 5:12
• You can also add constraints for the following: 1. Beta of the portfolio 2. Volatility of the portfolio (Standard Deviation) 3. Leverage of the portfolio, as defined as sum(abs(weight)) – JPN Oct 13 '20 at 12:46
• Don’t use excel if you want to be taken seriously. R and python both have really good libraries (eg cvtopt or scipy) to optimize including constraints. – user50421 Oct 17 '20 at 2:20