フィルターのクリア

Constraints not meeting the parameters?

3 ビュー (過去 30 日間)
Sameer
Sameer 2014 年 5 月 30 日
編集済み: Sameer 2014 年 6 月 1 日
Hello:
This is what my code looks like for the the linear equality constraints. However, run I run the code it does not meet the constraints.
in swtOther_Aeq1, the first constraint is to make stocks 1,3,7 comprise 22% of the portfolio.
the second constraint is to make the portfolio return equal to a certain return in the grid (ERGRid).
the third constraint is to have the total weights sum up to one for the portfolio.
However, none of these requirements are being met.
I am confused as to why.
Help would be appreciated. thanks.
  3 件のコメント
Sameer
Sameer 2014 年 5 月 30 日
Exitflag says 0.04044
output says -2
Sameer
Sameer 2014 年 5 月 30 日
Also this is what TolCon says:
TolCon =
iterations: 29
funcCount: 337
constrviolation: 9.3468
stepsize: 7.6372e-11
algorithm: 'interior-point'
firstorderopt: 0.059526
cgiterations: 58
message: 'No feasible solution found.
fmi...'

サインインしてコメントする。

回答 (1 件)

Matt J
Matt J 2014 年 5 月 30 日
編集済み: Matt J 2014 年 5 月 30 日
Exitflag=-2 means that no feasible point was found, as output.message also tells you. It means fmincon thinks there is no point satisfying your constraints.
  10 件のコメント
Sameer
Sameer 2014 年 6 月 1 日
However, when I entered
swtOther_beq = (-1.00*10)+0.01,
the portfolio weights in a bizzare fashion sums to 1.00.
I am confused on the rationale
Sameer
Sameer 2014 年 6 月 1 日
編集済み: Sameer 2014 年 6 月 1 日
nevermind, I figured it out. teacher used different constraints!
However the bizarreness is still confusing.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangePortfolio Optimization and Asset Allocation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by