Experiments in Technical Analysis

asnavale

Well-Known Member
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
 
Last edited:

kkseal

Well-Known Member
Hi Kalyan

Thanks for the kind words.

Regarding your observation about a MACD of Trix, as already pointed out in my thread the the difference between a short term Trix and a Longer Term Trix would show the turning points and could be the basis for a nice trading system.

Enclosing the chart of a system based on a 5 day Trix and 9 day Trix. This does help one to catch good up and down moves. Of course this too would be prone for whipsaws and requires further study to minimize them.

warm regards

Karthik
So the MACD idea could work after all!

By the way do you use a signal line with (vintage) TRIX? I have tried a 12 period TRIX with a 9 period signal line (i.e. a 9 period EMA of TRIX itself) It worked quite well for me (of course the periods can be fine tuned as per ones requirement).

Also addition of a simillar signal line (3d perhaps, in which case it would be a 3d EMA of the difference) to your 5d-9d method and making use of the cross-overs could reduce the whipsaws (and would make it a TRIX MACD as well!). Please do try it (since you have already done much of the groundwork) & post the results.

Whether it ultimately works or not the experiments themselves are absorbing, aren't they?

Thanks & regards,
Kalyan.
 

karthikmarar

Well-Known Member
Hi Kalyan

Agree with you that the experiments themselves are quite absorbing. In addition the experiments do provide great insight of the indicators themselves.

You were wondering about a MACD of the TRIX. Well, here is a MACD of the TRIX (12,26,9). Also shown the conventional MACD(12,26,9).

Interesting, A much more smoother MACD... :D

regards

karthik
 
Last edited:

kkseal

Well-Known Member
Dear Karthik,

Thanks for posting the chart (& that too so fast!).

The smoothness was expected Also notice the more pronounced crests & troughs.

But does it add any value to the vintage MACD? Nope. Pretty much follows it. Not unexpected though as both are based on the same base EMAs. And that's not bad at all because my main intention was to see if the triple smoothning of TRIX makes it lag behind the vintage MACD. But there seems to be no such lag.

This will allow me to use the vintage TRIX with greater confidence assured that I am not using too much of a lagging indicator to time my moves. (Actually there seems to be some debate amongst analyst as to whether TRIX is a leading or lagging indicator but one thing is certain that it does reduce the whipsaws from your trades which is where it's real utility lies).

Agree with you fully on what you said about gaining insight. The better you understand the indicators the more appropriately & confidently you'd be able to use them.

Regards,
Kalyan.
 

uma_k

Well-Known Member
Hi Anant,

A good improvement, Now MABIUTS-H(B) gives less whipsaws and lower number of signals. But I have one doubt:

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.
If 95% values remain inside the bands with 2 std deviations why are you taking 1 std deviation? Is it not better to be 95% of time with the trend? Can you explain this?

Thanks

***Uma***
 

kkseal

Well-Known Member
Hi Anant,

A good improvement, Now MABIUTS-H(B) gives less whipsaws and lower number of signals. But I have one doubt:



If 95% values remain inside the bands with 2 std deviations why are you taking 1 std deviation? Is it not better to be 95% of time with the trend? Can you explain this?

Thanks

***Uma***
But you Buy/Sell only upon a upward/downward crossover of the 1 SD zone So you actually buy when the crossover into the highest probability zone is made (with a 1% buffer).
Is my understanding right Anant?.
I have made some observations of price movements within BBs which tally somewhat with Anant's theory.
More on that later.

Regards,
Kalyan.
 
Great going,Karthik and to all other active participants in this thread.........looking forward to 1000.

All the best!!

Happy Trading!
Saint
 

Similar threads