Swing Trading Nifty and Bank Nifty
Swing System for Nifty and Bank Nifty
System Trading
Most of the traders who (un)intentionally develop trading systems have absolutely no idea of what they are doing. In other words, they are unaware of their systems risk, rewards, market suitability and other attributes which are absolutely essential for the systems to work. Unfortunately, most of the system developers intend to develop one universal system for all market types. For those who don't know, markets can be divided into broadly three categories;
Bull, Sideways and Bear. Furthermore, markets can be sub divided into
Volatile Bull, Volatile Sideways, Volatile Bear, Low volatile Bull, Low Volatile sideways and Low volatile Bear market. So essentially, we are dealing with 6 varied market types. How can there be one system which copes up with all these different market scenarios? The answer is,
It cannot . A single Long term trading system can incorporate all these market types within itself, but a Swing Trading system cannot. Every time you start doubting what I have written here, ask yourself this.
"If one short term system is suitable for all markets, then why aren't fund managers simply using that system? Why are they sitting behind their desks, trying to find the correct approach in the current market?" If you ask this question with complete honesty and objectivity, you will get the desired answer. If you still wish to stay in self denial, then its completely upto you to deal with what lies ahead. Keeping this in mind, we move to our objective of designing a simple system for Low Volatile Bull markets which will ensure we catch significant swing up moves and also ensure that we keep out of high volatile (Days/Scenarios).
Objectives
1) Building a Swing System for
Low Volatile Bull markets which catches significant amount of swing up trends and leads to significantly lower draw downs.
2) Protection of capital due to increase in volatility. During periods of increase volatility, we intend to be out of the market.
3) Prevents us from Over trading. That is, keeps us in the market for fewer number of days.
Approach
Based on the objectives 1,2 & 3 we intend to use a technique which in itself can be used for short term trend following and can be used to incorporate the inherent volatility in the market. For this very reason, we will be using Bollinger Bands for swing trading.
Bollinger Bands are volatility bands placed above and below a moving average. Volatility is based on the standard deviation, which changes a volatility increase and decreases. One of the other great advantages of Bollinger bands is that they adapt dynamically to price expanding and contracting as volatility increases and decreases. Therefore, the bands naturally widen and narrow in sync with price action, creating a very accurate trending envelope. Bollinger Bands consist of a middle band with two outer bands. The middle band is a simple moving average that is usually set at 20 periods. A simple moving average is used because a simple moving average is also used in the standard deviation formula. The look-back period for the standard deviation is the same as for the simple moving average. The outer bands are usually set 2 standard deviations above and below the middle band. Settings can be adjusted to suit the characteristics of particular securities or trading styles.
Since our trading style is to have enough trades, to protect our capital by getting out on slight increased volatility and to keep a check on draw downs, we will use the
Standard Upper Bollinger Band with average of 20, but will reduce the standard volatility to as low as 0.5. There are mainly two ways to use Bollinger bands. One is to Buy at lower band and sell at higher band (Side ways market) and other is to buy at upper band and remain in trades till the reversal comes (Trending market). Since we are aiming for Bull markets, we will use the latter approach. So essentially,
when we identify a Low Volatility Bull Market, we will simply go long every time the prices close above the 20 period Bollinger Band with St deviation 0.5 and will exit if the price closes below the same.
System Statistics
I don't intend to self appraise this system and hence will not like to write the % profit, gross profit, draw down etc. Moreover, Profit and draw downs are directly proportionate to how aggressively one trades and hence it will differ for each trader. However, I will give some statistics which are more useful.
Total number of trades from 1995 are around 200. Out of which only 38% trades are winners. Average profit/loss % is 1.32. Standard deviation of the same is 4.9%. Average profit % is 6% and Average loss % is 1.33% and Profit factor is 3.38. Time spent in markets is at 53%. That is, 47% of time we remain out of the markets and hence whatever we make in profits is by staying in the market for only 53% of entire time. Rupee value calculated using lot size 100 of Average winner is Rs. 36,000 and Average loss is Rs. 8000. Rupee value of Average trade is Rs. 7950
Word of Caution
Most of you who have interacted with me know that I am not a systems trader. I had got many request for posting some system and hence I am doing the same. In no way is this system holy grail. Also, use, understand and test this system thoroughly before even trying to place bets according to this.
This system is only suitable for Low volatile Bull markets and will fail miserably in other market types. Please do not try to use this system in any other market type. If you do so, kindly modify based on your understanding. Lot of modifications can be undertaken and hence do it if you understand the same.
Contracts to be traded
Nifty and Bank Nifty.
For stock futures, this needs to be modified. I have not researched on the same and hence cannot advise on it.
Modification
I don't like spoon feeding any trader and hence this system is just a basic system which needs to be adapted to one's own needs. On the whole, anyone who trades this system in the concerned market type, should get good gains. But the one who understands this in or out, will know how to modify this system to take it to a completely different level.
Please understand, due to time constraints, I would not be justifying/clarifying any system statistic related doubts. This is mainly due to two reasons,
1) I have mentioned earlier that results are based on my sizing methods, risk profile and hence can vary according to what you chose.
2) System testing is itself a different ball game. Less than 5% of actual traders know how to test systems. It is not as simple as what Metastock/Amibroker dishes out. Hence, any genuine system related query would be answered. Rest I will choose not to comment on as that would require detail system analysis skills to understand.
Doubts related to system methodology are always encouraged.
AFL
I am not an expert in writing AFL's but I have provided the basic afl which is required to see how this strategy works. Anyone who is an expert in designing AFL's can modify this AFL and post it here. Typical modifications would include, telling the trader whether the position is on Buy, Buy hold, when to add the next lot and when to exit the lot etc. Similar to some thing what Anant has done for his positional system.
Code:
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
if( ParamToggle("Tooltip shows", "All Values|Only Prices" ) )
{
ToolTip=StrFormat("Open: %g\nHigh: %g\nLow: %g\nClose: %g (%.1f%%)\nVolume: "+NumToStr( V, 1 ), O, H, L, C, SelectedValue( ROC( C, 1 )));
}
_SECTION_END();
Buy = Close > BBandTop(Close,20,0.5);
Sell =Close < BBandTop(Close,20,0.5);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, Low, High ) );
Tc
*Explanation of Bollinger bands is borrowed from Stockcharts.com