Experiments in Technical Analysis

asnavale

Well-Known Member
Dear Anant
Seems interesting, I am trying ur indicator,Linear Regression Slope based System and Moving Average Cross-over Trading System.
Can u tell me whether it suits for all periods like EOD, WEEKLY AND INTRADAY(hourly, 5,10 15 min charts in intraday). tell ur best option pls.
Raj
Hi Indra,

I have no hands-on experience with intrday trading, except that on a couple of occasions I tried it. As I am in office during market hours it is not possible. Based on EOD data I trade taking short term or even long term positions. However, from what I have come across in various articles and books I can say that the EMA5/EMA6 cross over works for all time periods. The linear regression slope method is not mentioned anywhere in the literature I have come across. So, it is difficult to tell whether it works for different time frames. Moreover, this method needs to be tested thoroughly. So, it would be hazardous to recommend it for even position trading or swing trading. Back test on EOD historical data shows that this system is promising.

The intraday trading based on EMA5/EMA6 cross over which I ventured on some occasions resulted in some profit (Rs 70 per share gained on two occasions and Rs 10 per share lost three times, the capital invested on each occasion being nearly same). But this can not be taken as any guideline. May be I was lucky. If you have sufficient intraday historical data you test the method thoroughly.

Regards

-Anant
 
Anant
Thanks for ur reply, I'll try some testing and i am also not a intraday trader, but short term trader in nifty. (but as u know now a days carrying any position to next day is risky)
It was suggested by one analyst for index(nifty) trades EMA103/EMA7 crossover gives good result for short term. Can u suggest abt it, because the range for 5/6 is too low to 103/7 and i would like to know is there any rule for the crossovers like MACD 12,26,9 RSI 14 etc..
If u can give a article like MACD for EMA crossovers it will be useful for all the members.
Thanks in advance
Raj
 

asnavale

Well-Known Member
Anant
Thanks for ur reply, I'll try some testing and i am also not a intraday trader, but short term trader in nifty. (but as u know now a days carrying any position to next day is risky)
It was suggested by one analyst for index(nifty) trades EMA103/EMA7 crossover gives good result for short term. Can u suggest abt it, because the range for 5/6 is too low to 103/7 and i would like to know is there any rule for the crossovers like MACD 12,26,9 RSI 14 etc..
If u can give a article like MACD for EMA crossovers it will be useful for all the members.
Thanks in advance
Raj

Hi Raj,

Right now I am very busy. I will be away from home on tour and will be able to post reply to your query only after Saturday.

Regards

-Anant
 
Hello Friends

As suggested by Murthy, here is the agenda for the chat session

Date: 02-Dec-2006
Time: 9:00 PM to 11:00 PM(IST)
Place: Traderji.com, Chat Room: SYS-IMP

Agenda
Introductions
List of Systems Available
Formal allocation of portfolio owners for all systems
Discussing (In Brief) about systems (one at a time)
- Parameters
- Any special conditions etc.
- AB settings
- Queries by systems implementers

Money Management Rules
- Funds Available
- Leverage Available
- Stop loss
- Position Sizing

Finalizing the Lists of stocks available to trade
Deciding about the min duration for which the implementation should run.
Formats/Template for reporting Signals/Trades
Criteria for comparison


All the members of Traderji are invited to partcipate

Regards
Sanjay
Hello All,
I am reading this thread since last few days.
Joined very very late.

But I find as if I am reading a novel or even better
like a movie Lagan. (Just before cricket match takes place)

Great thread! Lovely dedicated, commited, teamwork!
What a Success!!!!!!!!!
 
Dear Karthik & other forum members,

Thank you for this informative thread. I've been backtesting the systems posted on this thread and I have a few questions regarding their implementation, especially the K1 system, which I've focused on, as it seems to give the best results.

1. There is a problem with the code used, however, that I don't think has been brought up earlier.

The use of the Peak() function in amibroker worries me, because it can look into the future during backtesting..and therefore choose stocks that do well in the days to come, - because it knows what stocks will do well.
According to http://www.amibroker.com/newsletter/08-2000.html

"As you can see Zig() function determines major peaks and troughs using percentage threshold given as a second parameter. The bigger threshold you specify the more significant peaks and troughs are detected. The line generated by Zig() function indentifies the main trend. There is one caveat however: please take special attention using Zig() function in trading systems because it looks in the future so you will get unrealistic system test results. Zig() function and all function using it (Peak, Trough, PeakBars, TroughBars) are intended for pattern recognition formulas only."

I've noticed that by using Peak(c,5,1) - the 5 value is the one thats important here,- we get some wrong signals, but when lowering the 5 to less than 1, we get higher profits, but the results from backtesting are less accurate.

You can test this by doing an exploration for a day or week - a few days/weeks ago and writing down the stocks that are 'buys', then delete all quote data that comes AFTER that day/week, using the Quote Editor. Then run the exploration again and see if you get the same signals - if you do, that means the signals are not altered based on future bars, but if they are, as they are in my tests, this means that the system relies on future data to make signals and cannot be trusted with as high a profit as the backtesting suggests.

I'd love to hear comments, especially from Karthikmarar, as it his system at heart, and he probably knows it better than me :)
 

karthikmarar

Well-Known Member
Dear PDX


Nice to see your interest in the discussions going on this thread. Your observation on the Peak function is very true.

The way you proposed to test the effect on future bars is also very interesting. Did you try it? I am a little too tied up now. I will definitely try it later.

Very true, the Zig function looks to the future bars. Any system based on the zig function tends to give inaccurate result.

However in the Mabiuts systems including the K1 the system looks for the last peak which has already happened. It rather looks at the past peak after a trough has happened. So this peak will not change. Of course any system which will act on the coming peak or trough will have a problem. So in my opinion the peak function in case of the K1 system will not affect the selection. I would like your views.

Warm regards

Karthik
 
Karthik,
Thank you for responding :)

Attached are my test results, I've tested on AMEX stocks for a 2 month period. First from the formula "Peak(c,peaknumber,1)", I've used peaknumber = 5.
I believe that using 5 will give accurate results, but that there might still be errors in backtesting vs. actual trading. I haven't tested this as thoroughly as of yet, but so far it seems promising.

For peaknumber = 2, we usually get more results in the explorations when there is no future data to look at, and the stocks listed when having future bars for the system to look at are all on the list of stocks returned in the first test (without future data) - so there are more stock picks when no future data is available, but my manual screening shows that most of the extra picks suffer losses in the next week, so we get more picks, but those that are added are usually losers.

I presume there might be a way around this issue, by using a different peaknumber value, but if its too high (>5) we might get lower profits and detect moves late, and too low (<5) we will get erroneous stock picks because the sensitivity of the zig/peak function somehow affects the stock selection based on whether or not future bars are available for calculations of peak/trough.

I must admit that this stuff is quite confusing, but I assume this might have implications for all of the systems developed in this thread that use peak(), and therefore should be examined closely :)

There may of course be errors in my studies of this, and I'm hoping that it turns out that lower peaknumber values do not affect the systems negatively, but as of now it seems to have an effect, and that the peak/trough calculations are somehow affected by future bars.

Looking forward to hearing your thoughts on this Karthik!

Regards
Jrgen T.
 

karthikmarar

Well-Known Member
Dear Jorgen

Thanks for sharing the test results. Very Ineresting. I always assumed that since the system checks previous peak the zig function would not affect the system. It does look like that assumption is misplaced.

I would definitely check again. But you seem to be on the right track.

Also your observations about the values of peak function 5 and 2 are correct. Using 5 would lead to late entries , lesser signals, lesser profits but will have lesser whipsaws during sideways market. Using 2 wold give more trades, more profits, early entries but prone very much for whipsaws.
Well it is a comprise one has to make. One way of tackling this could be to use a adaptive value which will change to a lower value in a trending market and higher values in a sideways market based on some trend indicator like ADX, Ravi, VHF or R2. Easier said than done.. :)

So obviously using ADX/RAVI in the Mabiuts K1 has not helped to reduce the effect of Zig looking at future bars.

Thanks for this interesting discussion. Looking forward to more...

warm regards

karthik
 
Last edited:
U

uasish

Guest
Dear Jorgen

Thanks for sharing the test results. Very Ineresting. I always assumed that since the system checks previous peak the zig function would not affect the system. It does look like that assumption is misplaced.

I would definitely check again. But you seem to be on the right track.

Also your observations about the values of peak function 5 and 2 are correct. Using 5 would lead to late entries , lesser signals, lesser profits but will have lesser whipsaws during sideways market. Using 2 wold give more trades, more profits, early entries but prone very much for whipsaws.
Well it is a comprise one has to make. One way of tackling this could be to use a adaptive value which will change to a lower value in a trending market and higher values in a sideways market based on some trend indicator like ADX, Ravi, VHF or R2. Easier said than done.. :)

Maybe we can use ADX or other trend indicator along with K1 in order to reduce the effect of the zig function looking at future bars... just a thought...

Thanks for this interesting discussion. Looking forward to more...

warm regards

karthik
karthik,
I missed this K1 completely can you post the code plz,so as to participate in this discussion.

Asish
 

Similar threads