Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

README.md

06 - Portfolio Optimization

Features: Multi-period, Transaction Costs, Short Selling

← Back to Main Repository


Overview

This portfolio optimization problem extends classical Markowitz portfolio theory to include realistic financial market features: multiple time periods, transaction costs for buying/selling assets, borrowing costs for short positions, and capital constraints.

Problem Description

We aim to find the binary decision variables $x_i \in {0,1}$ for each asset (i) that

$$ \min_{\substack{ x \in {0,1}^{n \times t}\\ y \in {0,1}^{c \times t}\\ s \in {0,1}^{b \times t} }} \sum_{t=1}^{T} \biggl( \lambda \underbrace{\sum_{i,j} \tau_{i} p_{it} x_{it} \sigma_{ijt} \tau_{j} x_{jt} p_{jt}}_{\text{risk}} - \sum_i \bigl(\underbrace{\tau_{i}(p_{it+1} - p_{it}) x_{it}}_{\text{profit}} - \underbrace{\delta p_{it} (x_{it-1} + x_{it} - 2 x_{it-1} x_{it})}_{\text{transaction cost}}\bigr) - \underbrace{\rho_c u \sum_c 2^c y_{ct}}_{\text{cash interest}} + \underbrace{\rho_s \sum_{i \in S} p_{it} x_{it}}_{\text{short selling cost}}\biggr) + \underbrace{\delta \sum_i p_{iT} x_{iT}}_{\text{liquidation cost}} $$

subject to the constraints:

$$ \sum_i \tau_i x_{it} + \sum_c 2^c y_{ct} = C \quad \forall t \in {1,...,T} \quad \quad {\text{capital limit}} $$

$$ \sum_i x_{it} + \sum_b 2^b s_{bt} = B \quad \forall t \in {1,...,T} \quad \quad {\text{number of assets limit}} $$

Here, $p_{i,t}$ represents the price of one unit of asset $i$ at time $t$, and $\sigma_{ij,t}$ denotes the covariance between stocks $i$ and $j$ at time $t$. We denote by $\delta$ the transaction cost rate applied to both buying and selling. We have a short-selling indicator $\tau \in {-1, +1}$, where $-1$ indicates a short position and $+1$ a long position. Our model includes a borrowing cost rate for short sales, denoted by $\rho_s$. We introduce slack variables $s_{bt} \in {0,1}$ for $b \in {0, \ldots, \lfloor \log_2 B \rfloor}$ to cap the total number of assets, and use slack variables $y_{ct} \in {0,1}$ for $c \in {0, \ldots, \lfloor \log_2 C \rfloor}$ to help restrict the total available cash to not exceed $C$ units.

Directory Contents

  • instances/ - Portfolio optimization instances with market data
  • models/ - Mathematical model formulations
  • solutions/ - Optimal or best-known solutions
  • check/ - Solution verification tools
  • info/ - Additional documentation and papers
  • misc/ - Utility scripts and data generators
  • submissions/ - Community solution submissions

Related Works

References