A simple (basic) setup of single-period portfolio optimization problem with risk measured by CVaR.
Problem 1: Minimization of Conditional Value-at-Risk subject to constraint on linear function (expected return) and constraint on linear function (budget constraint).
Problem 2: This problem is a slightly modified Problem 1. To prevent possible infeasibility we have added to the performance function a compensation variable assuring feasibility. Minimization of weighted average of Conditional Value-at-Risk and penalty on compensation variable subject to constraint on linear function (expected return) and constraint on linear function (budget constraint).
Problem 3: Maximization of linear function (expected return) subject to constraint on Conditional Value-at-Risk and constraint on linear function (budget constraint).
Problem 1. CVaR minimization with budget constraint and constraint on the protfolio mean return
Mathematical Problem Statement
Problem dimension and solving time
Solution in Run-File Environment
Solution in MATLAB Environment
Mathematical Problem Statement
Problem dimension and solving time
Solution in Run-File Environment
Solution in MATLAB Environment
Mathematical Problem Statement
Problem dimension and solving time
Solution in Run-File Environment
Solution in MATLAB Environment
Portfolio optimization has come a long way from when Markowitz’s (1952) seminal work suggested the mean/variance framework. The Markowitz problem addresses the trade-off between mean and variance of a portfolio return. In the original formulation, the problem is to find a minimum-variance portfolio under the constraint of mean return. Variance is not a good measure of risk for asymmetric distributions. Conditional Value-at-Risk (CVaR) (see Rockafellar and Uryasev (2000, 2002)) takes into account only the downside part of the distribution and it has nice mathematical properties (a coherent risk measure). One of the advantages of the CVaR approach is that it solves the portfolio optimization problem without normal assumption on distribution of market risk factors. This assumption is violated in most markets, where distribution of market risk factors is characterized by fat tails, skewness and high dependence among extreme events. Moreover, the CVaR approach can be easily implemented within a more complex approach to the portfolio optimization problem, where the portfolio manager blends his subjective views on the market with a prior market distribution (see, Meucci (2005a, 2005b)). This case study implements the portfolio optimization problem described by Meucci (2005b). This project also demonstrates how to handle possible infeasibility of the constraints by adding the compensation variables.
We provide three equivalent formulations for the generation of the efficient frontier: mean return versus risk (measured by ) of a portfolio.
CVaR minimization with budget constraint and constraint on the protfolio mean return.
Minimize Cvar_risk (minimizing portfolio CVaR)
subject to
Linear = 1 (budget constraint)
AVG(Gain)>= Const (constraint on the portfolio mean return)
Box constraints (non-negativity)
where
CVaR(Loss) = conditional value-at-risk of random loss function
AVG(Gain) = expected value of random gain (-Loss) function
Linear = linear (non-random) function in decision variables
Box constraints = constraints on individual decision variables
Mathematical Problem Statement
Problem dimension and solving time
Number of Variables |
4 |
Number of Scenarios |
10,000 |
Objective Value |
0.054853 |
Solving Time (sec) |
0.02 |
Solution in Run-File Environment
Input Files to run CS:
Output Files:
Solution in MATLAB Environment
Solved with PSG MATLAB subroutines riskprog, riskconstrprog and function mpsg_solver (General (Text) Format of PSG in MATLAB):
Input Files to run CS:
CVaR minimization with budget constraint and constraint on the protfolio mean return with penalty.
Minimize [lambda*xa + Cvar_risk] (minimizing weighted average of risk and penalty)
subject to
Linear = 1 (budget constraint)
AVG(Gain) + xa >= Const (constraint on the portfolio mean return combined with penalty variable xa)
Box constraints (non-negativity)
Mathematical Problem Statement
Incoming data and solution details
Number of Variables |
5 |
Number of Scenarios |
10,000 |
Objective Value |
0.054853 |
Solving Time (sec) |
0.02 |
Solution in Run-File Environment
Input Files to run CS:
• | Problem Statement (.txt file) |
Output Files:
Solution in MATLAB Environment
Solved with PSG MATLAB subroutines riskprog, riskconstrprog and function mpsg_solver (General (Text) Format of PSG in MATLAB):
Files needed to solve CS in MATLAB Environment:
Avg_g maximization with budget constraint and constraint on the protfolio mean return with penalty.
Maximize Avg_g (maximizing portfolio mean return)
subject to
Cvar_risk ≤ Const (CVaR constraint)
Linear = 1 (budget constraint)
Box constraints (no short constraints)
Mathematical Problem Statement
Incoming data and solution details
Number of Variables |
4 |
Number of Scenarios |
10,000 |
Objective Value |
0.001050 |
Solving Time (sec) |
0.01 |
Solution in Run-File Environment
This CS is solved using PSG Run-file Environment prepared in General (Text) Format of PSG.
For more details see:
Files needed to solve CS in Run-File Environment:
• | Problem Statement (.txt file) |
Output Files:
Solution in MATLAB Environment
Solved with PSG MATLAB subroutines riskprog, riskconstrprog and function mpsg_solver (General (Text) Format of PSG in MATLAB):
Files needed to solve CS in MATLAB Environment:
[1] Rockafellar, R. T. and S. Uryasev (2000): Optimization of Conditional Value-At-Risk, The Journal of Risk, Vol. 2, No. 4, pp. 21-51.
[2] Rockafellar, R.T. and S. Uryasev (2002): Conditional Value-at-Risk for General Loss Distributions, Journal of Banking and Finance, 27/7.
[3] Meucci, A. (2005a): Beyond Black-Litterman: Views on Non-Normal Markets, (November 2005).