Processing math: 100%

Statistical Arbitrage Week4

Portfolio Optimization

Structure of Optimizer

  • Risk Model
    • Shrinkage estimator of the covariance matrix of stock returns
  • Transaction Cost Model
    • 1bp+12bid-ask spread
  • Alpha
    • Weighted blend of various standardized, winsorized alphas

Input

  • position as of close of business on day t1
  • alphas using data observed up to day t1
  • transaction costs using data observed up to day t1
  • risk model using data observed up to day t1
  • constraints using data observed up to day t1

Objectives & Constraints

  • Minimize risk: xΣx
  • Maximize exposure to alpha: αx
  • Neutralize exposure to beta: βx=0
  • Minimize transaction costs: τ|xw|
  • Other constraints:
    • maximum trade size
    • maximum position size
    • maximum industry and country exposure
  • Notations
Variable Dimension Definition
x n×1 desired portfolio weights
w n×1 initial portfolio weights
Σ n×n covariance matrix of stock returns
α n×1 aggregate alphas
β n×1 historical betas
τ n×1 transaction costs

The parametric problems formed as:

maxxαxλτ|xw|μxΣx

subject to:

  • beta neutrality: βx=0
  • max trade and position: γxδ
    • Max trade size for ith stock: θi
      • wiθixiwi+θi
    • Max position size for ith stock: \pi_i
      • πixiπi
  • industry constraint: r1Rxr1
    • Sectors are a factor of risk
    • Difficult to time sector performance
    • Constrain industry exposure
    • But not to zero (will incur transaction cost)
    • r=$300,000 limit for $50×50M book size
    • Industry Dummy
      • ρ industries
      • Boolean matrix R of dimension n×ρ
      • R(i,j)=1 if ith stock belongs to jth industry else 0
      • Every row of matrix R has exactly one entry equal to 1; all other entries are equal to 0
  • country constraint: f1Fxf1
    • Countries are a factor of risk
    • Difficult to time country performance
    • Constrain country exposure
    • But not to zero (will incur too much transaction cost)
    • f=$100,000 limit for $50×50M book size
    • Industry Dummy
      • φ industries
      • Boolean matrix F of dimension n×φ
      • F(i,j)=1 if ith stock belongs to jth industry else 0
      • Every row of matrix F has exactly one entry equal to 1; all other entries are equal to 0

Output

trade to be executed on day t

Final position(t+1)=Final position(t)+trade(t)

Backtest Process

  1. Load all necessary data into memory
  2. Create the alphas
  3. Start from portfolio with zero dollar invested
  4. Loop over all days in backtest period
    • Every day: call optimizer to find optimal rebalancing trade given initial position
    • End-of-day position becomes initial position of next day
  5. Compute P&L