PyPortfolioOpt icon indicating copy to clipboard operation
PyPortfolioOpt copied to clipboard

Per Asset Max value (p * weight ) constraint in long short portfolio

Open AnkitAggarwalAlphagrep opened this issue 3 years ago • 0 comments

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:

  1. 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

AnkitAggarwalAlphagrep avatar Dec 13 '22 18:12 AnkitAggarwalAlphagrep