Borrar filtros
Borrar filtros

How to program an excel Solver in Matlab

2 visualizaciones (últimos 30 días)
Gloria Viñolas Nicolau
Gloria Viñolas Nicolau el 2 de Nov. de 2017
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.

Respuestas (0)

Categorías

Más información sobre Linear Least Squares en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by