Converting a Portfolio Beta Constraint into Linear Inequalities
Summary
The document shows how to express a portfolio beta bound in a linear optimizer’s constraint format. It starts from a weighted exposure involving deal stock consideration, each holding’s beta, and the market benchmark beta, with a permitted deviation of 0.1. By collecting the weight-dependent terms, the constraint becomes a pair of linear inequalities that can be represented as two rows of a matrix and matching upper bounds.
The general method is to write sums as dot products, then stack rows to combine constraints. For this specific expression, each coefficient is the deal stock fraction multiplied by the difference between benchmark beta and the individual stock beta; a second row negates those coefficients. The bounds are both 0.1. This is an algebraic formulation, not an investment result: the answer does not discuss optimizer-specific syntax, weight limits, or whether the stated exposure model is appropriate for a particular portfolio.
Key ideas
- A weighted sum can be represented as a dot product with a row vector.
- A two-sided linear bound can be rewritten as two inequalities by negating one side.
- The deal stock fraction scales each holding’s contribution to the beta constraint.
- Stacking coefficient rows lets a matrix represent multiple linear constraints.
Tags
Full text
# optimisation problem with linear constraint
# optimisation problem with linear constraint
I have an optimisation problem.
I wish to maximise a function subject to a constraint. It is the constraint that is causing me problems. I am using an addin in Matlab which does the optimisation however the constraints that I have used before have been in the format of the line below.
```
b_l <= Ax <= b_u
```
The constraint is,
```
Sum(x .* stock)*BetaBM - 0.1 <= Sum(x .* stock.*BetaSK) <= Sum(x .*stock)*BetaBM + 0.1
```
where,
```
x is 2000 by 1 vector
stock is 2000 by 1 vector
BetaBM is a scalar
BetaSK is 2000 by 1 vector
x - is the weight of each stock in the fund. It cannot be more than 100% but can be less.
stock - I am looking at M&A deals. The stock variable is a number between 0 and 1 which represents how much of the deal is being paid for in the acquires stock. 0 would mean the deal is purely cash. If there is part of the deal being paid in stock I will hedge the beta exposure against the S&P Index.
BetaBM - is the S&P beta.
BetaSK - contains all the individual beta for all the stocks in the fund
```
I need to get the constraint in the format b_l <= Ax <= b_u if at all possible?
## Answer by Richi Wa (score 2, accepted)
https://quant.stackexchange.com/a/14891
If you have a vector of weights $w=(w_1,\ldots,w_n)^T$ then $(1,\ldots,1)* w = \sum_{i=1}^n w_i$ thus a sum condtion can be formulated by multiplication with a row of ones. A $\le$ can be put into an $\ge$ by multiplying with $(-1)$ and if you have to put all your constraints into on $A$ then you usually stack all the row vectors together. In your case the matrix $A$ will consist of rows of ones. As long as you don't explain your constraint I can not add more.
I will try: If you want to put a constraint on your porfolio beta then you should use a constraint: $$(\beta_1,\ldots,\beta_n) * w \le \beta_{BM}+0.1$$ and $$(\beta_1,\ldots,\beta_n)*w \ge \beta_{BM}-0.1$$ which the same as $$ -(\beta_1,\ldots,\beta_n)*w \le 0.1-\beta_{BM}$$. So you could use a matrix $$A = (\beta_1,\ldots,\beta_n;-\beta_1,\ldots,-\beta_n)$$ and right hand side $b = (\beta_{BM}+0.1;0.1-\beta_{BM})$ then your condition is: $$ A w \le b. $$
EDIT after a remark by PO: If you have $$ (\sum_{i=1}^n w_i stock_i) \beta_{BM} -0.1 \le \sum_{i=1}^n w_i stock_i \beta_i $$ then this is equivalent to $$ \sum_{i=1}^n w_i stock_i (\beta_{BM} - \beta_i) \le 0.1 $$ then you define scalars $k_i = stock_i (\beta_{BM} - \beta_i)$ and the same as above holds for $\sum_{i=1}^n w_i k_i \le 0.1$. For the right hand side you get $$ \sum_{i=1}^n w_i (-k_i) \le 0.1. $$ Your matrix $A$ has two rows, one $(k_1,\ldots,k_n)$ and one $(-k_1,\ldots,-k_n)$ the rhs is $(0.1, 0.1)$.Shown in full with attribution under the source's licence. Licence: CC BY-SA 4.0 (Stack Exchange)
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.