About minimizing variance of a mimicking portfolio

I have been working on an assignment and encountered the following problem: I have one-factor model for returns (say CAPM). I regress the returns of fifteen companies on market returns (my factor) and obtain 15x1 vector of betas. My task is to create a 15x1 vector of weights thetaprime that is the mimicking portfolio of the factor. For this vector of weights to be the mimicking portfolios, I need the following conditions:
1. sum(thetaprime) = 1
2. thetaprime*beta' = 1
3. The variance of the resulting mimicking portfolio (constructed with the thetaprime components) to be the minimum variance possible and the variance is given by:
variance_mimicking = thetaprime*SIGMA*thetaprime' (where SIGMA is a 15x15 variance-covariance symmetric matrix that I have calculated)
I am doing the following steps:
1. N = null([ones(15,1) beta].').';
2.thetaprime = thetaa + randn(1,13)*N;
in this way I can generate infinitely many vectors of thetaprime that satisfy conditions 1) and 2) above. When I substitute thetaprime in the formula for the variance, I get the same variance every time independently of the variables in thetaprime which does not make sense for me. I expectted different result for variance for different values of thetaprime that I can minimize with an optimization routine in order to find one unique value for thetaprime. Any suggestions?
Thank you very much in advance!

2 Comments

Don't you mean
thetaa + N*randn(13,1)
You want a random linear combination of the columns of N, I think.
Even if I do it in this way, I get the same problem in the end. Values of thetaprime do vary,but the variance is still constant.

Sign in to comment.

Answers (2)

Matt J
Matt J on 3 Mar 2013
Edited: Matt J on 3 Mar 2013
The only reason I can think of why that would happen is if
Aeq=[ones(15,1) beta]
is in the row space of sigma, or equivalently that null(SIGMA) contains null(Aeq). A simple test would be to check whether
SIGMA*N=0
Incidentally, though, you do know that QUADPROG is the more standard way to solve these kinds of problems, right? Do you not have the Optimization Toolbox?

12 Comments

Thank you for your answer. N is 13x15, so SIGMA*N is not a possible operation, since SIGMA is 15x15. I am a Matlab rookie, so I haven't used QUADPROG yet, but I do have the Optimization Toolbox
I didn't notice that you had transposed the output of null(Aeq). So, really what I meant was
N*SIGMA=0
N*SIGMA yields a result which is different from zero
We probably need to see your SIGMA, beta, thetaa data so that we can try this ourselves.
beta is:
0.4829
0.7327
1.1341
1.2864
1.1280
1.3539
1.2257
0.9682
1.5092
1.4600
0.4778
0.7881
0.5662
0.6209
0.4340
thetaa' is:
0
0
0
0
0
0
0
0
0.5264
0
0
0
0
0
0.4736
We need SIGMA as well. That's the most important part.
SIGMA Columns 1 to 5
4.6089 6.9931 10.8237 12.2776 10.7660
6.9931 10.6107 16.4230 18.6291 16.3354
10.8237 16.4230 25.4189 28.8335 25.2833
12.2776 18.6291 28.8335 32.7067 28.6797
10.7660 16.3354 25.2833 28.6797 25.1485
12.9218 19.6065 30.3463 34.4228 30.1845
11.6980 17.7495 27.4721 31.1625 27.3256
9.2408 14.0213 21.7017 24.6169 21.5859
14.4046 21.8563 33.8285 38.3727 33.6481
13.9344 21.1429 32.7243 37.1202 32.5498
4.5607 6.9200 10.7105 12.1492 10.6534
7.5214 11.4123 17.6636 20.0364 17.5694
5.4043 8.2001 12.6918 14.3967 12.6241
5.9263 8.9920 13.9175 15.7871 13.8433
4.1418 6.2845 9.7269 11.0335 9.6750
Columns 6 to 10
12.9218 11.6980 9.2408 14.4046 13.9344
19.6065 17.7495 14.0213 21.8563 21.1429
30.3463 27.4721 21.7017 33.8285 32.7243
34.4228 31.1625 24.6169 38.3727 37.1202
30.1845 27.3256 21.5859 33.6481 32.5498
36.2289 32.7975 25.9085 40.3861 39.0679
32.7975 29.6912 23.4546 36.5610 35.3676
25.9085 23.4546 18.5281 28.8815 27.9388
40.3861 36.5610 28.8815 45.0203 43.5509
39.0679 35.3676 27.9388 43.5509 42.1294
12.7867 11.5756 9.1442 14.2539 13.7887
21.0876 19.0904 15.0805 23.5074 22.7401
15.1521 13.7170 10.8358 16.8908 16.3395
16.6154 15.0417 11.8822 18.5220 17.9174
11.6124 10.5126 8.3044 12.9449 12.5224
Columns 11 to 15
4.5607 7.5214 5.4043 5.9263 4.1418
6.9200 11.4123 8.2001 8.9920 6.2845
10.7105 17.6636 12.6918 13.9175 9.7269
12.1492 20.0364 14.3967 15.7871 11.0335
10.6534 17.5694 12.6241 13.8433 9.6750
12.7867 21.0876 15.1521 16.6154 11.6124
11.5756 19.0904 13.7170 15.0417 10.5126
9.1442 15.0805 10.8358 11.8822 8.3044
14.2539 23.5074 16.8908 18.5220 12.9449
13.7887 22.7401 16.3395 17.9174 12.5224
4.5130 7.4427 5.3478 5.8643 4.0985
7.4427 12.2744 8.8195 9.6713 6.7592
5.3478 8.8195 6.3371 6.9491 4.8567
5.8643 9.6713 6.9491 7.6202 5.3257
4.0985 6.7592 4.8567 5.3257 3.7221
Thanks for the help!
I do not get the same variance for every thetaprime, although the difference is small and possibly due to the fact that the SIGMA data you've given is a 4 decimal place truncation of your actual data,
>> f=@(v)v*SIGMA*v';
>> v=thetaa + rand(1,13)*N;
>> f(v), f(thetaa)
ans =
19.7648
ans =
19.7642
The similarity between the 2 values can be explained by the fact that N is approximately in the null space of SIGMA, as I was theorizing before. N*SIGMA doesn't give a result that is precisely zero, but the numbers are small enough to be attributable to round-off
>> max(max(N*SIGMA))/norm(SIGMA)
ans =
5.6232e-06
If you repeat this, you might get an even smaller number than this since again, I'm working with a 4 decimal place approx to your data.
You are absolutly right! Repeating
>> max(max(N*SIGMA))/norm(SIGMA)
yields:
2.9163e-17
I also realized that variances are slightly different. So an optimization routine for the variance now should help me get my unique answer for thetaprime?
No. The computation that you've just done confirms that there is no unique answer for thetaprime. In fact, all thetaprime satisfying constraints (1) and (2) minimize the variance to within numerical precision.
This is a bit strange. The assignment asks for an uniqie solution for thetaprime and economic interpretation of its components (the magnitude of loadings on different stocks and their relative importance in the portfolio).
You should re-examine your SIGMA and how it was generated. It does not admit a unique solution.

Sign in to comment.

Matt J
Matt J on 3 Mar 2013
Edited: Matt J on 3 Mar 2013
Another thing I'll point out is that the problem is small enough to be solved analytically, and you've already done most of the work.
L=sqrtm(SIGMA);
dtheta = -thetaa*L/N*L;
thetaprime=thetaa+dtheta;

Categories

Asked:

on 3 Mar 2013

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!