Experiments in Technical Analysis

karthikmarar

Well-Known Member
Hi rpc

rpc said:
Sorry, still not clear.Do you mean the current close should be higher than latest highest *high* or latest highest *close* by 5 %.Put it differently does PEAK(C,5,1) and PEAK(H,5,1) mean one and the same ?I think they are different. Pls guide
No peak(c,5,1) and peak(h,5,1) are different. The first is calculating only on the basis of close and the other on high.

Also let me clarify the 5% is the percentage change as a unit used by the formula (which is again based on the zig-zag indicator) to find out the peaks. If we use the value 5 then only 5% changes in price are considered for peaks. Peaks formed with lesser percentage move are ignored. I am enclosing two charts showing peaks and Troughs based on 2 and 5 percent changes. This will clear the picture for you.


rpc said:
Also pls consider follo about which I referred to in my earlier post

ADANINET
Date Open High Low Close
9/11 142.6 152 142.15 148.7
8/11 147.8 149 137.05 141.1
7/11 147.95 153.9 146.4 147.6


MOTHERSUMI
9/11 101.6 101.6 99.8 101.25
8/11 100 103 99.1 100.4
7/11 95.9 108.9 95.9 99.05

MABIUTS has given Buy on 9/11/06 for both the above stocks eventhough their close is below HIGH of 8/11/06.why is it so ?
Pls advice
Like I said before only the close values are considered. Thought the high of 8/11 is greater than the close of 9/11, the close is not. The trouble with using High is that freaks bars can easily put us on the wrong path..

Warm regards
karthik
 
Last edited:

rpc

Active Member
Hi Karthik
Many thanks for enclosing two charts showing zig-zag indicators.I have one question .In 5 %
chart the peak is not on 8/11/06 eventhough on 2 % chart that is shown as peak.How does this happen
Is it because the difference between close on 17/11(96.45) and close on 8/11(100.4) is less than 5 %
(it is 4.0953 %).Pls clarify
rpc
 

karthikmarar

Well-Known Member
Hi Ananth

There is another interesting point thrown up your back test results…. The PITFALLS in back testing…

When Backtested the Mabiuts-H strategy have fantastic results. On deeper study by plotting on the charts we see many drawbacks like too many trades and too many whipsaws. So the question arises how much can we trust these backtet results ? Or is it better to have a eye ball Check method, which I and many others in the forum follow ?

In order to check these out I did a backtest.

I back tested a modified version of the Mabiuts-K strategy. This strategy uses a AMA instead of simple EMA. The AMA remains a straight line when the ADX is less that 20 and becomes a normal EMA above the values of ADX=20. This was another attempt to reduce whipsaws. Let us call this the MABIUTS-K1 strategy.

I had a good laugh at the Back test results.

According to the back test if you had invested Rs.1,00,000 on 1-1-2005 you will have a whooping Rs.73,42,697.22 only on 21-11-06……:D :D

But you would have taken 990 trades, of which 610 will be winners and 380 losers…

Other setting are..

Commission - 0.35 %
Stops - 5%
Trailing stop – 10% of the profit

Will talk more about this later … meanwhile you too can test it .. afl posted here… Also the test result posted ..Let me know if I am going wrong somewhere..

Warm regards

Karthik
 
Last edited:

SGM

Active Member
According to the back test if you had invested Rs.1,00,000 on 1-1-2005 you will have a whooping Rs.73,42,697.22 only on 21-11-06:D :D

But you would have taken 990 trades, of which 610 will be winners and 380 losers

Other setting are..

Commission - 0.35 %
Stops - 5%
Trailing stop 10% of the profit

Will talk more about this later meanwhile you too can test it .. afl posted here Also the test result posted ..Let me know if I am going wrong somewhere..
Hello Karthik

I couldn't get more than 19L in the back test with the settings you have mentioned, maybe your stock selection is better. Or maybe you are using a better leverage, I have set Margin to 20%.

I assume you are using open prices for trade execution, in that case you should include SetTradeDelays(1, 1, 1, 1); as the last line in your code. This definately spoils the fun :)

Even after introducing the delay of buying/selling at next days opening, the results are very good, (Annual Return % - 143.43 %). Another option is to set the Buy/Sell at Close, same day (Annual Return % - 191.68 %)

Trade Execution is another story...

What You See (in the backtest results) Is Not What You Get,

The weakest link in any system is the trader

Warms Regards
Sanjay
 
Last edited:

rpc

Active Member
Hi Amit
I have tried to fit in all 3 indicators in one template.I find that Buy signals for 13-30 MA crossover are not generated.Pls check at your end and advice if I have made any mistake in the template.
with best wishes
rpc
 

karthikmarar

Well-Known Member
Hello Karthik


What You See (in the backtest results) Is Not What You Get,


Warms Regards
Sanjay
Dear Sanjay

That is precisely what I am getting at. Backtesting does not provide the real picture. There could be so many variables to consider. Just as you pointed out I changed one setting for stop "Exit Intraday at stop" and the result was a profit of 7L ... a huge drop from the 70L I got previously..

I for one never trusted the back testing after my initial experiment in MS.
Since then I prefer eyeballing the charts with the BUY and Sell conditions to get a better feel of the system performance. But then Backtesting is more fashionable nowadays.. I still remember one of our experienced member was aghast when I said that I dont backtest my systems in this very thread... :)

warm regards

Karthik
 
Hello Karthik,

This is my first post. I have enjoyed reading your very educational material on this thread from the beginnning. Thank you for sharing all your information.

I do not use backtesting in the usual way in AB. I have found it much more informative to place an additional line plot of the equity function in each indicator experiment. I adjust input parameters with a slider and watch what happens to the equity line over the history. I also do not compound the results, but always invest the same amount in each trade with a realistic commission.

The goal is to have an equity that goes up in the most straight line to the highest return. An equity line that keeps straight over a wide range of inputs (like changes to timeframe) is also a goal of a robust system. The insights about a system come very fast when you can change the slider and whatch what happens. With a straight line, it means that you could start investing at any point and have a good return.

Best regards,
Dennis
 

rpc

Active Member
Hi amit
forgot to attach template.Attached filter instead.Attaching template now.
with best wishes
rpc
PS - I will have to zip it and upload which I will do shortly
 

Similar threads