Main Content

Portfolio Analysis

Analyze portfolio for returns variance and covariance, simulate correlation of assets, calculate portfolio value at risk (VaR)

Functions

ewstats Expected return and covariance from return time series
frontier Rolling efficient frontier
portalloc Optimal capital allocation to efficient frontier portfolios
portror Portfolio expected rate of return
selectreturn Portfolio configurations from 3-D efficient frontier
targetreturn Portfolio weight accuracy
portrand Randomized portfolio risks, returns, and weights
portopt Portfolios on constrained efficient frontier
portsim Monte Carlo simulation of correlated asset returns
portstats Portfolio expected return and risk
portvar Variance for portfolio of assets
portvrisk Portfolio value at risk (VaR)
periodicreturns Periodic total returns from total return prices
totalreturnprice Total return price time series
rollingreturns Period-over-period rolling returns or differences from prices
addBusinessCalendar Add business calendar awareness to timetables

Examples and How To

Portfolio Construction Examples

These examples show how to construct portfolios on the efficient frontier.

Portfolio Selection and Risk Aversion

One of the factors to consider when selecting the optimal portfolio for a particular investor is the degree of risk aversion.

Active Returns and Tracking Error Efficient Frontier

This example shows how to minimize the variance of the difference in returns with respect to a given target portfolio.

Plotting an Efficient Frontier Using portopt

This example plots the efficient frontier of a hypothetical portfolio of three assets.

Plotting Sensitivities of an Option

This example creates a three-dimensional plot showing how gamma changes relative to price for a Black-Scholes option.

绘制敏感性的一个港口folio of Options

This example plotsgammaas a function of price and time for a portfolio of 10 Black-Scholes options.

portopt Migration to Portfolio Object

These examples show how to migrateportoptto a Portfolio object.

frontcon Migration to Portfolio Object

These examples show how to migratefrontconto a Portfolio object.

Concepts

Analyzing Portfolios

For portfolios constructed from a fixed set of assets, the risk and return profile varies with the portfolio composition.

Portfolio Optimization Functions

Financial Toolbox™ functions for portfolio optimization.