Main Content

Custom Portfolio Optimization

Estimate optimal portfolio, specify user-defined objective function, define constraints

Use a Portfolio object with the estimateCustomObjectivePortfolio function to compute the solution to a custom objective problem. The estimateCustomObjectivePortfolio function receives a function handle with the user-defined objective function and returns a vector of portfolio weights. Also, you can use constraints for the Portfolio object, such as linear equality and inequality, bound, budget, group, group ratio, turnover, and tracking error constraints.

Objects

PortfolioCreate Portfolio object for mean-variance portfolio optimization and analysis

Functions

expand all

setBoundsSet up bounds for portfolio weights for portfolio
setGroupsSet up group constraints for portfolio weights
setMinMaxNumAssetsSet cardinality constraints on the number of assets invested in a portfolio
setGroupRatioSet up group ratio constraints for portfolio weights
setEqualitySet up linear equality constraints for portfolio weights
setInequalitySet up linear inequality constraints for portfolio weights
setBudgetSet up budget constraints for portfolio
setOneWayTurnoverSet up one-way portfolio turnover constraints
setTurnoverSet up maximum portfolio turnover constraint
setTrackingErrorSet up maximum portfolio tracking error constraint
estimateCustomObjectivePortfolio Estimate optimal portfolio for user-defined objective function for Portfolio object (Since R2022b)

Topics