Case Study: Portfolio Optimization with Probabilistic Constraint and Fixed and Proportional Transaction Costs

Back to main page

Case study background and problem formulations

Instructions for optimization with PSG Run-File, PSG MATLAB Toolbox, PSG MATLAB Subroutines and PSG R.

PROBLEM 1: problem_spm_cardinality
Minimize Variance (minimizing variance of annualized portfolio return)
subject to
Pr_pen ≤ Const (probability constraint)
Linear + Cardn_pos ≤ 1 (budget constraint)
Avg_g – Linear – Cardn_pos ≤ Const (expected returns constraint)
Box constraints (lower and upper bounds on weights)
——————————————————————–
Pr_pen = probability exceeding penalty for loss
Cardn_pos = cardinality positive function
Avg_g = average gain
Box constraints = constraints on individual decision variables
——————————————————————–

# of Variables # of Scenarios Objective Value Solving Time, PC 3.14GHz (sec)
Dataset1 100 120 0.00006 0.39
Environments
Run-File Problem Statement Data Solution
Matlab Toolbox Data
Matlab Subroutines Matlab Code Data
R R Code Data
Download other datasets in Run-File Environment.
Instructions for importing problems from Run-File to PSG MATLAB.

Problem Datasets # of Variables # of Scenarios Objective Value Solving Time, PC 2.83GHz (sec)
Dataset2 Problem statement Data Solution 200 120 0.00007 2.77
Dataset3 Problem statement Data Solution 500 120 0.00012 20.32
Dataset4 Problem statement Data Solution 1000 120 0.00032 232.00
Dataset5 Problem statement Data Solution 2000 120 0.00052 85.36
PROBLEM 2: problem_spm_cardinality_2
Minimize Variance (minimizing variance of annualized portfolio return)
subject to
Pr_pen ≤ Const (probability constraint)
Linear + Cardn_pos ≤ 1 (budget constraint)
Avg_g – Linear – Cardn_pos ≤ Const (expected returns constraint)
Cardn_pos – Variable_u ≤ 0 (constraint with variable bounding cardinality)
Box constraints (lower and upper bounds on weights)
——————————————————————–
Pr_pen = probability exceeding penalty for loss
Cardn_pos = cardinality positive function
Avg_g = average gain
Box constraints = constraints on individual decision variables
——————————————————————–

# of Variables # of Scenarios Objective Value Solving Time, PC 3.14GHz (sec)
Dataset 100 120 0.000056 1.30
Environments
Run-File Problem Statement Data Solution
Matlab Toolbox Data
Matlab Subroutines Matlab Code Data
R R Code Data
Download other datasets in Run-File Environment.
Instructions for importing problems from Run-File to PSG MATLAB.

Problem Datasets # of Variables # of Scenarios Objective Value Solving Time, PC 2.83GHz (sec)
Dataset2 Problem statement Data Solution 200 120 0.00002 3.18
Dataset3 Problem statement Data Solution 500 120 0.00036 39.83
Dataset4 Problem statement Data Solution 1000 120 0.0011 267.14
Dataset5 Problem statement Data Solution 2000 120 0.0016 300.88
CASE STUDY SUMMARY
This case study considers a probabilistic portfolio optimization problem with a variance objective function, a probability constraint, an expected return constraint and a budget constraint with proportional linear transaction costs and fixed transaction costs. The standard stochastic programming problem with fixed transaction cost is a mixed-integer problem with Boolean variables. We use cardinality function for assigning fixed transaction cost for instruments with non-zero positions (non-zero positions are defined by exceeding some small threshold). With cardinality functions we do not need to introduce additional discrete variables (but cardinality function is not convex, and numerically the problem has the same complexity as problem with integer variables). There are two slightly different problem statements in this case study: 1) Problem 1, where probability constraint does not include transaction costs, 2) Problem 2 with transaction costs included in the probability constraint.
The considered problems are similar to the problem discussed in Bonami and Lejeune (2009). However, the problem statement in Bonami and Lejeune (2009) does not include constraint on expected return. This may lead to very risky portfolio which may “blow up” under certain market conditions. For instance, the “selling naked short options” strategy satisfies the probabilistic constraints requiring that majority of time the strategy is profitable, but may have high losses, when market goes down.
The problem is solved for datasets containing 100, 200, 500, 1000, and 2000 assets. 120 scenarios are built for each asset. Data refers to monthly returns of securities.
For more details on portfolio optimization problem with transactions costs see, for instance Lobo et al. (2007). For more details on optimization problems under stochastic and integer constraints see, for instance, Bonami and Lejeune (2009).
References
• Bonami, P., Lejeune, M.A. (2009): Portfolio Optimization Problems Under Stochastic and Integer Constraints, Operations Research 57(3), pp. 650–670.
• Lobo, M., Fazel, M. and Boyd, S. (2007): Portfolio optimization with linear and fixed transaction costs, Annals of Operations Research 152(1), pp. 341-365.