using fmincon with a turnover penalty function
Afficher commentaires plus anciens
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 commentaire
Torsten
le 18 Mai 2017
Do you supply the gradient of the objective function ?
Best wishes
Torsten.
Réponses (0)
Catégories
En savoir plus sur Model Compatibility dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!