This is statistical arbitrage strategy based on divergence of stock returns. The aim is to create a beta neutral position when divergence is observed.
For back-testing, I have used 6 IT stocks from S&P 500 companies, namely Apple Inc. (AAPL), Microsoft Corporation (MSFT), Amazon.com Inc. (AMZN), Alphabet Inc. Class A (GOOGL), Accenture (ACN) and Adobe (ADBE).
Following are the steps for the strategy:
Calculations required
Every day, at market open, I calculate the historical volatility of the stocks as well as the benchmark (SPY) based on last one month's data, and calculate beta with respect to the benchmark for every stock.
Every day, 5 minutes before the market closes, I compute the divergence of every stock. Divergence is calculated is the difference between the stock's daily percentage return and the expected return of the stock based on its beta (Expected Return = (Benchmark Return*Stock Beta)).
Entry Rules
3. Once I have the divergence for every stock, I find the stocks with maximum and minimum divergence values. Then if the maximum divergence value is more than 1% or minimum divergence value is less than -1%, I short the stock with maximum divergence value, and long the stock with minimum divergence value.
Exit and Stop Loss Rule
In case the position is taken on the basis of maximum divergence value, then I square off my positions when the divergence of the stock with maximum divergence (at the time of entry) becomes less than or equal to 1/10th of divergence at the time of entry or when the the divergence of the stock with maximum divergence (at the time of entry) becomes more than or equal to 2 times the divergence at the time of entry.
Similarly, in case the position is taken on the basis of minimum divergence value, then I square off my positions when the divergence of the stock with minimum divergence (at the time of entry) becomes more than or equal to 1/10th of divergence at the time of entry or when the the divergence of the stock with minimum divergence (at the time of entry) becomes less than or equal to 2 times the divergence at the time of entry.