Path: news.mathworks.com!not-for-mail
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$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-02-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1368287708 23007 172.30.248.47 (11 May 2013 15:55:08 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 11 May 2013 15:55:08 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2921053
Xref: news.mathworks.com comp.soft-sys.matlab:795359

I’m watching the video here:
https://www.mathworks.com/company/events/webinars/webinarconf.html?id=30357&language=en&confirmation_page&wfsid=4551426

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.