cvxgrp / cvxportfolio

Portfolio optimization and back-testing.
https://www.cvxportfolio.com
GNU General Public License v3.0
962 stars 252 forks source link

Add `MaxImbalance`, `MinImbalance`, `TargetImbalance` constraints #181

Open enzbus opened 2 weeks ago

enzbus commented 2 weeks ago

Connected to #180. It's often unclear to users how the cash weight is connected to the longs and shorts. Create 3 extra constraints to specify the long/short legs imbalance they require. NoCash and DollarNeutral become special cases of TargetImbalance. Documentation will explain how they are used.

thayes75 commented 1 week ago

Been playing with this today and it is very helpful. To clarify the other half of #180 was the concept of deploying a set notional amount to ensure a target dollar exposure of the assets themselves.

For example, carrying out a capacity study where I run a dollar neutral portfolio starting at $100MM/side, $500MM/side, ... , $1bln/side, etc., and the portfolio stays dollar neutral as the PnL (hopefully) accrues over the back test.