Sei sulla pagina 1di 10

Contrarian Z-Score

Related Files
Download Files

By Alexandra Guevara
Market Technician, TradeStation Labs
TSLabs@TradeStation.com
Summary
Standard deviation is a common statistical calculation that is often used in the world of finance to measure risk. The
higher the standard deviation, the higher the overall risk or volatility. However, standard deviation can also be used as
a basis for mean-reversion trading strategies.
In this Analysis Concepts paper, we will introduce a strategy and indicator that use standard deviation to calculate a
z-score. A z-score is simply the number of standard deviations separating the current price from the mean price. The
strategy then looks at the momentum of the average z-score and takes a contrarian approach to trading to generate
buy and sell signals.
Calculation
If the z-score is positive, it means that the current price of the security is above its mean. Correspondingly, if the z-
score is negative, the current price of the security is below its mean. In essence, plotting the z-score will generate a
line that looks similar to the price data. See Figure 1 below for an example. Notice how closely peaks and troughs in
the average z-score match peaks and troughs in the price data.
Figure 1 - Average Z-Score

The next part of the strategy applies the momentum indicator to the average z-score. Taking a contrarian perspective,
if the average z-score momentum is positive, the strategy sells short. If the average z-score momentum is negative,
the strategy will go long. As might be expected with a contrarian strategy, the strategy generates more winning trades
than losing trades, though the average losing trade is larger than the average winning trade. The strategy is likely to
perform better in oscillating (trading range) markets than in trending markets.
The indicator will plot both the average z-score and the average z-score momentum. The momentum is plotted as a
histogram. Notice in Figure 2 below that when the momentum is positive, the histogram is red. When momentum is
negative, the histogram is green. Figure 2 also displays strategy sample trades. When the average z-score
momentum changes from negative to positive, the strategy will sell short, whereas when it changes from positive to
negative, the strategy will buy. The strategy and indicator are meant to be used on a daily interval. As demonstrated
here, the strategy is applied to various major market ETFs, particularly the S&P Depository Receipts (SPY).
Figure 2 - Strategy Sample Trades
Strategy Settings
* Trade size is based on a fixed dollar trade amount of $10,000. This is done with the Dollars per trade setting in the
Properties for All Strategies on this Chart dialog.
Strategy Style Short Term

Asset Type Stocks

Traded Symbol SPY - S&P Depository Receipts

Data Interval Daily

Period Tested 18 years

Defining Strategy Rules


Long Entry and Short Exit
Buy or buy to cover when the momentum of the average z-score is negative.
Short Entry and Long Exit
Sell short or sell when the momentum of the average z-score is positive.
Strategy Inputs
Name Default Description

Length 10 Length used to calculate standard deviation, average price, and average z-score.

MomLen 5 Length used to calculate momentum of the average z-score.

There are two inputs in both the strategy and the indicator; both are lengths used to calculate all of the variables. The
first input, "Length," is used to calculate the majority of the variables, including the standard deviation of the closing
price, the exponential average of the closing price, and the exponential average of the z-score. The second input,
"MomLen," is the length used to calculate the momentum of the average z-score. In this case, the default lengths
used are 10 and 5. Sensitivity analysis was conducted on both inputs to make sure that the inputs chosen were not
corresponding to a peak profit.
Analysis
The z-score is one of the basic tenets of a normal distribution and is often used in conducting statistical analysis. The
further from zero the z-score, the further the current price is from its mean. Using a contrarian or mean-reversion
strategy, you would take a position opposite the current z-score. If the z-score is positive (the current price of the
security is above its mean), the strategy will take a short position. If the z-score is negative (the current price of the
security is below its mean), the strategy will take a long position.
As an additional filter, strategy signals are generated based on the momentum of the average z-score, not on the
average z-score itself. A key to generating extremely efficient trades is the inflection points or turning points of the
average z-score. Using the five-day momentum helps identify short-term turning points in the security's price
movement. Because this is a mean-reversion strategy, it performs better in oscillating markets than in trending
markets. See Figure 3 below for a highlighted example of accurate and efficient trades during an oscillating market.
While the strategy is designed to generate both long and short entries, it may be used as a long-only strategy.
Figure 3 - Contrarian Z-Score Trades in Oscillating Market

Monthly Accumulative Net Profit


Performance Summary*
In this paper, we present the results of the strategy as applied to the S&P Depository Receipts. However, this strategy
can be applied to various major markets ETFs as presented in the Portfolio Spotlight section.
Average Profit by Month
Periodical Returns: Annual
Weekly UnderWater Equity Curve
Equity Curve Detailed

Portfolio Spotlight
Symbol Description K-Ratio RINA Index Buy and Hold Return Return on Account

XLF S&P Sel Financial Spdr Fund 2.52 51.84 -38.30% 617.09%

XLE S&P Sel Energy Spdr Fund 2.79 42.18 179.27% 484.52%

MDY S&P Midcap Dep Receipts 2.51 40.42 124.63% 321.78%

KBE SPDR Series KBW Bank 4.39 36.50 -57.41% 735.72%

IWB iShares Russell 1000 Index Tru 3.01 28.31 -15.01% 468.11%

IWP iShares Russell Midcap Growth 2.99 19.79 56.67% 304.75%

Performance Spotlight
Return on Initial Capital 185.15%

Buy-and-Hold Return 173.28%

Return on Account 781.06%

Annual Rate of Return 5.89%

Profit Factor 1.36

Avg Monthly Return $202.95

Std. Deviation of Monthly Return $660.94

Net Profit / Maximum Drawdown 6.27

Weekly Underwater Equity -17.39%

Buy-and-Hold Weekly Underwater Equity -55.90%

K-Ratio 3.03

RINA Index 58.66

Strategy Strengths
The return on account of 781.06% over the approximately 18 years that the strategy was back-tested far
exceeded the buy-and-hold return of 173.28% (buying at the beginning of the testing period and holding the
security).
The K-ratio, which is a risk-adjusted performance measure, is 3.03. The higher the K-ratio, the better the
strategy in terms of risk-adjusted performance. The industry standard is 2.50.
The weekly underwater equity of the strategy, -17.39%, is much better than that experienced under the buy-
and-hold strategy for the security, -55.90%.
Average profit by month was positive 10 of the 12 months, with November being the worst-performing
month.
The detailed equity curve is fairly linear over the 18 years that the strategy was back-tested. The strategy
was back-tested over the entire period during which the security was tradeable.
Risk-adjusted performance is consistent across several ETFs, as presented in the Portfolio Spotlight table.
The net profit divided by maximum drawdown ratio was 6.27, signifying low drawdown during the back-test.
Strategy Weaknesses
Because the strategy is a mean-reversion strategy, it performs better in oscillating markets than in trending
markets.
The strategy has a smaller average winning trade, $168.27, than average losing trade ($214.21).
The standard deviation of monthly return is 326% times the average monthly return, signifying higher risk in
the strategy.
The strategy has a high number of maximum consecutive losing trades (6).
Conclusion
In this Analysis Concepts paper, we introduced a mean-reversion strategy that uses the concept of the z-score and
momentum to generate buy and sell signals. The z-score can be used to identify periods when an asset's price has
deviated from its average.
As mentioned earlier, the strategy is likely to be most effective during oscillating rather than trending markets and has
more of a short-term outlook. Strategy results are consistent across various major market ETFs, which allows you to
use the strategy across a wide range of securities. Considering that the strategy's losing trades tend to be larger than
its winning trades, the addition of money-management rules may provide a higher profit factor, as the losing trades
would be exited sooner.
Overall, the strategy uses two simple conceptsstandard deviation and momentumto create a short-term mean-
reversion strategy. The strategy is not likely to be very effective in a long-term bear or bull market when the trend is
extremely strong. However, if the trader is able to identify periods of higher volatility and oscillating markets, the
strategy may indeed lend itself to generating satisfactory risk-adjusted returns. An interesting variation to this strategy
might include an additional filter, such as the ADX, to allow trades to be generated only when the security is not
exhibiting a strong trend.

Potrebbero piacerti anche