Portfolio optimization tool and GUI "Too many input arguments"
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi, I'm learning about OOP in Finance and found out this great webinar from 2010 called "Build a Portfolio Analysis Application using Object Oriented Programming Techniques". I'm trying to run the code (originally written in 2010a) in 2017b and I'm stucked with the warning "Too Many Input Arguments". I Traced the error source to a Callback of the GUI that executes a method called computeEfficientFrontier(this,constraintSet). The function takes only 1 argument outside the Object definition and only 1 argument (a Matrix) was passed, neverttheless I keep getting the Warning and the code aborts. Can somebody help me out with this..., Here's the code:
function error_msg = compute_EfficientFrontier(this,constraintSet)
% Compute efficient frontier
% constraintSet: optional constraints matrix (e.g. from portcons)
% error_msg: contains error message in case of failure, empty otherwise
% predefine output
error_msg = [];
% only run if data available
if isempty(this.prices(:,this.assetselection))
error_msg = 'No data available';
return
end
%%And the callback that triggers the warning:
% Optimize portfolios
msg = handles.model.computeEfficientFrontier(conSet);
if ~isempty(msg)
% enable control
set(handles.button_portopt_computeefficientfrontier,'Enable','on');
msgbox(msg,'Warning');
return
end
댓글 수: 3
답변 (1개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Portfolio Optimization and Asset Allocation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!