Back to Community
Constraint on portfolio's weighted average dividend yield

Is there a way to include a constraint with the opt.MaximizeAlpha() objective function such that it tells the optimizer to select weights subject to a constraint on the portfolio weighted average for some metric? Example --> maximize alpha subject to portfolio weights that would result in a portfolio weighted average trailing dividend yield > X%.