4.27273

4.3 | 11 ratings Rate this file 70 Downloads (last 30 days) File Size: 523 KB File ID: #29807
image thumbnail

Portfolio Optimizer Tool

by

 

22 Dec 2010 (Updated )

Portfolio Optimizer Tool

| Watch this File

File Information
Description

Files used in the Webinar: Build a Portfolio Analysis Production Application in MATLAB using Object-Oriented Programming Techniques.

The focus of this demo is to introduce the design and development of a complete MATLAB application from concept through to completion. The GUI-based tool provides functionalities to import price series from various data sources; and to define complex optimization constraints on the data. Furthermore, the tool provides extensive interactive visualization capabilities for the optimization results and key risk metrics. Finally, all relevant information is reported to Excel and PDF based documentation in a compact manner.

The focus of the demo is application development:
- Data Import
- GUI-Building/implementation of interactive graphical components
- Optimization/Risk metrics
- Object-oriented programming
- Report to Excel
- Standalone components

Acknowledgements

This file inspired Matlab For R Users In Computational Finance.

Required Products Datafeed Toolbox
Financial Toolbox
Optimization Toolbox
Statistics Toolbox
MATLAB release MATLAB 7.11 (R2010b)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (21)
21 Nov 2014 Juno

Great Package!

17 Nov 2013 David Gerhard D

Great Try. Well Thought, but there are problems for 2013b, because the output/ report and excel creating part is not complete or compatible.
I had to download data from yahoo finance manually to a excel file and imported it.

12 Jun 2013 srinivas mudavath

hi,
It will be very useful from your help.

I have downloaded the code for the
webinar "Build a Portfolio Analysis Production Application in MATLAB using Object-Oriented Programming Techniques".
i am running this code on "Matlab 2010a"

when i run portfoliotool.m, a "Portfolio Optimization Tool" GUI pops up.
in Dataimport panel,

if I select "Yahoo! finance Datafeed" in datasource and choose any of indexes that are listed in "Choose index" and when I press "download symbols" i get error saying
"No appropriate method, property, or field getElementsByTagNames for class Interface.JScriptTypeinfo_JScript_Type_Info."

if I select "Excel" and browse the file you have given "DAX.xlsx" and enter Sheet name(Sheet 1), Date Header name(Dates), Date format(mm/dd/yyyy) and when i press "Import Data" i get error saying
"Note: No date header with name "Dates" found".

I searched on these errors on google, i didn't found solutions and i tried to figure out through "callback function" then also i didn't get the solutions to the problem.
I even tried by downloading the code twice and checked whether i have made any changes in code, still i didn't find solution.

it will be a great help from your side.
thanks in advance...

15 Oct 2012 Andres Licona

I think it is a good tool as you can see what you can do with a gui as well. The Yahoo download option is not working.
I do like is the flexibility of this tool.

18 Jul 2012 Tim Maguire

Great package.

Which optimization approach are you using. Is this a general mean variance optimization or a specific derivative.

13 Jul 2012 Carlos Freyre

Figured out the earlier problem re downloading the symbols, but how do you change the available symbol indices dropdown to include DJIA, NYSE, NASDAQ, etc?

13 Jul 2012 Carlos Freyre

Looking for some a little help...I'm trying to run portfoliotool.m but can not get past downloading the symbols.
For example: I select the ^GDAX, click download button and get an error message: "no appropriate method, property or field" any help is much appreciated. Thx.

16 Mar 2012 Steven

Hi,
I've now managed to open the tool but when I try to import data from excel I get the following error. Can someone help me please? Is it important how the dates are defined in Excel?

Error using datestr (line 179)
Cannot convert input into specified date string.
DATENUM failed.

Error in portfoliotool>updateImportDataPage (line 2095)
datesstr = cellstr(datestr(dates,handles.datestringformat));

Error in portfoliotool>button_dataimport_excelfile_import_Callback (line 2293)
updateImportDataPage(handles,prices,[],dates,priceslabels,[]);

Error in gui_mainfcn (line 96)
feval(varargin{:});

Error in portfoliotool (line 25)
gui_mainfcn(gui_State, varargin{:});

Error in
@(hObject,eventdata)portfoliotool('button_dataimport_excelfile_import_Callback',hObject,eventdata,guidata(hObject))


Error while evaluating uicontrol Callback

thanks

16 Mar 2012 Steven

Hi,
I'm still unable to open the portfoliotool.m
What is the exact code to do this? And where should the file be saved?
I don't have the optimization toolbox. Is that a problem?
thanks
Steven

22 Feb 2012 Mathijs Faase

Hi Gregoire,

The portfoliotool.fig is just the description of the different components of the GUI - to actually launch it, you should use the potfolio.m file.

Without the datafeed toolbox you will still be able to use most of the tool - you will not be able to import live data, though.

02 Feb 2012 Grégoire

Hi,
Thanks!
When I load the code, and launch the portfoliotool.fig, it looks like the three pages are on the same layer and the figure is unreadable.
Anyone know how to solve this?
ps: don't have the datafeed toolbox

13 Jan 2012 Karamos

Great Work!

29 Dec 2011 Patric Schenk

@Hugh: Make sure to change the current folder in MATLAB and type "portfoliotool" in the command window to run the tool.

28 Dec 2011 Hugh

This looks interesting. I am sorry, how do I run this file?

23 Dec 2011 ??  
09 Nov 2011 Salman

Well as for the the problem related to downloading from yahoo is concerned, it can be resolved in this way..

open the file portfoliotool.m. find

tables = h.document.getElementsByTagName('table');

and replace it with

tables = h.Document.documentElement.getElementsByTagName('table');

31 May 2011 Kate  
29 Mar 2011 Andrew Li

I encountered several errors when running the programs, and really have no idea how to solve it
wish you anyone could help me. Thanx!

??? Error using ==> maxdrawdown
Too many input arguments.

Error in ==> Portfolio>Portfolio.getPerformanceMetrics at 251
metrics.maxdrawdown = maxdrawdown(pf_returns,'arithmetic');

Error in ==> portfoliotool>edit_results_riskfreerate_Callback at 1406
metrics = handles.model.getPerformanceMetrics(selection, riskfreerate/100);

Error in ==> portfoliotool>updateResultsPage/portfolioselection_callback at 695
edit_results_riskfreerate_Callback(handles.edit_results_riskfreerate, [], handles);

??? Error while evaluating line ButtonDownFcn

16 Mar 2011 Robbie Castelijn

I noticed that since a few weeks the Yahoo feed isn't working for indices like DAX , AEX etc.

26 Dec 2010 Andres Licona

I work in trading this code. I always use this type of tool and man It rocks to be a quant!!!!

24 Dec 2010 sadel

when I am trying to run portfoliotool.fig:

Unhandled internal error in guidefunction
Error using==> feval
....
....

Updates
03 Jan 2011

comment change

Contact us