API Docs

Manual, tutorials and complete function reference

optimization_info

Prints optimization details (constraint violations, local optima and etc.) for an optimal portfolio.


Usage
optimization_info(portfolio)
portfolio
Portfolio object created using portfolio_create() function

Return Value
Prints summary table.
Examples
dateStart = "2014-11-17 09:30:00"
dateEnd = "2014-11-17 16:00:00"

# create portfolio
portfolio=portfolio_create(dateStart,dateEnd)
portfolio_settings(portfolio,portfolioMetricsMode="price",windowLength = "3600s", resultsSamplingInterval="60s")
portfolio_addPosition(portfolio,'AAPL',100)
portfolio_addPosition(portfolio,'C',300) 

# set optimization goals and constraints
optimizer=optimization_goal(portfolio,10000,"Return","maximize")
optimizer=optimization_constraint_beta(optimizer,"<=",0.5)

# run optimization and print optimization details
optimalPortfolio=optimization_run(optimizer) 
optimization_info(optimalPortfolio)
dateStart = '2014-11-17 09:30:00';
dateEnd = '2014-11-17 16:00:00';

% create portfolio
portfolio=portfolio_create(dateStart,dateEnd);
portfolio_settings(portfolio,'portfolioMetricsMode','price','windowLength','3600s','resultsSamplingInterval','60s')
portfolio_addPosition(portfolio,'AAPL',100)
portfolio_addPosition(portfolio,'C',300) 

% set optimization goals and constraints
optimizer=optimization_goal(portfolio,10000,'Return','maximize');
optimizer=optimization_constraint_beta(optimizer,'>=',0.5);

% run optimization and print optimal portfolio 
optimalPortfolio=optimization_run(optimizer);
optimization_info(optimalPortfolio);