Finding a trading edge: a case study

AdamAdam Grimes's blogs, General Comments, Technical Plays, Trading Theory14 Comments

I have been thinking about one writer’s critique of my series on randomness and the problem of finding a trading edge.  His charge was essentially that I had copped out in my last post in that series by not actually providing anything of value to answer the questions I had raised, beyond merely saying that “every edge we have as technical traders comes from an imbalance of buying and selling pressure.”  This raises a few interesting points.  First of all, I actually think that sentence sums up the whole of technical analysis pretty well and is the single most important thing for any technical trader to keep in mind.  It is the first and the last thing that anyone trading any kind of pattern needs to think about.  Trade patterns with discipline and consistency, and you may make some money.  Trade those same patterns, but focus on applying them in environments where there is a real imbalance, or define your patterns to already filter for those imbalances, and you will likely do much better.  It is no exaggeration to say that this idea is the very essence of the entire discipline of technical analysis.

Now, I know this answer smells a little bit like a simple platitude and traders, being practical people, want better answers to the question of where to actually buy and sell.  Right?  Well, I think the problem (if there was one) with my earlier answer is that it may be too vague… it may leave too many other questions unanswered.  Let’s address that today by taking one very specific case and thinking through the problem of how to identify buying and selling imbalances.  I think this will be interesting and useful to many of our readers, and may give you some ideas you can apply to your own trading ideas.  (Also, before we start, I want to define the scope of this post clearly.  This is about the concepts and thought processes behind quantifying the kind of trading edge that may or may not exist around a specific kind of imbalance.  This is not a math lesson.  I will cut corners and oversimplify a lot of the stats and math in this article just to make the points with more clarity.)

Last week I was a bit under the weather and traded from home a few days, so I had some time to think about a couple new ideas.  I realized that I have been tweeting the In-Play list from the SMB Radar every morning around 9:45, so we now have a real-time record of what we had identified as being In Play early in the day.  Joe P and I created the Radar specifically for the purpose of finding stocks with unusual order flow because we knew they offer the best opportunities for daytraders, so, theoretically at least, this In Play list I have been tweeting should have some tradable information in it.  At this stage of the process you have to spend some time finding the right questions to ask:  what do I mean by tradable information?  This is a non-directional list of In Play names–we need some clear, systematic rules for which ones to buy and which ones to short.  Where do we execute?  Where do we get out?  How do we choose which ones to trade?  I spent a few hours obsessing over these questions myself, and then one of the very nice guys I mentor had the misfortune of sending me an IM to ask how I was feeling and if I was over my cold.  Much to his dismay, I’m sure, he received a half hour unbroken download of every random thought I had about the In Play list and I started nailing some of these questions down.  We would go back manually and copy the list from my tweets, and then we would keep it simple — we will find the price of each stock at the time of my tweet and about 6 other prices at other points in that day.  And, oh yeah, this has to be done by hand so good luck, get some help, and you don’t have any way to know this yet, but it’s really a 4 day project and I’m going to be checking in with you about noon tomorrow asking why it’s not done… 🙂

Now, I think there are a few good lessons here.  We started with broad questions and worked down to some more concrete definitions.  I knew in general that I wanted to be long strong stocks and short weak stocks, so I had him get all the opening prints for that day for each stock.  Maybe it also makes sense to look at whether we opened up or down, so get the previous close too.  And we need to measure performance through the day, so let’s just grab some random prices at 12:00 2:00 and the closing print.  It is also important to notice that this is very, very coarse analytical work.  I do not know that 12:00 is the “right” time to mark these trades, but I just need to look at enough of them to be able to see if we have something that warrants further investigation.  At this stage, the goal is not to define a system, but simply to check for a real statistical tendency.  (And, the bad news is, these tests fail well over 95% of the time in my experience.  Things we think should work usually don’t, at least in terms of hard, cold stats.)  I sent an email to my entire group of trader trainees asking for help with this project, and I had a very important ulterior motive for doing that.  Many of the things I have learned about markets have come from this kind of manual research.  Your brain absorbs patterns differently when you actually go through charts and write down prices… a different level of comprehension and assimilation takes place.

Let’s fast forward a bit and just say that the results we saw from this limited manual test were actually pretty astounding.  I won’t bore you with the numbers, but we saw enough of an edge to justify digging a little deeper.  The next stage was to standardize these results.  I tweeted at 9:45 some days, 9:37 some days, 9:58 others… these random times did not really make sense, but were just what I could manage as I was trying to trade and do a thousand things at once.  So, for a better backtest, I wrote code that went back and grabbed the in play rank for the complete stock universe at a specific time each day.  In addition, I was now able to take some prices from other times as well so we could see how the trades develop through the day.  What started out as a handful of stocks has now quickly grown to 40 days * 450 stocks (even though we’re just looking at the top 10 or so each day) * 20+ data fields for each stock… but let’s skip over a lot of those ugly details and go right to where it gets interesting…

After doing a little more number crunching, I zeroed in on the top 10 In Play stocks from the SMB Radar for each trading day in January, and applied a simple rule set of entering a trade at one time and exiting a few hours later.  (I’m not going to give the exact times, but they don’t really matter.)  This is still a pretty primitive measure because there is no stop and also no profit taking mechanism in between these two times; we are still simply trying to nail down the edge a little bit better.  Let’s take a look at the trade stats:

Simple Filtered
N= 80 17
Mean 0.22% 0.84%
Median (0.03%) 0.12%
StDev 1.59% 1.65%
Largest 4.66% 4.66%
Smallest (3.05%) (1.59%)
Win% 50.0% 64.7%
Avg Win 1.43% 1.75%
Avg Loss (0.92%) (0.54%)
Ratio W/L 1.6 3.2

The column labeled “simple” shows the returns if you did this for each of the top 10 In Play stocks at this time, with the entry criteria that you went long stocks that were up from the opening print and shorted stocks that were down from the opening print.  Not bad… 50% win ratio with my average win 1.6 times my average loss.  Can’t complain about that.  Average trade is 0.22%… not thrilled about that but it is tradable from a purely systematic standpoint.  So, this is great.  This is concrete proof of concept, and I think is an illustration of my claim that imbalances create trading edges.  If you simply bought and shorted all stocks with no regard to In Play rank (yeah… Idid that test too) at these same times, following the same entry criteria, you would find no edge whatsoever.  Keep in mind, stocks get on that list because they are displaying unusual trading activity in the first place… because they have shown evidence of a buying / selling pressure imbalance.

But what is this “filtered” column I see?  Exact same stocks, except the entry criteria was now modified so that you could only buy if the stock was up 2% more from the open than the S&P 500 (vice versa for shorts).  Think about the logic behind this idea of using “excess” (in excess of the broad market) price movement to trigger trades.  If a stock is up 3%, but the S&P is also up 3%, is there really buying pressure in that stock?  Maybe, but it’s much more clear if the stock is up 3% over the same time the market is down 2%… now we have something interesting.  Applying this very simply price action rule (and, again, let me stress that it is price action that demonstrates an imbalance of buying / selling pressure) reduces the number of trades in the system by nearly 80%, doubles the average win/avg loss ratio, raises the win ratio to a very respectable 64%, and raises the average trade to a solid 0.84%.  For short-term intraday stock systems, these are pretty solid numbers.

I apologize for the length of this post (somehow it got to be 1:15 AM… I think the Calvados has something to do with that…), but I hope this has been interesting and useful.  I will continue to try to tweet this In Play list from the Radar every morning, and it might be worth spending some time thinking about how to trade ideas from that list in light of some of the ideas in this post.

Follow AdamG_SMB on Twitter

14 Comments on “Finding a trading edge: a case study”

  1. Adam,

    Thanks for writing this… very interesting and relevant to me.

    I find this somewhat unique: “Your brain absorbs patterns differently when you actually go through charts and write down prices… a different level of comprehension and assimilation takes place”. Can i take it that you feel this is ‘old school’ manual research is worth investigating?

    What do you use to run your tests when you are not feeling old school?

    My best,


  2. Man, I am quickly becoming one helluva fan Adam!
    What would really be cool would be the comparison with your own trading results or those of your average trainee, assuming you all base your trading on the inplay list? Totally understand should this not be possible.
    Another point is the expected lifetime of the imbalance. This might differ between the two lists (as they screen for different magnitudes of imbalance) and therefore it may be necessary to optimize holding time for each scenario and compare. Of course this introduces additional danger of overtraining but for me one of the most important questions with respect to randomness is the question how long markets remain non random, after a particular imbalance first occurs, and how that relates to the magnitude of the imbalance itself.
    Last point is the question of whether the way you filter stocks in the second column leads to an overrepresentation of trending days as opposed to other days. Does that affect the results?
    Even if you dont answer a single of the questions, still love the work!

  3. Adam,

    Do you allocate a part of your trading business towards programmed trading? Seems like you have something there with the radar.

  4. Very interesting Adam but Calvados? Too much of that and you won’t have to worry about trading… or anything else. Your brain will be ready for the specimen jar!

  5. I do a lot of testing in a combination of excel (not idea) and stata… with some stuff coded directly in tradestation. if you’re going to learn something, i probably would learn R to do work like this.

  6. i think you’re asking some of the key questions. if we do trade this systematically, it will probably be with a trailing stop or something like that rather than simply exiting at a randomly chosen point in time.

    as for your last question… yeah that’s a danger. one way to look at it would be to actually look at each of the trades as excess returns (taking out the market influence basically)… or looking over a longer time period. i’d just point out that we havent had a lot of great trending days so far this month… not that that is any kind of real answer, but it’s something to be aware of.

    thanks for your great questions

  7. You said that the smb radar is designed to show stocks that have buying/selling imbalances, and then when you decide which stocks to buy/sell, it seems like you are just picking something out of the air, like is the first tick up.

    If the smb radar detects buying/selling imbalances, they why isn’t there something in it that tells you whether it’s a buy or sell?

  8. There are several components to the Radar ( This one is (the IPR) is actually the only one that is non directional, but I thought adding the simple directional cue was pretty obvious. If there is unusual activity, indicating an imbalance, and the stock is up a lot… it’s reasonable to assume this is buying pressure, right? (note that it’s not first tick up… it’s a significant move beyond what the S&P is doing at the same time.)

  9. I think the “critic” missed the true thrust of that previous article (which did happen to mention buying/selling pressure in passing) which was that the judgment that comes from experience can allow the trader to effectively employ selectivity to all the signals he sees. What really resonated with me was the remark that Adam knew some consistently profitable traders who follow moving averages for entries but don’t act on every crossing action they see. They examine the context within which the signal was received (is volatility increasing or decreasing ? How is this security moving in regards to perceived support/resistance levels ? etc.) to decide whether the trade in question offers them an edge.

    This mirrors my own experience. My setups (for swingtrading, though, in my case) are simple but I dismiss close to half of them The difference in the dollars-gained / dollars-lost ratios between those signals taken and those discarded really is like the difference between wheat and chaff and it remains persistent.

  10. Very interesting analysis (all five articles). The big question lies in “an imbalance of buying and selling pressure.”, and I assume I am correct in reading this as “avoiding market noise”, in other words being on the side of the big money. What has concerned me in my trading development is trying to find quantifiable methods of filtering the market so I’m only in for the moves that have meaning. Since you are a stock trader, you’re able to lay the S&P’s down as a backdrop, and you seek what you call ‘unusual trading activity’ (a ‘disturbance in the force’). As an FX trader, I assume you could use the dollar index as a proxy for the S&P. But when you are looking for ‘unusual trading activity’, I would assume you’re basically stuck with looking at price with no ability to ‘read the tape’ as SMB traders do. How do you fight the war in this case? I’m trying to be as quantitative in my approach as possible, without simply becoming all about ‘feel’. Thanks!

  11. Thanks for this excellent comment. Posts like this make me happy for diversity of perspective in the world and the willingness of others to help me improve. You made a great point, and I absolutely agree that I did not emphasize this enough. Thank you! Great contribution to the discussion.

Leave a Reply