필터 지우기
필터 지우기

How to program an excel Solver in Matlab

조회 수: 2 (최근 30일)
Gloria Viñolas Nicolau
Gloria Viñolas Nicolau 2017년 11월 2일
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개)

카테고리

Help CenterFile Exchange에서 Linear Least Squares에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by