The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: Genetic Algorithm and Efficient Portfolio
Replies: 3   Last Post: May 19, 2013 10:49 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]

Posts: 150
Registered: 2/11/08
Genetic Algorithm and Efficient Portfolio
Posted: May 11, 2013 11:55 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.