All the AFL’s posted in this section till now are Trend following. Recently, we experimented on a Mean Reversion Trading System and got surprised with its accuracy and returns. In this post,we would go through this system and its backtest report on NSE Nifty. First, let’s find out what Mean Reversion system actually is.
Mean Reversion Trading System: Definition and Overview
Mean Reversion systems assume that Stock prices oscillate in a Fixed range bounded by an upper and lower price bands. The price always tends to return to a median level in due course of time. In order to trade such system, Buy order is placed at the lower end of range and Sell order is placed at the higher end of range. Any breakout of this range with good volumes may lead to strong trends and trade should be avoided during that time. Strict stoploss is imperative in order to trade Mean Reversion systems. There are many indicators which can be handy for developing Mean Reversion Trading systems. Examples are Bollinger Bands, Donchian channels, RSI, CCI etc.
Please visit Trading Tuitions Academy to learn AFL coding and create your own Trading systems.
|Preferred Timeframe||Intraday 5 minute|
|Indicators Used||Bollinger Band, ADX|
|Position Size||150 (fixed)|
|Brokerage||100 per order|
Click here to download the AFL code for this system.
|Fixed Position Size|
|Scrip Name||NSE Nifty|
|Backtest Period||14-Jan-2015 to 29-04-2016|
|Net Profit %||89.46%|
|Annual Return %||61.91%|
|Number of Trades||114|
|Winning Trade %||32.46%|
|Average holding Period||25.17 periods|
|Max consecutive losses||9|
|Max system % drawdown||-10.78%|
|Max Trade % drawdown||-7.95%|
This is the best drawdown figures we were able to achieve in the recent past.Download the detailed backtest report here.
This strategy has a very smooth and linear equity curve with minimum drawdowns. Check it out.
Additional Amibroker settings for backtesting
Goto Symbol–>Information, and specify the lot size and margin requirement. The below screenshot shows lot size of 75 and margin requirement of 10% for NSE Nifty:
All the AFL’s posted in this section are for learning purpose. Trading Tuitions does not necessarily own these AFL’s and we don’t have any intellectual property rights on them. We might copy useful AFL’s from public forums and post it in this section in a presentable format. The intent is not to copy anybody’s work but to share knowledge. If you find any misleading or non-reproducible content then please inform us at firstname.lastname@example.org