# Case Study: Portfolio Optimization with Nonlinear 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_1_Trans_Costs**

Maximize Avg_g (maximizing expected portfolio gain)

subject to

Cvar ≤ Const1 (constraint on CVaR)

Polynom_abs + Linear ≤ Const2 (budget constraint (linear transaction costs,

(linear transaction costs, power coefficient in Polynom_abs function for each instrument = 1))

Box constraints (bounds on positions)

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

Avg_g = Average Gain

Polynom_abs = Polynomial Absolute

Box constraints = constraints on individual decision variables

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

# of Variables |
# of Scenarios |
Objective Value |
Solving Time, PC 3.14GHz (sec) |
||||

Dataset | 100 | 224 | 1309.67359 | 0.02 | |||
---|---|---|---|---|---|---|---|

Environments |
|||||||

Run-File | Problem Statement | Data | Solution | ||||

Matlab Toolbox | Data | ||||||

Matlab Subroutines | Matlab Code | Data | |||||

R | R Code | Data |

**PROBLEM 2: problem_2_Trans_Costs**

Maximize Avg_g (maximizing expected portfolio gain)

subject to

Cvar_risk ≤ Const3 (constraint on CVaR)

Linear + Linear ≤ Const4

Box constraints (bounds on positions)

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

Avg_g = Average Gain

Cvar_risk = CVaR Risk 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 | 200 | 224 | 1309.67065 | 0.02 |

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 | 200 | 224 | 1309.67 | 0.04 |

Data and solution in R Environment

Problem Datasets | # of Variables | # of Scenarios | Objective Value | Solving Time, PC 3.50GHz (sec) | |||
---|---|---|---|---|---|---|---|

Dataset1 | R code | Data | 200 | 224 | 1309.67 | 0.04 |

**PROBLEM 3: problem_3_Trans_Costs**

Maximize Avg_g (maximizing expected portfolio gain)

subject to

Cvar_risk ≤ Const51 (constraint on CVaR)

Polynom_abs + Linear ≤ Const6 (budget constraint,

(linear transaction costs, power coefficient in Polynom_abs function for each instrument > 1))

Box constraints (bounds on positions)

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

Avg_g = Average Gain

Cvar_risk = CVaR Risk for Loss

Polynom_abs = Polynomial Absolute

Box constraints = constraints on individual decision variables

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

# of Variables |
# of Scenarios |
Objective Value |
Solving Time, PC 3.14GHz (sec) |
||||

Dataset | 100 | 224 | 193.59187 | 1.04 | |||
---|---|---|---|---|---|---|---|

Environments |
|||||||

Run-File | Problem Statement | Data | Solution | ||||

Matlab Toolbox | Data | ||||||

Matlab Subroutines | Matlab Code | Data | |||||

R | R Code | Data |

**CASE STUDY SUMMARY**

This case study considers portfolio optimization problem with the average gain objective function, CVaR constraint, and

*nonlinear*transaction cost depending upon the total dollar value of the bought/sold assets, see, for instance Krokhmal et al., (2002, 2006). The basic portfolio optimization methodology with CVaR functions is described in Rockafellar and Uryasev (2000). For a treatment of non-convex transaction costs see Konno and Wijayanayake (1999). This case study presents two equivalent problem formulations. The first problem formulation uses nonlinear function

*polynomial_abs*to account for nonlinear transactions costs involving both short and long positions. The second problem formulation, in case of linear transaction costs, doubles number of variables and uses linear functions for accounting for transaction costs (similar to Krokhmal at al., (2002)). The first formulation may be preferable for portfolios with large number of instruments or scenarios and when transaction costs nonlinearly depend upon investments.

**References**

• Krokhmal. P., Palmquist, J., and S. Uryasev (2002): Portfolio Optimization with Conditional Value-At-Risk Objective and Constraints.

*The Journal of Risk*, V. 4, No. 2, 11-27.

• Krokhmal P. and S. Uryasev (2006): A Sample-Path Approach to Optimal Position Liquidation.

*Annals of Operations Research*, Published Online, November, 1-33.

• Rockafellar, R. T. and S. Uryasev (2000): Optimization of Conditional ValueAt-Risk,

*The Journal of Risk*, Vol. 2, No. 4, pp. 21-51.

• Konno, H. and A. Wijayanayake (2002): Portfolio optimization under D.C. transaction costs and minimal transaction unit constraints, Journal of Global Optimization, V. 22, Issue 1-4 (January), 137-154.