combining trend following & mean reverting strategies

#1
'Mean reverting with Trend bias system

We know that trend following strategies have low success ratio but high R multiple(risk to reward ratio), whereas mean reverting (or range bound) strategies have high success ratio but low R multiple. Here i have tried to combine both the approches to assimilate the pros and do away the cons of each approach.

( please note: I have written this system for USDINR. However, it can be used for any underlying be it stock, index, commodity or currency.)

Basic Information of currency market

USDINR Lot size: 1000
Pip size: 0.0025
Gain/loss per pip per lot: Rs.2.5
Market timings: 9.00 a.m. to 5 p.m.
No. of 60-min-bars in a day: 8
No. of 15-min-bars in a day: 32

Tools used in the system

1) Exponential Moving Averages (EMAs) of 14 and 21 to be computed on 60 min bars

2) Fast Stochastic %K (5, 3, and 3) to be computed on 15 min bars. Unlike normal usage of Stochastic, we are not interested in crossover signals or overbought / oversold zones. We are only interested in maximal and minimal values (80 and 20) of stochastic.

3) Average Candle Range (ACR) with a look-back period of 10 to be computed on 15 min bars. Calculation of ACR is slightly different from ATR (Average True Range)
Calculation of ACR 10:
Candle Range (CR) = current high current low of 15 min bar
ACR 10 = Average of CR for last 10 bars
Note: We should ignore the first 2 bars of 15 min between 9.am to 9.30 a.m. while calculating ACR 10 to eliminate market opening noise.
Amount equal to 2 times ACR 10 will be used to arrive at initial stop loss level.

Calculation of Average True Range (ATR):
True Range is defined as greatest of the following:
Current High less the current Low
Current High less the previous Close (absolute value)
Current Low less the previous Close (absolute value)

Why ACR and not ATR? Since ATR uses previous close, its values are distorted at the time of market opening due to overnight gaps.

4) Trend Statistic Filter (TSF) to be computed on daily bars. Calculation of TSF 20 is as follows:
We compare the CMP to each of the high-low range for last 20 days. If the CMP is contained within the prior days high-low range we consider today as not trending. As more number of times CMP falls within the daily range of last 20 days, more range bound the market is. We calculate the percentage of days with such overlap and plot this value as trend statistic. Low values of TSF indicate there is less overlapping and market is trending. High STF values suggest more overlapping and market is congested.
Note: It would be great if we use ATR instead of high-low range of each day in calculating TSF.

How to use STF in mean reverting system? The basic problem with mean reverting systems is that they tend to book profits too early in a trending market resulting in low R-multiple. We will use Trend statistic as a filter to improve R-multiple.

Entries, Exits and stops:

The system works on multiple time frames of 15 min, 60 min and daily bars. It is a mean reverting system in the sense that it sells on minor rallies and buys on minor declines as against trend following or breakout systems which buy on rallies and sell on declines.

Entry:
When 14 EMA (on hourly bars) is below 21 EMA and CMP is below both the EMAs, we should consider only top-down trades (short sell) when stochastic %K reads 80 (on 15 min bars). Similarly when 14 EMA is above 21 EMA and CMP is above both the EMAs, we consider only bottom-up trades (long only) when stochastic %K reads 20. Hence the system is called Mean reverting with trend bias.
Do not trade during the first 30 mins of trading session i.e. 9.a.m. to 9.30 a.m. Ignore stochastic signals during this period.
Do not take any new position after 4.30 p.m.

Initial Stop Loss:
Amount of initial stop loss will be:
2 times ACR (OR) 20 pips, whichever is higher.
20 pips = Rs.0.05


Trailing Stop loss:
Trail Stop loss to the entry level (breakeven level) when market moves in favour by the amount of the initial stop loss i.e. higher of 2 times ACR or 20 pips. In other words, when we reach a situation of risk to reward ratio of 1:1, trail SL to breakeven level.

Exit:
Exit top-down trades when stochastic %K reads 20 provided TSF is above 0.15.
Exit bottom-up trades when stochastic %K reads 80 provided TSF is above 0.15.
If TSF is below 0.15, (which means market is trending) trail SL as follows:
For top-down trades:
Indentify the 15 min bar which made the lowest price since entry (to be called as reference bar). Place stop loss 1 pip above the highest high of the 2 bars to be counted from and inclusive of the reference bar.
Opposite is applicable for bottom-up trades.
Exit open position, if any, before 5.00 p.m.
Position Sizing

No. of lots to be traded = Seed capital * 0.05%________
Initial Stop loss amt * 1000

Pyramiding is not advisable in Mean reverting system.

suggestions, criticism, opinions all are welcome.
 
#2
Hi
Do you have this logic coded for any backtesting software (Amibroker, Tradestation or any other)?

Since all the rules seem to be objective, having it coded will reveal how well it performs on various instruments.

Regards.