# Case Study: Portfolio Optimization, CVaR vs. ST_DEV

Back to main page

Case study background and problem formulations

Instructions for optimization with PSG Run-FilePSG MATLAB Subroutines and PSG R.

PROBLEM 1: problem_min_cvar_dev_2p9

Minimize Cvar_dev (minimizing portfolio Cvar deviation)
subject to
Linear = 1 (budget constraint)
Linear ≥ Const (constraint on the portfolio rate of return)
Box constraints (lower bounds on weights)
——————————————————————–
Cvar_dev = CVaR Deviation for Loss
Box constraints = constraints on individual decision variables

——————————————————————–

Data and solution in Run-File Environment

Problem Datasets # of Variables # of Scenarios Objective Value Solving Time, PC 2.66GHz (sec)
Dataset1 Problem Statement Data Solution 10 1,000 0.03631774 <0.01
Data and solution in MATLAB Environment

Problem Datasets # of Variables # of Scenarios Objective Value Solving Time, PC 3.50GHz (sec)
Dataset1 Matlab code Data Solution 10 1,000 0.0363177 <0.01
Data and solution in R Environment

Problem Datasets # of Variables # of Scenarios Objective Value Solving Time, PC 3.50GHz (sec)
Dataset1 R code Data 10 1,000 0.0363177 <0.01

PROBLEM 2: problem_st_dev_covariances_2p9

Minimize Sqrt_quadratic (minimizing risk measured by standard deviation calculated with the covariance matrix))
subject to
Linear = 1 (budget constraint)
Linear ≥ Const (constraint on the portfolio rate of return)
Box constraints (lower bounds on weights)
——————————————————————–
Sqrt_quadratic = PSG function which implements Standard Deviation calculated with covariance matrix
Box constraints = constraints on individual decision variables

——————————————————————–

Data and solution in Run-File Environment

Problem Datasets # of Variables # of Scenarios Objective Value Solving Time, PC 2.66GHz (sec)
Dataset1 Problem Statement Data Solution 10 10 * 10 0.00874964 <0.01
Data and solution in MATLAB Environment

Problem Datasets # of Variables # of Scenarios Objective Value Solving Time, PC 3.50GHz (sec)
Dataset1 Matlab code Data Solution 10 10 * 10 0.00874964 <0.01
Data and solution in R Environment

Problem Datasets # of Variables # of Scenarios Objective Value Solving Time, PC 3.50GHz (sec)
Dataset1 R code Data 10 10 * 10 0.00874964 <0.01

PROBLEM 3: problem_st_dev_scenarios_2p9

Minimize St_dev (minimizing risk measured by standard deviation calculated with the matrix of scenarios)
subject to
Linear = 1 (budget constraint)
Linear ≥ Const (constraint on the portfolio rate of return)
Box constraints (lower bounds on weights)
——————————————————————–
St_dev = Standard Deviation
Box constraints = constraints on individual decision variables

——————————————————————–

Data and solution in Run-File Environment

Problem Datasets # of Variables # of Scenarios Objective Value Solving Time, PC 2.66GHz (sec)
Dataset1 Problem Statement Data Solution 10 1,000 0.008749650 <0.01
Data and solution in MATLAB Environment

Problem Datasets # of Variables # of Scenarios Objective Value Solving Time, PC 3.50GHz (sec)
Dataset1 Matlab code Data Solution 10 1,000 0.008749650 0.02
Data and solution in R Environment

Problem Datasets # of Variables # of Scenarios Objective Value Solving Time, PC 3.50GHz (sec)
Dataset1 R code Data 10 1,000 0.008749650 0.02

CASE STUDY SUMMARY

This case study compares three setups of a single-period portfolio optimization problem when risk is measured by CVaR Deviation, Standard Deviation calculated with the matrix of scenarios, and Standard Deviation calculated with the covariance matrix. In the third setup we use sqrt_quadratic PSG function. The second and the third setups are equivalent representations of the Markowitz (1952) problem trading-off mean and variance of portfolio return. The original Markowitz problem finds a minimum-variance portfolio under restriction on mean return. Here we keep a similar setup but with the CVaR deviation as a replacement to the Standard deviation.