I am trying to understand a regression performance attribution.

The problem the code solves is shown below.

min 0.5 * x'Hx + f'x
st. Ax <= b

So I have n companies, my dep_vec vector is a (nx1) vector of stock returns.

Then I have say 4 factors & one dummy factor say countries where there are 6 countries. My indep_matrix matrix is n x 11. Where the first column is a column of 1's the next 4 are my stocks factor values and the remaining 6 columns the dummy value for the countries.

The problem is setup as,

H = transpose(indep_matrix) * indep_matrix
f = transpose(indep_matrix) * dep_vec

The constraints,

A is (2 x 11)
B is (2 x 1)

A = [0 0 0 0 0 0.2 0.1 0.15 0.3 0.12 0.13;  
     1 0.232 0.31 0.18 0.11 0.2 0.1 0.15 0.3 0.12 0.13]

B = [0; wgts * dep_vec];

It is the constraint that is confusing me.

So in the first row of A the constant and factors are all zero. The renaming 6 columns are the weights of the individual countries & sum up to 1. In the second row the constant and factor exposures are now populated along wight the weights of the countries.

So how I read the first constraint where only the dummy countries have a non zero value and B(1) = 0 is that saying that our estimated coefficients multiplied by our country weights must equal zero & if so why?

The next constraint I think I understand it that its saying the estimated coefficients multiplied by our portfolio exposures must equal the return of the portfolio, is that correct?

  • 1
    $\begingroup$ Hi: I tried to understand it but couldn't. How is dep_vec related to x ? And are $b$ and $B$ the same thing. What is $x$ ? I think you should try to give the dimensions and explanations of each variable more clearly. Or maybe it's just me :). $\endgroup$ – mark leeds May 22 '20 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.