▶ Full Post Text
Hello r/algotrading,
I have been developing my retail stat-arb strategy for the past 5 months, and wanted to share the progress, with the hopes of getting back some execution insights to hopefully not succumb to the sunk-cost fallacy.
My python library pipeline follows:
1. Find candidate asset pairs (daily data) \[\~1s\],
2. Find tradable spreads \[5-15s\],
3. Fit a physics-based Kalman filter (OU + hetereoscedasticity) \[4-10mins\]
4. Optimize the trading thresholds (MC + multi-objective) \[1-3mins\].
Let me give you an example, using Alpaca ETF data, 2025/02 - 2025/07 (6 months train) --> 2025/11 (6 months test). Based on IS data (2.5bps cost), one of the spreads I obtain ( SRLN-BKLN pair) has a 26bps/month expected return, where OOS agrees with 24bps/month. i.e. miniscule returns.
[The plot shows the return cumsum \(above\) and the Kalman spread with the optimal hetereoscedastic trade thresholds \(below\). These boundaries are chosen w.r.t objective stability, and, are cost aware \(alpha decay curve\).](https://preview.redd.it/slz8m3xs5j6h1.png?width=1666&format=png&auto=webp&s=b2dd8ef4307f15383317dd3bd261b11d1a8ed76e)
Since single-pair annualised returns cannot beat the S&P500, my idea was to run multiple pairs (starting off at 15 pair cap due to Alpaca's free tier limitations). However, not all pairs are created equal, and, it is not like my algorithm creates them in excess e.g. for the example above it distilled a universe of 2392 assets --> 127 candidate pairs --> 3 tradable pairs.
My next steps were to explore ETF-stock combinations, in hopes of expanding my universe and expected return per trade. But, I am still unsure as to how proceed with the live trading implementation side. I have critical unknowns and I was hoping someone with more experience could help me with:
A. Slippage and fill price related problems e.g., remote server close to the exchange, strategy capacity, etc...
B. Metric for discarding a pair, triggering a re-search of the universe.e.g., time-based, pnl-based, etc...
C. Fully or partially automated process.
D. Anything I am oblivious to that you caught.
Any advise and/or literature reference is much appreciated!