Support & Resistance

Discussions about the testing and simulation of mechanical trading systems using historical data and other methods. Trading Blox Customers should post Trading Blox specific questions in the Customer Support forum.
Post Reply
LeviF
Roundtable Knight
Roundtable Knight
Posts: 1428
Joined: Mon Dec 22, 2003 12:24 pm
Location: Des Moines, IA
Contact:

Support & Resistance

Post by LeviF » Tue Sep 22, 2009 3:36 pm

Has anyone here tested S/R counter-trend systems? Every book on trading talks about buying at support, selling at resistance, with a very detailed trading psychology explanation about "why" it works.

But I have tested a wide variety of S/R techniques and I dont think the S/R "phenomenon" really exists. When eyeballing charts, you see where it would have worked beautifully, but you dont notice the equally frequent occasions where it didn't...

sluggo
Roundtable Knight
Roundtable Knight
Posts: 2986
Joined: Fri Jun 11, 2004 2:50 pm

Post by sluggo » Tue Sep 22, 2009 5:42 pm

Wealth-Lab submitters are rather fond of support-and-resistance systems for trading stocks. The Wealth-Lab page of their top 25 highest performing systems of the week, is usually chock full of support and resistance systems: http://wl4.wealth-lab.com/cgi-bin/Wealt ... =Top25.htm (When you're on their website, clicking the name of a trading system brings up its source code, for free, so you can read and learn.)
Attachments
wlab.png
screen shot
wlab.png (40.93 KiB) Viewed 3671 times

jklatt
Roundtable Fellow
Roundtable Fellow
Posts: 79
Joined: Sat Feb 17, 2007 11:51 am

Post by jklatt » Wed Sep 23, 2009 2:50 pm

Last week I was wondering the same thing.

So... I ran some numbers in Matlab (I haven't taken the time to put it into TB).

I have a volatility based "swing" indicator. It looks for and finds peaks and valleys in price. It behaves a lot like the typical "50 day swing" indicator or zig-zag (I'm not 100% sure what everyone calls it these days) but instead of being time based, it's volatility based.

I then used the price swing highs and lows from this indicator to generate a stochastic where I took the current day's price and used the most recent swing high and most recent swing low as the high/low for the stochastic.

From there I sorted the stochastic figures into bins:

<= -.2
>-.2 & <= .2
> .2 & <= .8
> .8 & <= 1.2
> 1.2

I wanted to see how price behaved in the middle of the range, more than 20% outside of the range and within +/- 20% of the swing high/swing low (support / resistance).

I lined up the shorter term swings (3 ATRs was the smallest) with shorter term excursion periods (20 day excursion was the smallest) and I assumed that I guessed the right direction EVERY TIME.

I then ran a baseline calculation guessing the correct direction every day, every time.

I wanted to take the directional guess work out of the picture and I wanted to see what the excursion rates were on an average day vs. the rates at different stochastic levels. You would assume that you want your entries to be in areas that average better excursion rates than the every day average (maybe that's a bad assumption, I'm not sure yet).

Below is a picture of my analysis. For the all liquid portfolio between 1995 and 2008, the best place to enter was when price was more than 20% above the most recent swing high. There really didn't appear to be any benefit to enter near support and resistance levels (when compared to a random entry) or anywhere else for that matter.

A couple things that might be skewing the results:

1) For this portfolio and this timeframe, the general direction for the vast majority of the instruments was up.

2) The excursion ratio is measured in ATRs and ATR tends to behave different in upward price environements (it tends to expand) vs. downward price environments (it tends to contract).

Any comments would certainly be welcome.

EDIT: The Excel sheet I posted initially is incorrect. I can't seem to figure out how to remove the first image so I just posted both. The correct one is the one with 4 different types of analysis, not 3.

EDIT: Figured it out. Deleted the bad image.
Attachments
Excursion Analysis.JPG
Excursion Analysis.JPG (163.91 KiB) Viewed 3595 times

Kiwi
Roundtable Knight
Roundtable Knight
Posts: 513
Joined: Wed Apr 16, 2003 1:18 am
Location: Nowhere near

Post by Kiwi » Thu Sep 24, 2009 8:08 am

Two comments.

Most countertrend s&r traders (many more actually use s&r to trade with the trend) require price action of some form prior to or after connection with the s&r to derive a trade (ie s&r is just their zone of interest really).

There is quite a strong 1.27* or thereabouts school of thought for moves stopping. Ignoring magical numbers or the lack thereof such a move has the benefit of clearing out stops and thus generating liquidity to support a move in the opposite direction so your results might have some basis in auction market logic.

jklatt
Roundtable Fellow
Roundtable Fellow
Posts: 79
Joined: Sat Feb 17, 2007 11:51 am

Post by jklatt » Sat Sep 26, 2009 4:13 pm

After going through the numbers and looking more closely at the data, I wonder if my conclusion about there being no edge (compared to a random entry) at support/resistance areas is correct.

I think part of the problem is the way in which I set up the test. I only tested the most newly formed support/resistance areas and I neglected all of the past support/resistance areas that were created. So it really only looked at areas where double bottoms/tops could be formed.

I'm going to rewrite the code to have it look at all of the s/r areas and I'll post the results.

jklatt
Roundtable Fellow
Roundtable Fellow
Posts: 79
Joined: Sat Feb 17, 2007 11:51 am

Post by jklatt » Thu Oct 01, 2009 2:39 pm

I started working on this last night and came across a problem when looking at all support/resistance levels below/above the current price.

Do any of you guys have any ideas on how to determine if the support/resistance level is "meaningful". That's a pretty loaded question, but ultimately what I'm getting at is that a weekly swing high that occured 10 years ago probably isn't very meaningful (it might have very little influence on price behavior). It feels like there needs to be some sort of strategy that takes the swing's "order" (daily swing, weekly swing, monthly swing, etc.) into account and look at how old the swing is and determine if the swing is a "valid" swing.

Maybe this is one of the reasons why it's more difficult to design a counter trend type system? Maybe it's better to look for price behavior that is creating a lot of uncertainty (fast moving prices?) and look for it at any support/resistance levels? I don't know. I'd be willing to test out some ideas if someone has some.

Post Reply