Main Content





Portfolio创建 Portfolio 对象以进行均值-方差投资组合优化和分析



estimateFrontierEstimate specified number of optimal portfolios on the efficient frontier
estimateFrontierByReturnEstimate optimal portfolios with targeted portfolio returns
estimateFrontierByRiskEstimate optimal portfolios with targeted portfolio risks
estimateFrontierLimitsEstimate optimal portfolios at endpoints of efficient frontier
plotFrontierPlot efficient frontier
estimateMaxSharpeRatio 估计有效投资组合以最大化 Portfolio 对象的夏普比率
estimatePortSharpeRatioEstimate Sharpe ratio of given portfolio weights for Portfolio object
estimatePortMoments Estimate moments of portfolio returns for Portfolio object
estimatePortReturnEstimate mean of portfolio returns
estimatePortRiskEstimate portfolio risk according to risk proxy associated with corresponding object
setSolverChoose main solver and specify associated solver options for portfolio optimization
setSolverMINLPChoose mixed integer nonlinear programming (MINLP) solver for portfolio optimization


Estimate Efficient Portfolios for Entire Efficient Frontier for Portfolio Object

The most basic way to obtain optimal portfolios is to obtain points over the entire range of the efficient frontier.

Obtaining Endpoints of the Efficient Frontier

Determine the range of returns from minimum to maximum to refine a search for a portfolio with a specific target return.

Obtaining Efficient Portfolios for Target Returns

To obtain efficient portfolios that have targeted portfolio returns, use the estimateFrontierByReturn function.

Obtaining Efficient Portfolios for Target Risks

To obtain efficient portfolios that have targeted portfolio risks, use the estimateFrontierByRisk function.

Efficient Portfolio That Maximizes Sharpe Ratio

Portfolios that maximize the Sharpe ratio are portfolios on the efficient frontier that satisfy several theoretical conditions in finance.

Estimate Efficient Frontiers for Portfolio Object

Given any portfolio, the functions estimatePortReturn, estimatePortRisk, and estimatePortMoments provide estimates for the return and risk.

Plotting the Efficient Frontier for a Portfolio Object

The plotFrontier function creates a plot of the efficient frontier for a given portfolio optimization problem.

Asset Allocation Case Study

This example shows how to set up a basic asset allocation problem that uses mean-variance portfolio optimization with a Portfolio object to estimate efficient portfolios.

Portfolio Optimization Examples

The following sequence of examples highlights features of the Portfolio object in the Financial Toolbox™.

Leverage in Portfolio Optimization with a Risk-Free Asset

This example shows how to use the setBudget function for the Portfolio class to define the limits on the sum(AssetWeight_i) in risky assets.


此示例说明如何使用基于问题的方法来求解混合整数二次规划 (MIQP) 投资组合优化问题。

Portfolio Optimization with Semicontinuous and Cardinality Constraints

This example shows how to use a Portfolio object to directly handle semicontinuous and cardinality constraints.

Black-Litterman Portfolio Optimization

This example shows the workflow to implement the Black-Litterman model with the Portfolio class.

Portfolio Optimization Using Factor Models

This example shows two approaches for using a factor model to optimize asset allocation under a mean-variance framework.


Portfolio Object Workflow

Portfolio object workflow for creating and modeling a mean-variance portfolio.

Choosing and Controlling the Solver for Mean-Variance Portfolio Optimization

The default solver for mean-variance portfolio optimization is lcprog.