Hi all
I have created a macro to make a Mean/variance frontier for stocks. It works but it is not dynamic in the sense that i can add more stocks to see how the frontier will change.
Its uses an extensive amount of matrix algebra, which i found was only possible using the worksheetfunctions MMULT, TRANSPOSE and MINVERSE, using ranges instead of arrays.
Is it not possible to do these computations on arrays instead ? This would make the code much nicer and i would not have to grab all my data from the spreadsheet.
If it is not possible to do with arrays I just want it made dynamic, so it can take any size of range to make the graph. Its just pretty ugly code thats all.
Would also be appreciated if someone could redirect me to any good "Linear algebra for VBA" threads.. Ive tried google without much luck...
Please Login or Register to view this content.
Bookmarks