Quantopian's community platform is shutting down. Please read this post for more information and download your code.
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%.