# Constrained optimization - quantitative finance

I am trying to perform constrained opmitization for portfolio performance attribution analysis. Specifically, I am trying to determine the impact of sectors performance on the S&P 500 index.

Min y-(b1x1+b2x2+...+bnxn+bn+1xn+1+....bpxp)

subject to b1+b2+...+bp = 1,

0 <= bi <= 1 for i=1,2,...,p

yis the time-series return of S&P500 and xi is the time-series return of a sector for all i = 1, 2, ..., p.

The idea of the betas is that the higher the beta, the greater the impact of the variable (sector) is on the portfolio.

The problem with this optimization is that, sometimes, the sector and market are negatively correlated so beta is negative. But the constraint forces it to be between 0 and 1, so beta becomes 0, which suggests that the sector had no impact on the S&P 500 index (even though it DID have an impact, negatively).

What's the better way of solving this?

Thank you very much in advance!

• If beta can be legitimately negative (can it?), why is is constrained to be $\ge 0$? – Mark L. Stone Jul 11 '18 at 13:10
• @MarkL.Stone Good question. The constraint that beta >=0 exists because I want the betas to represent the impact of a sector on the index in "percentage". – Jun Jang Jul 11 '18 at 13:14
• Say you have two sectors which have equal impact the S&P 500. Assume one is positively correlated, and the other is negatively correlated. Are you saying the desired output of the algorithm in this case is $\beta_1=\beta_2=0.5$? – scherm Jul 11 '18 at 13:41
• @scherm Yes exactly, because I am concerned about the impact of a sector on S&P 500. In your opinion, is that a good analytical method? – Jun Jang Jul 11 '18 at 13:43
• Sorry, I'm not an economist, so I can't comment on the validity of your model. You could try removing the constraints on $\beta$, solve the optimization problem, and then normalize the $\beta_i$'s to sum to 1 afterward to try and understand their relative contributions, but I would be cautious about drawing conclusions that way. As a more general note, it does seem strange to assume that the time-series $y$ can be approximated by a convex combination of other time-series $x_i$. Again, I am not an expert, but this seems like a very simple model for something as complex as market trend analysis. – scherm Jul 11 '18 at 16:46