Main Content

Estimate Efficient Portfolios and Frontiers

Analyze efficient portfolios and efficient frontiers for portfolio


PortfolioCreate Portfolio object for mean-variance portfolio optimization and analysis


expand all

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 Estimate efficient portfolio to maximize Sharpe ratio for Portfolio object
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

Examples and How To

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


Portfolio Optimization Examples


Leverage in Portfolio Optimization with a Risk-Free Asset


Mixed-Integer Quadratic Programming Portfolio Optimization: Problem-Based

This example shows how to solve a Mixed-Integer Quadratic Programming (MIQP) portfolio optimization problem using the problem-based approach.

Portfolio Optimization with Semicontinuous and Cardinality Constraints


Black-Litterman Portfolio Optimization


Portfolio Optimization Using Factor Models



Portfolio Object Workflow


Choosing and Controlling the Solver for Mean-Variance Portfolio Optimization

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