cvxportfolio
cvxportfolio copied to clipboard
Soft Constraints on Factor Neutral for MPO
I am trying to follow the paper to set up factor neutral soft constraint as objective cost in Multi-Period-Optimization. From the resulting trade schedule, you can see that for the first trade, factor neutral is achieved. However for the rest of period, factor is far from neutral. Anyone has any insight on this?
The setup I have look like the following: `class FactorNeutralSoftConstraintCost (BaseCost): def init (self, factor_exposure, priority): self.priority=priority self.factor_exposure = factor_exposure super(FactorNeutralSoftConstraintCost, self).init()
def _estimate(self, t, w_plus, z, value):
w_plus = w_plus[:-1] # remove cash
self.expression = time_matrix_locator(factor_exposure, t) * w_plus
return cvx.norm(cvx.multiply(self.priority, self.expression), 1)`