Study: Buy IDEA when above 200 SMA and near 50 SMA and above 50 SMA
home > technical-strategy > idea > 21In this study, we evaluate the performance of strategy "Buy IDEA when above 200 SMA and near 50 SMA and above 50 SMA" under various conditions.
X Analysis
In the table below, we find out the performance of this trading strategy under following scenario: buy IDEA at the closing price whenever the signal triggers (Rs. 2Lac per trade). Then cover the position "X" trading days later at close_price i.e. sell after "X" trading days. Here are the results of this study:X Days | Net Profit | Total Trades | Winning Trades | Losing Trades | % Profitable | Avg Winning Trade | Max Winning Trade | Avg Losing Trade | Max Losing Trade | Win/Loss Ratio | Profit Factor | Sharpe Ratio | Avg Trade |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 74.16 | 30 | 16 | 14 | 53.33 | 3347.49 | 11157.5 | -3820.4 | -9723.64 | 0.88 | 1 | 0.00016 | 2.47 |
2 | -19729.56 | 30 | 16 | 14 | 53.33 | 4538.52 | 9909.91 | -6596.14 | -13101.33 | 0.69 | 0.79 | -0.029 | -657.65 |
3 | -20713.63 | 30 | 14 | 16 | 46.67 | 5890.47 | 14323.26 | -6448.76 | -15558.06 | 0.91 | 0.8 | -0.026 | -690.45 |
4 | -21581.87 | 30 | 13 | 17 | 43.33 | 7740.82 | 17310.17 | -7188.97 | -18038.33 | 1.08 | 0.82 | -0.022 | -719.4 |
5 | -43758.08 | 30 | 13 | 17 | 43.33 | 7390.52 | 19176.32 | -8225.58 | -20675.54 | 0.9 | 0.69 | -0.042 | -1458.6 |
6 | -44144.11 | 30 | 14 | 16 | 46.67 | 7015.02 | 18857.76 | -8897.15 | -22660.65 | 0.79 | 0.69 | -0.041 | -1471.47 |
7 | -46376.91 | 30 | 13 | 17 | 43.33 | 7520.91 | 24777.18 | -8479.34 | -22547.91 | 0.89 | 0.68 | -0.041 | -1545.9 |
8 | -25474.13 | 30 | 14 | 16 | 46.67 | 7775.97 | 36631.02 | -8396.11 | -22950.82 | 0.93 | 0.81 | -0.021 | -849.14 |
9 | -12840.38 | 30 | 13 | 17 | 43.33 | 9940.45 | 42245.99 | -8356.84 | -27322.4 | 1.19 | 0.91 | -0.0093 | -428.01 |
10 | -15150.65 | 30 | 13 | 17 | 43.33 | 11488.58 | 40106.95 | -9676.6 | -29145.73 | 1.19 | 0.91 | -0.01 | -505.02 |
From the table above, we see that best results are achieved by holding positions for 1 trading days. Profit factor is 1. Profit factor is showing that this strategy doesn't give any edge over rendomness and it is only as good as tossing a coin and doing the trade. Percentage of profitable trades is 53.33%, which is not acceptable. Avoid this strategy. Average return per trade is 0.0012%, which is low, don't trade solely on the basis of this study. Sharpe Ratio is 0.00016, which is low, don't trade solely on the basis of this study. Win loss ratio is less than 1 which is bad, avoid this strategy.
Strategy Analysis - Exit Criteria
In the study above, exit criterion was that hold the position for "X" trading days. That's one possible exit criterion. However, we can have more elaborate exit criteria. Now we study this strategy under other exit criteria. There are 3 things which you must get to know before proceeding further.- Stop Loss: When you enter a trade and the trade goes against you, a stop loss determines the maximum loss
you want to take in that trade and you will exit/cover/close positions at predetermined stop loss price.
There are many ways to determine a stop loss price, to analyse this strategy we use 4 following ways of
putting stop loss:
- atr: Fix the stop loss at average true range. If you are long i.e you have bought the stock/futures, use average true range lower band as stop loss and vice-versa if we had sold short.
- nil: No stop loss. We don't exit positions unless we reach the target or predetermined number of trading days have passed.
- 200: This is a special stop loss for strategies designed using 200 Simple Moving Average. If we are long, we set the stop loss at 1 percent below 200SMA and vice-versa.
- 50: This is a special stop loss for strategies developed using 50 Simple Moving Average.
- Adjusting Stop Loss: After entering a trade and calculating a stop loss, we can adjust stop loss
daily to make sure that we get partial returns even if price goes against us after moving in a favorable
direction initially. In the backtesting below, we use 2 adjustment techniques:
- trail: It is a widely used technique. It means that if stock has moved in a favorable direction, we also adjust/move stop loss in the favorable direction. For example, if we are long NIFTY futures, and NIFTY has moved up 2 percent today, then we also move up the stop loss. Important thing to note here is that stop loss never goes down when we are long and it never goes up when we are short.
- nil: No adjustment of stop loss on daily basis. Use the stop loss which was determined while entering the trade, if any.
- Target Price: When entering a trade, we can also define a target price. In the backtesting, we have used following
3 cases:
- 2: Target price is set such that reward to risk ratio is 2. That means we are taking x rupees of loss then we are setting target such that profit should be as low as 2x.
- 2: Target price is set such that reward to risk ratio is 3.
- -1: This means that we don't set any stop target price. Exit positions only if stop loss gets hit or predetermined number of trading days have passed
Stop Loss | Adjust Stop Loss | Target | Avg Holding Period | Net Profit | Total Trades | Winning Trades | Losing Trades | % Profitable | Avg Winning Trade | Max Winning Trade | Avg Losing Trade | Max Losing Trade | Win/Loss Ratio | Profit Factor | Sharpe Ratio | Avg Trade |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
50 | trail | 2 | 1.55 | 10857.41 | 51 | 18 | 33 | 35.29 | 5667.35 | 7671.96 | -2762.27 | -3956.79 | 2.05 | 1.12 | 0.015 | 212.89 |
50 | nil | 2 | 1.58 | 8849.6 | 50 | 18 | 32 | 36 | 5667.35 | 7671.96 | -2911.33 | -3956.79 | 1.95 | 1.09 | 0.012 | 176.99 |
50 | trail | 3 | 1.84 | 4742.6 | 50 | 14 | 36 | 28 | 7114.67 | 10276.28 | -2635.08 | -3956.79 | 2.7 | 1.05 | 0.0058 | 94.85 |
nil | nil | -1 | 1 | 74.16 | 30 | 16 | 14 | 53.33 | 3347.49 | 11157.5 | -3820.4 | -9723.64 | 0.88 | 1 | 0.00016 | 2.47 |
50 | trail | -1 | 2.59 | -877.98 | 49 | 13 | 36 | 26.53 | 7229.6 | 34882.35 | -2635.08 | -3956.79 | 2.74 | 0.99 | -0.0008 | -17.92 |
50 | nil | 3 | 2.15 | -5352.36 | 46 | 11 | 35 | 23.91 | 8717.25 | 10799.32 | -2892.63 | -3956.79 | 3.01 | 0.95 | -0.0066 | -116.36 |
atr | trail | 2 | 4.24 | -45983.04 | 38 | 12 | 26 | 31.58 | 9698.21 | 21878.2 | -6244.68 | -15048.14 | 1.55 | 0.72 | -0.039 | -1210.08 |
atr | trail | -1 | 4.87 | -68457.72 | 38 | 12 | 26 | 31.58 | 7825.32 | 32801.33 | -6244.68 | -15048.14 | 1.25 | 0.58 | -0.06 | -1801.52 |
atr | trail | 3 | 4.63 | -73067.58 | 38 | 12 | 26 | 31.58 | 7441.17 | 23316.9 | -6244.68 | -15048.14 | 1.19 | 0.55 | -0.069 | -1922.83 |
atr | nil | 2 | 8.18 | -84012.93 | 28 | 6 | 22 | 21.43 | 15292.17 | 21878.2 | -7989.36 | -15048.14 | 1.91 | 0.52 | -0.086 | -3000.46 |
atr | nil | 3 | 10.19 | -122727 | 26 | 3 | 23 | 11.54 | 21434.69 | 23316.9 | -8131.77 | -15048.14 | 2.64 | 0.34 | -0.14 | -4720.26 |
In the table above, row 1 shows the best exit criterion. Profit factor is 1.12. Profit factor is showing that this strategy doesn't give any edge over rendomness and it is only as good as tossing a coin and doing the trade. Percentage of profitable trades is 35.29%, which is not acceptable. Avoid this strategy. Average return per trade is 0.11%, which is low, don't trade solely on the basis of this study. Sharpe Ratio is 0.015, which is low, don't trade solely on the basis of this study.
In the chart below, we plot cumulative trade gain versus trades using the best exit criterion.

Yearwise Summary of trades in above chart
Year | Number of Trades | Trade Dates |
---|---|---|
2018 | 1 | 22 Jan 2018 (2.29%) |
2017 | 6 | 20 Mar 2017 (-1.47%), 11 Aug 2017 (-1.19%), 14 Aug 2017 (2.31%), 01 Sep 2017 (-1.18%), 13 Dec 2017 (-1.57%), 15 Dec 2017 (-1.89%) |
2015 | 11 | 19 Jan 2015 (2.59%), 30 Jan 2015 (-1.14%), 03 Feb 2015 (2.23%), 04 Feb 2015 (-1.3%), 12 Feb 2015 (2.97%), 26 Feb 2015 (-1.92%), 27 Feb 2015 (-1.65%), 30 Apr 2015 (2.99%), 19 May 2015 (-1.08%), 30 Jun 2015 (3.6%), 10 Jul 2015 (2.95%) |
2014 | 4 | 05 Nov 2014 (-1.23%), 11 Nov 2014 (-1.57%), 27 Nov 2014 (-1.31%), 02 Dec 2014 (-1.16%) |
2013 | 9 | 20 Feb 2013 (2.94%), 07 Mar 2013 (3.84%), 14 Mar 2013 (-1.55%), 28 Mar 2013 (-1.84%), 16 Apr 2013 (3.19%), 01 Nov 2013 (-0.18%), 14 Nov 2013 (3.23%), 25 Nov 2013 (2.44%), 04 Dec 2013 (3.4%) |
2011 | 7 | 04 Jan 2011 (-1.23%), 24 Jan 2011 (2.1%), 31 Jan 2011 (-1.53%), 17 Oct 2011 (-1.66%), 03 Nov 2011 (-0.59%), 08 Nov 2011 (-1.18%), 14 Nov 2011 (-1.98%) |
2010 | 7 | 12 Oct 2010 (-1.15%), 14 Oct 2010 (-1.71%), 22 Oct 2010 (-1.53%), 22 Nov 2010 (-1.39%), 24 Dec 2010 (-1.61%), 29 Dec 2010 (-1.53%), 31 Dec 2010 (2.31%) |
2009 | 5 | 21 Jul 2009 (-1.47%), 05 Aug 2009 (-1.52%), 17 Aug 2009 (2.2%), 11 Sep 2009 (-1.08%), 22 Sep 2009 (-1.2%) |
2007 | 1 | 28 Dec 2007 (3.43%) |
View performance of other stocks for this trading system.