Parameter optimization - lsqnonlin with normcdf
이전 댓글 표시
Hi all,
I'm trying to optimize parameters with lsqnonlin to fit data. Actual data is market prices of options and I try to fit parameters to get those prices. However, since the formula is
and d1 is expressed as
and v is a function of several parameters that I'd like to optimize. Initial parameters works well but when I run lsqnonlin v goes to negative at some point and I get an error of inputs must be real for erf function in normcdf. I made that non-negative using if statement in function v but then optimization doesn't work well. I appreciate any lead to avoid this.
Best,
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Choose a Solver에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!