Hello,
I try to find an optimized portfolio strategy. This work need a covariance matrix between different stock prices in a period of time.
For example , see the file attached, I need a covariance matrix ( I have prepared it on the sheet2) between the 37 different stock prices (sheet1) during a period of time.
For example since the 25/08/2011 to the 27/10/2011, but what is pretty diffcult is that I need a general code where I cStockMarketPrices.xlsxould enter the dates I want (For example by an InputBox) and the matrix appear.
Why I need that ? Because I will have to change the period many times.
I find approximately how to do the matrix, typing directly the equation on excel but I can't find the VBA code to do it , and I need a VBA code?
If someone could help, It would be very kind of him,
I just let you see the file attached
Thank you
Bookmarks