Mean-Reversion Study (Part 1)
Posted by Mark on February 9, 2016 at 04:52 | Last modified: December 8, 2015 07:58Conventional trading wisdom often suggests to “sell when the market is high and buy when the market is low.” This study is designed to see if the data support such mean-reversion activity.
If I were better versed in AmiBroker Formula Language (AFL) then I could code a simple trading system and study the performance metrics. I could look at profit factor, Sharpe ratio, % winners, MDD/CAR, etc.
Unfortunately, I remain weak in that area so I turned to the old standby: MS Excel. My plan is to use inferential statistics rather than a trading system development approach.
The study methodology is as follows:
1. Start by downloading historical price information from Yahoo!
2. Create a 23-day price oscillator. The formula for this is: Osc = 100 * (C – MIN ) / (MAX – MIN)
C = current day’s closing price
MIN = lowest closing price of last 23 trading days (including C)
MAX = highest closing price of last 23 trading days (including C)
3. Create “MFE [maximum favorable excursion] next 23 trading days” with this formula: MFE = 100 * (MAX – C) / C
MAX = highest closing price of next 23 trading days (not including C)
4. Create “MAE [maximum adverse excursion] next 23 trading days” with this formula: MAE = 100 * (MIN – C) / C
MIN = lowest closing price of next 23 trading days (not including C)
5. Divide the data by Osc score into 20 groups: Osc < 5, 5 < Osc < 10, 10 < Osc < 15… 90 < Osc < 95, Osc < 100.
6. Run a single factor ANOVA to see if MFE values varied across the 20 groups.
7. Repeat for MAE values.
Will MFE and MAE differ with respect to Osc? Mean reversion would suggest that when Osc is more overbought with values toward 100, MFE and MAE values should be lower. In the other direction, mean reversion would suggest that when Osc is more oversold with values toward 0, MFE and MAE values should be higher.
I will discuss the results next time.
Comments (1)
[…] Last time I described the methodology for a mean reversion study. Today I will discuss results. […]