PyPortfolioOpt
PyPortfolioOpt copied to clipboard
Per Asset Max value (p * weight ) constraint in long short portfolio
Hi
I'm creating a long short market neutral portfolio using following function.
ef.max_quadratic_utility(market_neutral=True)
and I have the net exposure constraint also.
def create_gross_exposure_constraint(w):
return cp.norm1(w) <= 2
I'm trying to add net asset value constraints as explained below:
- I want the net exposure < 1 Million USD (this number can be changed). What does this mean is If i do discrete allocation using above weight: abs(Position_of_Asset * Price_of_Asset) < 1 Million USD.
@robertmartin8 Please do let me know how can I do that.
Thanks Ankit Aggarwal