File Exchange

image thumbnail

CVaR Portfolio Optimization

version (4.63 KB) by

Conditional Value at Risk (CVaR) portfolio optimization with the PortfolioCVaR object



View License

This example shows a portfolio optimization workflow. Data is imported for large- and small-cap stocks and bond ETF's, then used as scenarios for a CVaR portfolio optimization. A mean-variance portfolio optimization is given for reference, and the efficient frontiers and asset distributions are compared.

Comments and Ratings (6)

Great introduction to CVaR portfolio optimization in Matlab. Since Yahoo closed there historical stock data API could you (Seth DeLand?) provide the matrices that are generated when using "fetch the data" segment of the program?. I want to get a sense of the matrix structure so I can start modifying the code. I'm new to Matlab and computational finance so any help would be greatly appreciated.



I am getting this error:Error using yahoo/fetch (line 387)
Unable to return historical data for given security.

Error in CVaRPortfolioOptimizationExample (line 47)
Price.(bondETFTickers{ii}) = fetch(C,bondETFTickers{ii},...


Barney (view profile)

Mosif Khan

It's a good example for the PortfolioCVaR object. I had to use tick2ret instead of price2ret.


Updated license


Minor code cleanup, fixed some typos in comments.

MATLAB Release
MATLAB 8.0 (R2012b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video