using fmincon with a turnover penalty function

I use fmincon on the following function: vol=w'*Cov*w + (c*(w-PriorWeights)'*Cov*(w-PriorWeights));
To minimize volatility, while punishing a change in weights (w).
adding the part after the "+" causes an error: User-supplied and forward finite-difference derivatives do not match within 1e-06 relative tolerance.
I do not understand (and cannot find online solutions to) this problem.

댓글 수: 1

Torsten
Torsten 2017년 5월 18일
Do you supply the gradient of the objective function ?
Best wishes
Torsten.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

질문:

2017년 5월 18일

댓글:

2017년 5월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by