Experiments in Technical Analysis

Dear Sanjay

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.

warm regards

Karthik
Hi! Karthik,

Could you please share with us what is the system that you use for Buying & Selling stocks.

1) What are the parameters that you use to shortlist stocks
2) What is it that tells you that this is the stock that I am buying
3) Do you use any indicators to shortlist stocks or to check overbought / oversold levels

If you could please let us know in detail, it would be helpful to us. ;)


Thanks & regards,
Amit
 
Last edited:
Hi! rpc,

Had to go the airport, but the flight is late. So, I'm back ...

Attached are the following:

1) Screen shot of the 13 - 30 MA filter
2) Screen shot of the 13 - 30 MA Results
3) Template of the 13 - 30 MA Crossover that I had uploaded earlier

If you are using only the 13 - 30 MA Crossover template, you don't get Buy signals on a regular basis as the other indicators. That's the reason why we are using other indicators as well and that's why the Consolidated Filter.

Try increasing the No of days that the filter should give you results for. Does this solve your problem?


Regards,
Amit
 

rpc

Active Member
hi Amit
thanks for the reply.will go thro your files and come back to you.
the first *.txt file contains the GBM-all-in-1.filter and second zip file contains chart template GBM-all-in-1Templt.txt .Initially I had put txt extension to charttemplate file but did not realise the limit of 100k was getting crossed so just zipped the file with .txt extension.Pls rename the .txt file to .ChartTemplate after unzipping and before importing.
with best wishes
rpc
 

karthikmarar

Well-Known Member
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
Hi Dennis,

First of all, let me welcome you to this wonderful forum.

That is a very simple and nice approach to have a equity line to check out the system. Frankly never thought of it before. Thanks for sharing it with us.

Going by your post you are quite experienced and looking forward to hear more innovative approach to TA from you.

warm regards

Karthik
 

asnavale

Well-Known Member
Hi Karthik,

Thanks for your new code. I will test it. I have back-tested the signals manually, not by the software (Ami Broker). I explained the whole methodology earlier. MABIUTS-H does give many signals. I tried to reduce them by accepting Buy only if there is further rise in the EMA-Signal line difference and Sell only if there is further fall in the difference. This reduced the number of signals to nearly 30% of original number but the profits also reduced similarly. Unlike the new K1 strategy, the H strategy gives not more than 90 trades in the period 1-1-06 to 30-9-06. Now, probably it can be left to individuals to decide whether 90 trades in 21 months is too much or not. But we have to remember that there can be several trades on consecutive days. So, I am thinking that we should work out some modifications so that the number of trades is significantly reduced (preferably the loss making ones) with marginal reduction in profits. All the brains here can pool together their resources and work on this.

In your example of making 1L to 73L I do not know which stock you tested. Have you calculated Buy & Hold profits for the same period? In the original MABIUTS-K I found that Buy & Hold gives equal or better profits over the same period but there will be only one buy and one sell. This happens when the stock itself is appreciating over time. Therefore it would be an interesting aspect to compare the results of any strategy with Buy & Hold also especially when testing over a long period.

Thanks for sharing your new improved strategy and results.

I want some help in writing AFL in Ami. Can you help? I have posted my query in Amibroker tips forum post No 14 (on Sep 16, 06) and post no. 21 (on Oct 01, 06). Can you guide me ? In case you want more details of what exactly I want please let me know.

Regards

-Anant
 

asnavale

Well-Known Member
Hi Karthik.

On reading of your post second time I had this following point to note:

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……

But you would have taken 990 trades, of which 610 will be winners and 380 losers…
From 1-1-05 to 21-11-06 we have nearly 500 trading days. So, 990 trades would average out to 2 trades per day. If it is a single stock this is not explanable, unless you are using intra-day trading data. If it is a number of stocks being tested then it is okay provided the number of stocks is about 15 or more. As you have not mentioned about the number of stocks tested I just made this point. If you can give the details of the stocks tested it would be helpful to check the results so that we can find out if there is anything going wrong. I would like to test the same stocks for the same period.


Regards

-Anant
 
Last edited:

karthikmarar

Well-Known Member
Hi Karthik,

I want some help in writing AFL in Ami. Can you help? I have posted my query in Amibroker tips forum post No 14 (on Sep 16, 06) and post no. 21 (on Oct 01, 06). Can you guide me ? In case you want more details of what exactly I want please let me know.

Regards

-Anant
Hi Ananth

..mmm.. If it was difficult for Ananth, it is going to be really dificult. I am trying to do something beginvalue and endvalue staements.. will let you know if successful .. :)

regards

Karthik
 

SGM

Active Member
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

You have already pointed out that their are major challenges in implementation of the rules including the entry and exit signals, use of stoploss, position sizing and risk management related considerations, and most importantly managing emotions.

To understand the issues, why don’t we do a mock implementation?

I would request Anant, Amit, rpc, saji and other members following this thread to participate in the process and Karthik to guide us for the same.

I guess as a first step we will have to make a trading plan. We can use the modified MABIUTS system as it contains most of the components of the plan.

Buy and Sell Signals: Generated by MABIUTS K1 afl
Position Sizing: 20% of the available funds (criteria included in the afl).
Stop Loss: 5% on initial position, and 10% trailing SL

Other considerations could be

Stock filtering criteria
We should make a shortlist of 50-100 scripts to trade with. We can consider only the scripts that are included in NSE F&O and are above Rs 100. (more suggestions welcome)

Use of Leverage (If we trade FnO, we will have to decide on this one)
If yes we should use a leverage of 1/3 or maximum 33%.

Starting Capital: 10,00,000/- (If we are trading futures, we need a bigger starting capital as our position sizing rule does not allow us to stake more than 20% margin on one trade and in F&O we have to trade by lots also we are using 5% as SL)

There are many more questions like how do we start using the system? Go at it full throttle or try to build position slowly (maybe add 1 script every week). Which signal we choose and which we ignore (as we cannot buy them all), wouldn’t the discretionary choice involve a element of emotion in the decision making process, or do we take the signals on first-cum-first basis?

Regards
Sanjay
 
Last edited:

Similar threads