Parameter optimization - lsqnonlin with normcdf
1 次查看(过去 30 天)
显示 更早的评论
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/303103/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/303108/image.png)
I appreciate any lead to avoid this.
Best,
0 个评论
采纳的回答
Raunak Gupta
2020-5-30
Hi,
I see that the optimization variable in the question is v. Since in lsqnonlin you are mentioning v as your parameter I suggest to put a lower bound lb equal to 0 so that optimization will not return value less than zero.This can be done as mentioned in this example.
Upper bound can be mentioned as ‘inf’ because v can be any positive real number. You may remove if statement for checking the value of v because the functionality of putting bounds on optimization variable is available in lsqnonlin.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Nonlinear Optimization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!