Back to Community
Optimization constraints - relative to index

Is it at all possible in Quantopian to set optimization constraints that are relative to some index (e.g. S&P 500), for example, set maximum tracking error relative to index, or maximum deviation from sector weights of index?

Closest thing I can find in the documentation is quantopian.optimize.TargetWeights, but I want to base portfolio weights on some alpha signal, and I assume this is mutually exclusive with using quantopian.optimize.MaximizeAlpha, and in any case not sure how to set dynamic target weights as index constituent weights change over time.