Code covered by the BSD License  

Highlights from
Portfolio Optimizer Tool

4.5

4.5 | 8 ratings Rate this file 80 Downloads (last 30 days) File Size: 522.79 KB File ID: #29807
image thumbnail

Portfolio Optimizer Tool

by Patric Schenk

 

22 Dec 2010 (Updated 03 Jan 2011)

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

Required Products Datafeed Toolbox
Financial Toolbox
Optimization Toolbox
Statistics Toolbox
MATLAB release MATLAB 7.11 (2010b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (14)
24 Dec 2010 sadel

when I am trying to run portfoliotool.fig:

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

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!!!!

16 Mar 2011 Robbie Castelijn

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

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

31 May 2011 Kate  
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');

23 Dec 2011 ??  
28 Dec 2011 Hugh

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

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.

13 Jan 2012 Loukas

Great Work!

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

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.

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

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

Please login to add a comment or rating.
Updates
03 Jan 2011

comment change

Tag Activity for this File
Tag Applied By Date/Time
data import Patric Schenk 23 Dec 2010 15:45:29
finance Patric Schenk 23 Dec 2010 15:45:29
gui Patric Schenk 23 Dec 2010 15:45:29
optimization Patric Schenk 23 Dec 2010 15:45:29
gui shailesh 22 Dec 2011 11:07:06
data import Arturo Del Moral 28 May 2012 15:46:30

Contact us at files@mathworks.com