How to program an excel Solver in Matlab
2 次查看(过去 30 天)
显示 更早的评论
I have a problem on an Excel Worksheet and I solve it using the Solver. I'd like to solve the same problem in Matlab but I have tried some Matlab functions and I can't find a good solution.
I explain below the approach of my problem to see if someone can help me. Thank you very much in advance.
I have a liability and I want to cover it with a portfolio of assets. I already have some assets bought (Assets) but I want to complete this portfolio with assets that give me maximum rentability (Additional Assets). In addition, a set of constraints must be satisfied:
I attach the excel so you can see the vectors K1 and K2. Suppose we have a universe of assets with 3 bonds, Bond1, Bond2 and Bond3 (in the attached file you can see the prices and cashflows of these bonds). The problem we want to solve is to find a solution that maximizes the rentability of the assets by satisfying the constraints described above.
The excel solver finds the following solution:
This solution satisfies all restrictions and obtains a return of 2.97%.
In Matlab I have tried the fmincon function but the solution it finds is worse than the excel or it does not satisfy all the restrictions. Anyone know how I can implement this problem in matlab?
Thanks in advance.
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Portfolio Optimization and Asset Allocation 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!