Trend Following or Reversion to Mean

Yahoo Finance has an interesting article on return after n-consecutive days.

http://biz.yahoo.com/tm/070126/15384.html

Seems like this is a strong case for mean reversion methods over trend following methods. Of course if one was able to predict that n-consective days consistently led to (n+m)-consecutive days, then of course trend following would be a good method.

I'll look forward to the next article where they filter the consecutive days with a 200-day MA, and then examine returns.
 
I am writing a computer program to explore the TradingMarkets Research observations. The code that I have looks good but there might be bugs and I need to validate the program.

I am testing 5 consecutive daily sessions lower closing prices for an entry signal, exit when price is greater than the 50 session moving average. This test uses 5 % heat and stops losses at 10 % (no losses are stopped in this simulation). System trades long only. Compensations are made for commission and slippage.

Data is 13.97 years of Standard and Poors 500 index tracking stock, symbol SPY.

Number of trades 14
Total profit $ 5979
Profit after subtracting $ 10.00 commission, slippage per transaction: $ 5699
Heat is 5.00 per cent of equity.
Greatest drawdown is 0.0172 (1.72 per cent).
Cumulative Annual Growth Rate (CAGR) is 0.41 per cent.
CAGR / Drawdown is 0.24
Instantaneously Compounding Annual Growth Rate (ICAGR) is 0.40 per cent.
Annually Compounding Annual Growth Rate (ACAGR) is 0.40 per cent.
Information Ratio is 0.54
Initial capital is $ 100000
 

Attachments

markets change

volatility is of course cyclical

and the market (which is everybody's aggregate decisions) necessarily adapts.

the 90's were a higher volatility market, and also a market where mean reversion was not as successful

this aint yer daddy;s bull market

it is a great means reversion market now.
 
when i ran your strategy it worked over the last few years.

History of the portfolio :
--------------------------
Long position (0) on spy
2004-07-20 Buy 100 at 110.5300
2004-08-26 Sell 100 at 110.9600
Long position (1) on spy
2004-08-09 Buy 100 at 107.0200
2004-08-26 Sell 100 at 110.9600
Long position (2) on spy
2005-01-05 Buy 100 at 118.7400
2005-01-13 Sell 100 at 118.6400
Long position (3) on spy
2005-01-06 Buy 100 at 118.4400
2005-01-13 Sell 100 at 118.6400
Long position (4) on spy
2005-01-25 Buy 100 at 116.9100
2005-02-02 Sell 100 at 119.0600
Long position (5) on spy
2005-09-16 Buy 100 at 123.2800
2005-10-03 Sell 100 at 122.9600
Long position (6) on spy
2005-10-07 Buy 100 at 119.6700
2005-11-03 Sell 100 at 122.1500
Long position (7) on spy
2005-10-14 Buy 100 at 118.1000
2005-11-03 Sell 100 at 122.1500
Long position (8) on spy
2006-01-19 Buy 100 at 128.1300
2006-01-24 Sell 100 at 126.6800
Long position (9) on spy
2006-03-08 Buy 100 at 127.6500
2006-03-13 Sell 100 at 128.8300
Long position (10) on spy
2006-06-09 Buy 100 at 126.4200
2006-07-05 Sell 100 at 127.2900
Long position (11) on spy
2006-06-12 Buy 100 at 125.8500
2006-07-05 Sell 100 at 127.2900
Long position (12) on spy
2006-06-13 Buy 100 at 123.7400
2006-07-05 Sell 100 at 127.2900
Long position (13) on spy
2006-06-14 Buy 100 at 122.8800
2006-07-05 Sell 100 at 127.2900
Long position (14) on spy
2006-07-18 Buy 100 at 123.7100
2006-07-25 Sell 100 at 126.0300
Long position (15) on spy
2006-08-10 Buy 100 at 126.5800
2007-01-26 Sell 100 at 142.0900
Long position (16) on spy
2006-08-25 Buy 100 at 129.6400
2007-01-26 Sell 100 at 142.0900
Long position (17) on spy
2006-11-02 Buy 100 at 136.4600
2007-01-26 Sell 100 at 142.0900
Long position (18) on spy
2006-11-03 Buy 100 at 137.2000
2007-01-26 Sell 100 at 142.0900
Long position (19) on spy
2006-11-06 Buy 100 at 136.9800
2007-01-26 Sell 100 at 142.0900
## Global analysis (full portfolio always invested)
Analysis of the portfolio (2004-05-11 / 2007-01-26) :
-----------------------------------------------------
Performance : 46.0% ( 14.9%) Buy & Hold : 32.0% ( 10.7%) () => by year
MaxDrawDown : 2.8% B&H MaxDrawDown : 7.6%
Best performance : 46.0% Worst performance : -0.5%
Net gain : 4598.11 Gross gain : 6874.00

Trades statistics :
Number of trades : 20 Trades/Year : 7.38
Number of gains : 14 Number of losses : 6 Win. ratio : 70.0%
Max consec. win : 9 Max consec. loss : 2 Expectancy : 0.02
Average gain : 2.94% Average loss : -0.93% Avg. perf : 1.91%
Biggest gain : 11.26% Biggest loss : -2.04% Profit fac : 3.16
Sum of gains : 5280.53 Sum of losses : -682.42 Risk of ruin : 0.0%
 
Same SPY data but traded with Bollinger Band trend following system. Parameters are 400 days moving average, 0.5 standard deviations, 5 % heat. Same time period (13.97 years from 1993-01-29 to 2007-01-26.) Allowance made for commission and slippage.

Number of trades 10
Total profit $ 102448
Profit after subtracting $ 10.00 commission, slippage per transaction: $ 102248
Heat is 5.00 per cent of equity.
Greatest drawdown is 0.0228 (2.28 per cent).
Cumulative Annual Growth Rate (CAGR) is 7.32 per cent.
CAGR / Drawdown is 3.21
Instantaneously Compounding Annual Growth Rate (ICAGR) is 5.04 per cent.
Annually Compounding Annual Growth Rate (ACAGR) is 5.17 per cent.
Information Ratio is 0.45
Initial capital is $ 100000
Long trades only.
 

Attachments

Quote from rosy2:

when i ran your strategy it worked over the last few years.

History of the portfolio :
--------------------------
Long position (0) on spy
2004-07-20 Buy 100 at 110.5300
2004-08-26 Sell 100 at 110.9600
Long position (1) on spy
2004-08-09 Buy 100 at 107.0200
2004-08-26 Sell 100 at 110.9600
Long position (2) on spy
2005-01-05 Buy 100 at 118.7400
2005-01-13 Sell 100 at 118.6400
Long position (3) on spy
2005-01-06 Buy 100 at 118.4400
2005-01-13 Sell 100 at 118.6400

How much initial capital did you use in the simulation?

Did you intend to have overlapping trades? For example, buy on 2004-07-20 then buy again at 2004-08-09 and sell both 2004-08-26. Nothing wrong with that. Might improve the method.
 
Very interesting subject. Reversion to mean probably changes a lot when selecting diff ( longer) time period. Stock with high and steady PEG ratio may never return to the same price , especially in overall PE's expansion environment.
 
I can examine different time periods and have some hourly and minute data to test. Right now I am more concerned about validating my code and eliminating programming bugs.
 
Here is a copy of the SPY data that I am using for the test. I downloaded it from yahoo.com today. If we are testing this trading method as a group we might use the same data.
 

Attachments

HNS , article compares results of XYZ change vs benchmark's ( a la pair trading bases) ; you are testing totally diff strategy , no ?
 
Back
Top