Data Analysis and Strategy Development


data_analysis_header.jpg

The most important thing you can do as a developing trader is consistently review and analyze your trades.

As a data-driven trader (and a data geek in general), I love data analysis in trading. When reviewing and analyzing your trades, your goal is to identify potential pitfalls, understand what you did wrong, understand what you did right, and single out any trends, ultimately allowing you to draw conclusions about how you can improve in the future. Like any other new skill such as playing an instrument or learning a new sport, learning to trade requires practice and a lot of trial and error. The only way to get better at it is to practice, collect data, analyze trends and mistakes, create rules to avoid mistakes in the future and then try again while following those rules.

I do this occasionally, especially if I feel like my trading is getting sloppy. Usually in these situations I've been making silly mistakes like clicking buy when I mean to click sell, buying/selling the wrong stock due to a typo or just not changing the ticker in the right window, chasing entries and being greedy on exits. These types of things usually indicate that I’m stressed out and need to take a break and get my head on straight before I continue. When performing this type of analysis there are a few key questions you should be trying to answer:

  • Do your entries and exits make sense?
  • What is your strongest trade?
  • Where do you fail the most?

At times in my trading career I've found myself unable to answer these questions, either because I've lost my way or because I just haven't analyzed my trading in a while. Perhaps I'm using a strategy that worked in the past but now the nature of the market has changed and I've failed to adapt my strategy to the new conditions. I usually have a plan for each specific trade I take – sometimes even multiple plans – but that doesn't mean I haven't unknowingly been creating awesome plans for setups that, statistically speaking, I’m not very good at trading. Sometimes it’s easy to lose sight of what you’re good at when trading becomes monotonous because you just wake up and do the same thing every day with a systematic method.

During these times, I often don't know exactly what's going on so I rely on data to figure it out. To demonstrate, I'm going to use one such strategy analysis session from a few years ago as an example:

To cure my trading blues, I took several months worth of trades and went on a quest to find trends and correlations, then looked at the statistics surrounding which setups I was trading and how they were working. I found some interesting stuff which explained why I felt my trading had been sub-par. I’m going to share that here with the hope that it will help you understand what you should be looking for as you develop as a trader and will assist you in interpreting the information you have available to you. I’ll start by talking about what my process was for the analysis and then get into the results:

Step One:

My first task was to take several months of trade data and upload it to Tradervue which is an awesome service for analyzing and creating reports with trading data. I then started to go through some of the basic reports such as volume traded (i.e. my own sizing), instrument volume (the stock’s average volume), performance by day of the week and hour of the day, performance by SPY movement and SPY gap, and overall win/loss ratio. This gave me a starting point.

Right off the bat I noticed that I had been under-performing on Thursdays and Fridays and also under-performing on instruments that trade less than 500,000 shares on an average day. I also noticed that I had a near 90% win rate on Wednesdays and Mondays were very high also. This indicated that maybe I was getting burned out as I go through the week and also that a lot of losses were coming from low volume stocks. Then I took it a step further and looked at a sample of loss days, a sample of win days, and ten weeks of daily data to decide whether the losses on Thursday and Friday were all from one or two days or if it was actually a trend. I discovered that out of ten random trading weeks I chose, I only ended Fridays green 2/10 times, and Thursday only 3/10 times!

In contrast, I was killing it on Mondays and Wednesdays, and Tuesdays were a mix and match of wins/losses. This told me that I should be more aggressive at the beginning of the week and taper off and just chill out toward the end of the week because it seemed like I was getting burned out or just trading out of boredom. With the sample of random win and loss days I also wanted to see whether they started with wins or losses. I pulled 23 random winning days and 25 random losing days and looked at the first trade on each of those days. I discovered that 19 out of 23 winning days started with a winning trade, and also that 18 out of 25 losing days started either with a losing trade or a flat trade. This told me I was having some difficulty coming back from a loss in the morning.


Step Two:

Now that I knew most of my winning days started with a win, I wanted to analyze the four days that started with a loss and ended up green overall. My goal was to identify why I was able to recover on those four days. I learned that all four of those days that I ended green I started either with a very small loss or a flat trade. I ran a similar analysis on the 7 losing days that started with a win but turned red by the end of the day. 6 out of 7 of those days were either a Thursday or a Friday, and all 7 of them started with a very small winning trade. So, it seemed that if I started with a win that was "too small", I had a high likelihood of turning it into an overall losing day by the end of the day, especially if it was a Thursday or Friday. Likewise, if I began the day with a small loss, there was a good chance I’d be able to recover from it and turn the day green overall.

The pattern was crystal clear: basically if I started the day with only a small win, it felt like I needed more, so I’d push and trade weak setups rather than letting a good trade come to me. If I began the day with a small loss, then it didn’t seem to matter to me, and I’d usually be able to recover from it.

Finally, I wanted to get to the questions mentioned at the beginning of this post: Did my entries and exits make sense? What was my strongest type of trade, and where was I failing the most?


Step Three:

To accomplish this I arranged my trades first by biggest loss and then by biggest gain. I opened every single trade in order and looked at the charts to see which setup I was trading on each one. To my astonishment, many of my biggest losses didn’t even have a setup! I was trading them strictly based on a big intraday volume push, or anticipating something I had minimal data for, like trying to short weakness, buy strength, or short the front side of a parabolic move.

These types of trades are very tricky for all traders because you really have no defined risk and you need to enter the trade with a smaller size anticipating that the trade will most likely go against you at first and you’ll have to average into it. I’m pretty good at that, generally speaking, but I was getting sloppy on my entries and the types of stocks I traded these setups on. Another way of looking at it is that I was trading the right setups on the wrong stocks or that I didn’t have specific criteria defined for the setups even though I felt like I did in my head. I also discovered that my biggest gains came on only a few types of trades and during very specific times of the day.

Using all this analysis, I was able to refine many of my rules and get my trading back on track. Here are some examples of the rules that this analysis allowed me to come up with and some information on where my best and worst trades came from. I still follow many of these rules today!

Rules (these apply to day trades only):

  • Eliminate buying on strength and shorting on weakness (e.g. buying HOD breakouts and LOD breakdowns). Instead, short only pops and buy only dips
  • Minimum average daily volume of 500k shares until further notice. No exceptions
  • Be aggressive primarily on Monday and Wednesday. Relax on Thursday and Friday
  • The first trade is important. Do everything possible to ensure it's a win. If in doubt, wait it out
  • Start with a large loss = stop trading for that day. No exceptions
  • Start with a small loss = be cautious, but keep going, unless it’s Thu or Fri
  • Start with a small gain = be cautious, but keep going
  • Eliminate all pre-market trading until further notice. No exceptions
  • Eliminate all trading between 11:30am and 3pm. Most of my gains come in the morning, historically. No exceptions
  • For buying dips, buy only near the 50ema. This is a reiteration of a rule I already had, since I wasn’t really following it

My best trades occurred in the following situations:

  • Trading anything with extreme momentum while following the above rules (e.g. very, very high relative volume)
  • Parabolic bounces with minimum 7 days of red in a row, ideally 50%+ drop over that time
  • Parabolic shorts with minimum 7 days of green in a row, and minimum 50% gain over those days, ideally with a gap up
  • Perfectly formed bear flags (i.e. 3-4 days in a row stuck at the EXACT same level)
  • Short continuations after first day weakness where most of the weakness was in the morning and the stock consolidated near lows all day
  • Perfectly formed bull flags, especially at/near round numbers

My worst trades occurred in the following situations:

  • Shorting first day momentum or extreme momentum on the front side or before 3pm
  • Buying first day momentum too soon, not near the 50ema or after too big of a morning rush
  • Buying volume spikes/anticipating a move with no daily setup or volume

Remember, the goal of all this analysis is to review your performance and identify areas of improvement, which can provide you with a more solid system of rules that will both cut down on taking trades that aren’t worth the risk and also increase your win percentage drastically. This is an important part of developing as a trader and something that you absolutely must do if you want to be successful in the long term.

Until next time, happy trading!