Dear friends,
I am today posting a modified MABIUTS-H implementation. The original version suffered from a large number of signals being generated, many of them on consecutive days. Also, many signals did not produce much profits, sometimes even ended up in losses. Large number of signals result in large over-heads due to brokerage, commission etc. and ultimately eat away the profits. So, it was necessary to reduce the number of signals, especially the insignificant ones. Several suggestions were made by the seniors and experienced members here and I have tried to combine those and added a little bit of ststistical theory into it. So the logic of modification goes as follows:
Murthy had suggested using a dead zone and moving average of the histogram to reduce whipsaws but Sanjay reported that this introduced more whipsaws. This is where the ststistics enters. In a set of values the mean (commonly known as average value) is almost in the centre, half of the values lie above the mean and half lie below it. This spread of values around the mean is measured by a value known as standard deviation. About two-thirds of the values lie within a distance of 1 standard deviation above and below the mean and 95% of the values lie within 2 standard deviations. I have used 1 standard deviation around the average. When the prices are trending (moving up or down) steadily the moving average also follows the values. But if the prices change faster then they move away from the moving average. If we draw lines at a distance of 1 standard deviation above and below the MA line, then in uptrend the histogram would pentrate above this boundary and in down trend it penetrates below. When the prices come back to normal levels then they fall between the two boundaries. These boundaries can be easily plotted and are referred to as the Bollinger Bands in Technical Analysis. This cross over of Histogram and Bollinger Bands of the Histogram is the idea behind Buy and Sell signals. When the prices fall below the upper band we sell and when they cross above the lower band we buy. Within the upper and lower bands we just move with the trend.
But this cross over also creates some whipsaws. When the difference in the Band and Histogram is in the third or fourth decimal, mathematically it is a cross over but practically it is not much useful. So Introduced the idea of Murthy where he suggested a dead zone. I have used a level of 1% as dead zone. That means When the Cross-over takes place, the difference between the Bollinger band and histogram should be at least 1% of the Bollinger band value. This improved the system and the modified MABIUTS-H gave much lower number of signals but profits are still high. The modified code is attached. This modified version is named MABIUTS-H(B). B for Bollinger Bands.
Please experiment with it and give your comments and suggestions.
Regards
-Anant
I am today posting a modified MABIUTS-H implementation. The original version suffered from a large number of signals being generated, many of them on consecutive days. Also, many signals did not produce much profits, sometimes even ended up in losses. Large number of signals result in large over-heads due to brokerage, commission etc. and ultimately eat away the profits. So, it was necessary to reduce the number of signals, especially the insignificant ones. Several suggestions were made by the seniors and experienced members here and I have tried to combine those and added a little bit of ststistical theory into it. So the logic of modification goes as follows:
Murthy had suggested using a dead zone and moving average of the histogram to reduce whipsaws but Sanjay reported that this introduced more whipsaws. This is where the ststistics enters. In a set of values the mean (commonly known as average value) is almost in the centre, half of the values lie above the mean and half lie below it. This spread of values around the mean is measured by a value known as standard deviation. About two-thirds of the values lie within a distance of 1 standard deviation above and below the mean and 95% of the values lie within 2 standard deviations. I have used 1 standard deviation around the average. When the prices are trending (moving up or down) steadily the moving average also follows the values. But if the prices change faster then they move away from the moving average. If we draw lines at a distance of 1 standard deviation above and below the MA line, then in uptrend the histogram would pentrate above this boundary and in down trend it penetrates below. When the prices come back to normal levels then they fall between the two boundaries. These boundaries can be easily plotted and are referred to as the Bollinger Bands in Technical Analysis. This cross over of Histogram and Bollinger Bands of the Histogram is the idea behind Buy and Sell signals. When the prices fall below the upper band we sell and when they cross above the lower band we buy. Within the upper and lower bands we just move with the trend.
But this cross over also creates some whipsaws. When the difference in the Band and Histogram is in the third or fourth decimal, mathematically it is a cross over but practically it is not much useful. So Introduced the idea of Murthy where he suggested a dead zone. I have used a level of 1% as dead zone. That means When the Cross-over takes place, the difference between the Bollinger band and histogram should be at least 1% of the Bollinger band value. This improved the system and the modified MABIUTS-H gave much lower number of signals but profits are still high. The modified code is attached. This modified version is named MABIUTS-H(B). B for Bollinger Bands.
Please experiment with it and give your comments and suggestions.
Regards
-Anant
Last edited: