File Exchange

image thumbnail

CVaR Portfolio Optimization

version 2.0.0 (263 KB) by Kawee Numpacharoen
Conditional Value at Risk (CVaR) portfolio optimization with the PortfolioCVaR object

37 Downloads

Updated 18 Sep 2018

View License

This example shows a Conditional Value at Risk (CVaR) portfolio optimization workflow, which includes:
* How to simulate asset scenarios based on normal distribution and the empirical distribution
* How to construct a portfolio using PortfolioCVaR object
* How to evaluate the efficient frontier
* How to extract the portfolio weights
* How to calculate CVaR of the portfolio

Comments and Ratings (8)

ding wei

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.

Adam

Hello,

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

Mosif Khan

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

Updates

2.0.0

Major update for the example using newer capabilities of MATLAB and Toolboxes

1.3.0.1

Updated license

1.3.0.0

Minor code cleanup, fixed some typos in comments.

MATLAB Release Compatibility
Created with R2018a
Compatible with R2018a to any release
Platform Compatibility
Windows macOS Linux

Discover Live Editor

Create scripts with code, output, and formatted text in a single executable document.


Learn About Live Editor