From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Genetic Algorithm and Efficient Portfolio
Date: Sat, 11 May 2013 15:55:08 +0000 (UTC)
Organization: HSBC
Lines: 22
Message-ID: <kmlpks$mev$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1368287708 23007 (11 May 2013 15:55:08 GMT)
NNTP-Posting-Date: Sat, 11 May 2013 15:55:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2921053
Xref: comp.soft-sys.matlab:795359

I’m watching the video here:

Very cool stuff!!  When you install Matlab, and you get the ExcelLink, you have an Excel file named ‘DowPortfolio’.  This file contains some macros.  Here is the one that minimizes the portfolio risk:
Sub Min_Sub_Port_Risk_Click()

MLPutMatrix "targetRet", Application.Range("Summary!G18")
MLPutMatrix "portSize", Application.Range("Summary!F18")

MLEvalString ("[portStd, portRet, portWts, portIndx] = ComputeBestPortfolio(expRet,expCov,portSize,targetRet)")

MLGetVar "portWts", portWts
MLGetVar "portStd", portStd

Application.Range("Summary!D2:D31").Value = portWts
Application.Range("Summary!H18").Value = portStd

End Sub

I know VBA pretty well.  I’m wondering where the logic of this is REALLY running.  There must be some .m files somewhere that make this work.  Can someone please tell me the name of this file, or these files?  I looked for them, but I can’t find them.  VBA most definitely is not doing the logic.  Where is the logic really running???

Sorry if this is a dumb question.  Maybe I missed something simple.