Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
How to get the minimum of a function

Subject: How to get the minimum of a function

From: thitetaf

Date: 9 Feb, 2009 17:17:56

Message: 1 of 2

Hello all

I have the Variance-Covariance matrix on N assets and want to calculate the W=[w1,w2...wn] such as the variance of my portfolio is minimized.

I.E : I want to find W such as W'*CovarMatrix*W is minimized. I know that fmincon function exist but my problem is that my CovarMatrix is a parameter. How can I use fmincon such as Matlab is just trying to "play" with the W's ?

Thanks

Subject: How to get the minimum of a function

From: Roger Stafford

Date: 9 Feb, 2009 18:44:01

Message: 2 of 2

thitetaf <thibault.tetafort@edhec.com> wrote in message <20069717.1234199906713.JavaMail.jakarta@nitrogen.mathforum.org>...
> Hello all
>
> I have the Variance-Covariance matrix on N assets and want to calculate the W=[w1,w2...wn] such as the variance of my portfolio is minimized.
>
> I.E : I want to find W such as W'*CovarMatrix*W is minimized. I know that fmincon function exist but my problem is that my CovarMatrix is a parameter. How can I use fmincon such as Matlab is just trying to "play" with the W's ?
>
> Thanks

  As you have given W, the quantity W'*CovarMatrix*W would not make sense. Don't you mean that W is to be a column vector rather than a row vector?

  What constraints are you placing on W? If you require it to be a unit vector, it is a simple problem in eigenvectors. If there are no constraints, the minimum occurs at W = zeros(n,1), and I am sure you don't mean that.

Roger Stafford

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us