Strategy

1 Pair Trading Strategy Overview

Trading Setup
  • Data Frequency: Daily resolution
  • Hedge Ratio Update: Every two weeks
  • Cointegration Test Frequency: Every two weeks
  • Trading Session Timeout: 10 days

2 Strategy Logic

  1. Calculate Hedge Ratio Compute the hedge ratio \(\beta_i\) based on the past 20 days of log prices: \[ \beta_i = \frac{\text{Cov}(\log P_{\text{RIVN}}, \log P_{\text{TSLA}})}{\text{Var}(\log P_{\text{TSLA}})} \]

  2. Compute Spread \[ \text{Spread}_t = \log(P_{\text{RIVN}, t}) - \beta_i \cdot \log(P_{\text{TSLA}, t}) \]

  3. Cointegration Test Test 60-day rolling window of log prices for cointegration using the ADF test.

  4. Z-Score Based Trading Rules If cointegration is statistically significant:

    • Entry: if \(Z > 2\) or \(Z < -2\)
    • Exit: if \(|Z| < 0.5\)
    • Stop Loss: if \(|Z| > 3\)
  5. Trading Session Timeout Force close any open positions after 10 trading days.

3 Blotter (Example)

4 Graphs

4.1 TSLA vs. RIVN Stock Log Prices

4.2 Rolling ADF Test on Spread (window=60)

4.3 Spread and Trade Entry/Exit Points

4.4 PnL Over Time