I'm trying to realize Black-Litterman Model for my stocks portfolio, but under optimization, I get a subset of weights with negative values. I want to get only positive weights. IS it possible to add constraints to the Black-Litterman Model? Thank you.
The problem is not Black-Litterman.
B-L aims at finding an estimation of expected return based on a prior objective and some views. The prior is based on market neutral portfolio composition (or your benchmark) and the views are for the returns, so no constraint on weights can be added in this phase.
The fact that you get negative weights is entirely due to the optimisation phase. If you simply run a Markowitz min variance optimisation, which means having only 2 constraints, thus sum of weights equals 1 AND each weight bigger than zero, then you will never end up with negatve weights. It is simply a matter of adding the second in your optimisation, whatever it is your cost function.
So the answer is no, you cannot impose positive weights during the Black-Litterman stage, you need to impose it during the optimisation.