Explicit solution not found using solve

5 次查看(过去 30 天)
I have a factor model with only one factor - the market excess return and the returns of fifteen companies. I run a regression and estimate fifteen betas. Then I have to construct a mimicking portfolio of the market factor. I try to solve the question with matrices and write (I pre-specified the 15x1 vector of zeros thetaa,don't know if this is correct):
syms thetaa
solve(thetaa*beta'==1,sum(thetaa)==1)
Then I get the following:
Warning: 16 equations in 1 variables.
> In C:\Program Files (x86)\toolbox\symbolic\symbolic\symengine.p>symengine at 54
In mupadengine.mupadengine>mupadengine.evalin at 97
In mupadengine.mupadengine>mupadengine.feval at 150
In solve at 160
Warning: Explicit solution could not be found.
> In solve at 169
Any suggestions will be appreciated!

采纳的回答

Brian B
Brian B 2013-3-2
编辑:Brian B 2013-3-2
I know nothing about mimicking portfolios, but I do know that anything you assign to thetaa is lost when you call
syms thetaa
That means that mupad (the symbolic solver MATLAB is using) interprets
thetaa*beta'
as a scalar-vector multiplication, instead of matrix multiplication. That causes
thetaa*beta'==1
to be interpreted as a vector of 15 equations in the single (scalar) variable thetaa. You add one more, which effectively says thetaa==1, and voilà! There is no solution unless beta is a vector of ones!
  19 个评论
Brian B
Brian B 2013-3-2
Just mark the answer as accepted. :)
Brian B
Brian B 2013-3-2
Note that I was wrong with the first formula I wrote. It is a solution, but not the minimum variance solution. The correct formula, noted above and restated here for clarity, is
thetaa = (c*inv(B.'*inv(sigma)*B)*B.'*inv(sigma)).';

请先登录,再进行评论。

更多回答(2 个)

N =B>=>2
N =B>=>2 2013-3-2
编辑:N =B>=>2 2013-3-2
Issue update: I did the following steps:
N = null([ones(15,1) beta].').';
thetaprime = thetaa + randn(1,13)*N
Then this thetaprime changes everytime because of the random vector, but in all cases its components sum up to one. I am trying to minimize this using the following:
B = [ones(15,1) beta];
c = [1 1];
thetaprime = (c*inv(B.'*inv(SIGMA_Questionf)*B)*B.'*inv(SIGMA_Questionf)).';
but it does not seem to work: thetaprime once again changes its values every time (and I need only one answer that gives the minimum variance) and the components do not sum up to one. Any suggestions?
  1 个评论
Brian B
Brian B 2013-3-3
编辑:Brian B 2013-3-3
Is this school work?
It doesn't mean you can't get help if it is, but you should clearly state that you are asking about homework when that is the case.

请先登录,再进行评论。


N =B>=>2
N =B>=>2 2013-3-3
Yes, it is a school work. It is my very first time asking questions here, didn't know I have to state that as well.
  1 个评论
Brian B
Brian B 2013-3-4
Your original question referred to warnings and unexpected behavior, which is clearly appropriate for this forum. But I probably got carried away answering some of the later questions. I am a student, too, and I recognize the greater value of struggling with the concepts compared to having the answer given. Your questions indicate that there are some aspects of the subject that you still need to wrestle with. This is a good time to talk with your professor or TA.
You should feel welcome to continue using this forum for help with MATLAB-specific qustions, but it is good practice to follow some basic guidelines when asking about homework.

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by