sf_quant.optimizer.ZeroInvestment#

class sf_quant.optimizer.ZeroInvestment(*args, **kwargs)#

Enforces a Zero-investment constraint.

This constraint ensures that the sum of all portfolio weights equals 0.

Examples#

>>> weights = cp.Variable(3)
>>> constraint = ZeroInvestment()(weights)
__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)