File Exchange

image thumbnail

Getting Started with Portfolio Optimization (Files for Video Demo)

version (26.7 KB) by MathWorks Quant Team
Files for demonstrating how to perform portfolio optimization


Updated 12 Sep 2017

View Version History

View License

The files are designed to show how to perform portfolio optimization, obtain optimal portfolio, and visualize efficient frontier. The video demo is located here:
Note that you need to download labelpoints from FileExchange too.

Cite As

MathWorks Quant Team (2021). Getting Started with Portfolio Optimization (Files for Video Demo) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (17)

Travis Shelton

Great product! Where can you retrieve newer Dow Jones data or other indices such as the Nasdaq or S&P in this format that was used for the example?

Chanho Park

MathWorks Quant Team

Not sure which version of MATLAB that you are using? However, I've tested the code in R2019b. It can run. Please contact our tech support for more details in case that you use R2016a or onward and still have the issue.

Krittapas Sihapitak

p = Portfolio('AssetList',symbol,'RiskFreeRate',0.01/252);
why there is an error on this code

MathWorks Quant Team

Hi Marwa,

For converting .mlx file to .m file, it can usually be done using Live Editor in MATLAB. See here for more details:
However, you are using R2013a, which you don't have the file editor yet. I think you may try this one first.
If it's not possible, please contact our tech support.

Marwa Talbi

Please how can i convert mlx file to m file in matlab R2013a?

jieyu chen

Sisa Mayekiso

MathWorks Quant Team

Please check if you have Financial Toolbox installed or not because tick2ret is a function in the toolbox.

Nichanun S

dailyReturn = tick2ret(T{:,3:end});

I cannot use this code on running

Yatri Patel

It seems obvious but make sure you have the files and toolboxs installed before you run the code. If you do this, you can read in the excel file he used.

MathWorks Quant Team

For R2018b, the dowPortfolio.xlsx is located in ...\MATLAB\R2018b\toolbox\finance\findemostoolbox\finance\findemos

Anand Alaghu

I too am not able to locate the dowPortfolio.xlsx file on my mac. Not sure which directory the Financial tools box installation is made in.

Dzenan Smajic

Dzenan Smajic

I can not find dowPortfolio.xlsx file on my mac. Financial toolbox is installed but no file :)

Joerg Neuburger

Adam Danz

MATLAB Release Compatibility
Created with R2016a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Inspired by: labelpoints

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!