Showing posts with label Using Quantifiable Edges. Show all posts
Showing posts with label Using Quantifiable Edges. Show all posts

Wednesday, December 14, 2011

Introducing the Quantifiable Edges Catapult Exit Designer

The Quantifiable Edges Capitualtive Breadth Indicator (more commonly known as the “CBI”) was introduced in just the 3rd blog post I ever did on January 6, 2008. The CBI was devised from a system I use to trade individual (primarily S&P 100) stocks and sometimes ETFs. I devised the system in 2005 and refer to it as my “Catapult” system. The Catapult was designed to take advantage of extreme (often capitulative) selling in these securities. The CBI reading is basically a count of the open Catapult triggers at any one time among S&P 100 stocks. What I noticed early on was that broad triggering of this system was frequently a sign that not only were these individual stocks primed for a bounce, but the market as a whole was also very likely to bounce. I have written an awful lot on the blog about edges that could be found by entering the market when the CBI reached certain levels. Traders that would like to examine any of that research more closely are always welcome to use the “CBI” label at the right hand side of the blog. It will pull up all associated posts.

In February 2008 I began the Quantifiable Edges Subscriber Letter. As part of the letter I included signals for my Catapult System. The success of the Catapult trades over the years has made it an attractive and somewhat popular feature for subscribers. I publish any signals that occur that night in the letter. Then using a limit order the next day I track them in the letter as well. When the exit signal occurs I also note this. The standard exit for a Catapult is at the open the day following the exit trigger. (On occasion I will send intraday updates alerting subscribers that the exit will trigger at a certain level and I am going to exit the trade at the close rather than waiting for the next day’s open.) While many subscribers have profited from the Catapult trades, there has been one common complaint.

The complaint is that since the Catapult is the one system on the site in which I do not reveal the entry and exit criteria it makes the trades uncomfortable for some traders. Not knowing when (or exactly how) the exit will come has prohibited some subscribers from ever entering these trades. They have instead watched many go by and found themselves a bit frustrated that they couldn’t take advantage without understanding the exit criteria. So I set about to solve this issue. Recently I released to subscribers the “Catapult Exit Designer” for Tradestation. The Catapult Exit Designer is open code that triggers entries as listed in the Subscriber letter over the last 4 years (over 250 trades) and allows the users to test their own exit criteria. It generates files for them with results of all trades. And for those subscribers that don’t use Tradestation, I show all the code and explain all the logic behind it so that you may easily transfer it to you preferred platform. In addition I provide sample exit strategies that would have produced results very similar to the actual Catapult exits.

The Catpult trades have done very well over the years. Of those that received fills and were tracked in the letter over 72% were winners, the average trade made 3.35% and the profit factor has been an impressive 3.32. What has most attracted me to this strategy is not just the fact that it has made money, but WHEN. Catapults generally trigger when the market gets scary. They happen when other systems and techniques I employ have sometimes struggled. So they have not only made me money, but they've done so when other methods were losing.  This was greatly useful in helping me to limit or avoid drawdowns. The timing of the trades can be seen in the chart below. The top of the chart shows the S&P 500. The indicator on the bottom is the CBI. One way I track catapult trades is by "clusters". A cluster of trades begins when the CBI moves above zero and it ends when the CBI returns back to zero. Historically I found over 90% of clusters would have been net winners had you taken all the trades in the cluster with equal size. (The last cluster that had a net loss was about 2 ½ years ago.) Above each cluster in the chart is a number. That number shows the net additive gains that would've been generated by that particular cluster.



(As an example to clarify, the latest cluster closed out in October. That cluster saw 8 Catapults get triggered and filled. They all were winners (not typical). The % gain for each was the following: 2.8%, 6.2%, 5.0%, 11.1%, 5.2%, 8.9%, 0.2%, and 0.3%. Add those numbers up and you get the 39.7% shown above the October cluster. That is what I mean by “additive gain”. It is NOT a portfolio return.)

This year all the trades have come in 4 big clusters. And they all came during sharp selloffs when other methods may have been under stress. I’d be happy to show years 2008 – 2010 but this post is already way too long. If you want to see those results you may use the link below. They are shown there.

http://quantifiableedges.blogspot.com/2011/02/using-qe-to-your-advantage-subscriber.html


The Catapult System has been a favorite of mine and of subscribers over the years. Hopefully with the new Catapult Exit Designer more people can begin to take advantage of the opportunities the Catapult System identifies. If you think there might be some tough times in 2012 and would like to implement a method that can possibly take advantage of them, then the Catapult System may be one option. Both the Catapult System triggers and the new Exit Designer are completely included in a Quantifiable Edges Gold Membership.

Monday, July 11, 2011

Edges After Poor Employment Days

The gap down on Friday occurred in reaction to the release of the employment report. The employment report is typically released on the first Friday of the month, though in some cases such as this month it occurs on a different day. This weekend I spent a good amount of time going through the BLS website and programming in all the employment days from 1993-present.

I looked at Friday's action a few different ways with regards to employment days. I found it was only the 10th time that the SPY has gapped down over 1% and failed to fill that opening gap. While I didn’t find the results significant, below I have listed the other 9 instances along with their 1-day returns.


These results seem to imply a mild inclination towards further selling the next day. Another way that I looked at employment day gaps was by using a 200ma filter and eliminating the 1% size requirement. Overall the results of doing this didn’t suggest much. I did find it interesting though that there have been three instances since the March 2009 bottom and all three instances were followed by further declines ranging from 2.4% to 4.3% during the course of the following week. Those three instances occurred on 7/2/09, 8/6/10, and 6/3/11.

I don't believe either of these employment day studies is worth heavy consideration. My main take away is that the reaction to the employment report is not necessarily an overreaction. As the employment day results showed there does not appear to be an inclination for an immediate reversal. In fact, downside follow-through may be more likely.

Employment day seasonalities aren’t typically as pronounced as Fed Day seasonalities, but they can be worth examining on occasion. Therefore I went ahead and incorporated the employment day code into the QE Tradestation Indicators & Functions Package. This way package purchasers or Quantifiable Edges subscribers may explore employment days further on their own. (Those who previously purchased the package may download this updated version at no additional charge.)

Tuesday, May 10, 2011

A New Tool For Quantifiable Edges Subscribers

Quantifiable Edges subscribers were recently treated to a new feature available with their subscriptions.

Over time I have had numerous requests from members who wanted to utilize some of the Tradestation indicators and functions I’ve designed. Many of the indicators requested are shown on the Quantifiable Edges Charts page in the members section of the site. Others are discussed from time to time in the subscriber letter. I recently completed putting a few of these indicators together in a package. It is now available to the public (free of charge to all subscribers as long as their membership is active, or $125 for non-subscribers with no expiry on the code).

A list of calculation groupings is shown below:


1) Fast/Slow Offset Historical Volatility

2) Fed Days (today and tomorrow)

3) Breadth %

4) Breadth % Rank

5) Ratio Adjusted McClellan Oscillator (RAMO)

6) McClellan % Ranks

7) McClellan % Ranks (Pos/Neg)

8) Closing TICK TomOscillators


More detailed information on all of the calculations as well as instructions and examples can be found in the Quantifiable Edges Tradestation Analysis Techniques User Guide. The user guide may be downloaded by anyone who takes a free 1-week trial of Quantifiable Edges subscriber service (only name and email required).

Purchase includes Tradestation formatted .eld files for import as well as the 15-page guide. More indicators and functions will likely be added to the package over time. Purchasers may download updated versions free of charge for up to 1-year after purchase.

For a free Quantifiable Edges trial and to access the detailed user guide you may register here. The user guide can be found by clicking on the “QE Indicators/Functions for Tradestation” tab on the left hand side of the members’ pages.

Thursday, February 17, 2011

Using QE to Your Advantage - Subscriber Tools, part 2

In the last installment of "Using Quantifiable Edges to Your Advantage" I began discussing some of the tools available to subscribers. In that post I discussed the Catapult & CBI in great detail. Today I will review several other tools available to subscribers (though not in as much detail). I've discussed several of these before so blog readers may be familiar with some of the below.

The Aggregator - Much of my market bias is determined by the studies I conduct and consider "active". The Aggregator is the tool I developed that weighs the estimates from those studies and gives me a bottom line bullish or bearish expectation. I also use a separate calculation called the Differential that measures recent market performance versus recent expectations. The Aggregator is the number one tool I use in determining my bias and setting up my index trades. More information on the Aggregator can be found by clicking the link below.

http://quantifiableedges.blogspot.com/2008/07/quantifiable-edges-aggregator.html


The Quantifinder - Over the course of the last three years I have published over 1000 studies in either the blog, the subscriber letter, or both. Studies that appeared to me to either have a substantial edge or to be notable and worth reviewing in the future are included in the Quantifinder. The Quantifinder is an engine that examines the current day’s market action and determines whether any of about 900 studies would trigger based on today's action. Any studies that appear pertinent are automatically referenced and a link is provided so that users can go back and read what I wrote about the current setup the last time it occurred. More detailed information on the Quantifinder can be found by clicking the link below.

http://quantifiableedges.blogspot.com/2009/05/quantifinder-unveiled.html


The Numbered Systems - Quantifiable Edges subscribers have access to 11 different mechanical systems. These systems are designed for trading either large cap stocks or ETFs. Each night I publish a spreadsheet that shows any stock among the S&P 500 or any ETF among the 100+ on my ETF list that has triggered one of the numbered systems. Each system has its own webpage that comes complete with detailed rules for entry and exit. Also on the webpage is Tradestation code for each system. Subscribers may take the code and use it for their own testing, or they may change it-using it as a starting point to develop one of their own systems. (Those who are interested in developing their own systems and testing across a large group of securities using Tradestation will find detailed instructions on the website on how to do so.)

The Charts Page - Quantifiable Edges tracks a number of unique indicators on its charts page. These include indicators such as the CBI, the 3/10 Offset HV, the Volume SPYX indicators, and more.



The Archives - The Quantifiable Edges Subscriber Letter is now three years old. Over the last three years there has been some amazing market action which has led to a massive amount of research. All of Quantifiable Edges past letters and published research are available to subscribers for easy viewing in the archives section of the website. Many subscribers find themselves reviewing old letters thanks to being sent there by the Quantifinder, but if you feel current action is similar to something you've seen over the last few years and you want to see what research I was discussing then, you can simply pull up those letters on the archives page.


The Downloads Page - Over the last three years I have created a number of studies and special reports. Several of these along with special coding and spreadsheets can be found on the downloads page in the members section of the website.


Educational Videos - in 2010 I began hosting webinars for subscribers once or twice a month. In these webinars I discuss topics such as the Aggregator, the Catapult System, how to run back tests across large lists of securities, POMO indicators, day trading opening-range breakouts, and more. I have archived many of these webinars and made them available for subscribers to view any time.


Proprietary Data Download - Subscribers that like to do their own tinkering and development can download historical data on several Quantifiable Edges indicators. Data is available for the Volume SPYX indicators, the CBI, and the Aggregator.


The Subscriber Letter – The tool most utilized by subscribers is the nightly letter. It arrives nightly and is complete with my research and studies for the day along with my interpretation of recent studies. The Aggregator chart is always included and discussed, and the intermediate-term outlook is updated at least once per week. Additionally, it contains trade ideas that have been tracked and recorded over the last 3 years. It is not a tip-sheet, but the trade ideas, whether they are index trades, Catapult trades, or something else, have done quite well since the inception of the letter. They can all be found on the Trade Idea Results Spreadsheet, which is downloadable from the System page on the website by members at any time.


It all began with the subscriber letter. And while that has changed some over the years, the majority of the enhancements have come on the website. How traders ultilize the research, the letter, the indicators, and the systems is up to them. There is a lot available. Hopefully this series of posts will help new and experienced readers alike to better take advantage of Quantifiable Edges, regardless of whether you have a subscription or whether you just read the blog.


This completes “Using Quantifiable Edges to Your Advantage” – for now. New features will be released over the next several months and I’ll be sure to add them to the end of this series once they are available.

Monday, February 7, 2011

Using QE to Your Advantage - Subscriber Tools 1 - The Catapult & the CBI.

So far in my series, "Using Quantifiable Edges to your Advantage" I have focused on the historical analysis studies, how to interpret them, and how to apply them to your trading. In the next few segments I'm going to highlight and discuss some of the tools available to Quantifiable Edges subscribers.


The first set of tools I'm going to discuss is the Catapult System & the Capitulative Breadth Indicator (CBI). I designed the Catapult System in 2005. At the time much of my trading revolved around trend following. One of the holes identified in my trend following approach was that it didn't allow me to benefit from explosive reversals and short covering rallies that often occurred near bottoms. I often missed good portions of rallies because I was waiting for trend confirmation. After considering this for some time I decided to try and develop a complementary system to my trend following approach. Since my exposure would typically be quite low during these bottoming events I figured a methodology that could take advantage of them for short-term gains would work quite nicely. I could benefit from the reversal and then be out of those trades and ready to get back into some trend of trades as the new trend confirmed and those trades became available.


It was this line of thinking that led me to develop the Catapult System. And though I don't do as much trend trading these days, and instead focus more on swing trading, I've still found the Catapult System to be very valuable.

To develop the system I conducted a large number of studies focused on identifying capitulative selling situations. In doing so I managed to discover a few key characteristics that I used to locate likely reversal areas. This is the essence of the Catapult System.


Two things I found important when considering the predictability of capitulative selling resulting in a reversal were 1) institutional ownership and 2) liquidity. It is for this reason that I have always demanded both for trading individual stocks. For ETFs I don't really worry about institutional ownership, but I do demand liquidity.


The Capitulative Breadth Indicator (CBI) is basically just a count of the number of open catapult trades among S&P 100 stocks. I've charted and discussed this indicator many times since beginning the blog in 2008. I've been able to generate the CBI using back tests from 1995-2005, and then using real-time data from mid-2005 to the present. My basic finding has been that high CBI readings have often been followed a strong reversals. Basically the more individual stocks you have suggesting selling has become too extreme and a reversal is likely, the more likely a broad market reversal becomes.

I've traded the catapult system since late summer/early fall 2005. In February of 2008 when I started publishing the Quantifiable Edges Subscriber Letter I began announcing and tracking all trades in the letter as well. The Catapult System is one of very few systems available to subscribers that I don't completely reveal the code. Still, all trades are tracked using limit orders for entry, and exit orders are typically based on either the open or the closing price. (The standard exit is to sell at the next day's open, but I sometimes alert subscribers that I will be exiting at the close instead due to market conditions.)


The graphics below I've just produced for the first time. The top of each chart shows the S&P 500. The indicator on the bottom is the CBI. One way I track catapult trades is by "clusters". A cluster of trades begins when the CBI moves above zero and it ends when the CBI returns back to zero. Historically I found over 90% of clusters would have been net winners had you taken all the trades in the cluster with equal size. Above each cluster in the charts below is a number. That number shows the net additive gains (or losses) that would've been generated by that particular cluster.




2008 was an unusual year for a few reasons. First there were only four clusters, but they were all quite large. The steady June-July meltdown led to the worst performing cluster of all time, and the October crash led to the best performing cluster of all-time. The results are taken directly from the Quantifiable Edges Trade Ideas Results Spreadsheet. This spreadsheet is available to all subscribers and trial subscribers and it shows results of all trade ideas from the inception of the subscriber letter to the present. The catapult trades have their own worksheet where color coding helps to easily break out cluster totals. Commissions are not included in these results, all results should be considered hypothetical, and they are not necessarily indicative of future performance. The totals shown are not portfolio returns but rather additive totals of individual trades. For example the first cluster shown with a +37.52% was the result of 21 individual trades. These trades were all either in S&P 100 stocks or highly liquid ETF's and for that particular cluster averaged a gain of 1.8%. (The average Catapult trade among all those tracked in the subscriber letter since 2008 has returned 3.4%.)


Next is the 2009 Catapult & CBI results chart.



The large cluster during the March selloff was very disappointing though the negative result was thanks to the worst trade ever. There were a couple of clusters where trades shown in the subscriber letter did not get fills. Then the long steady uptrend contains some nicely profitable buying opportunities on the dips.


Lastly, let's examine the 2010 chart.



There were only five clusters in 2010, though two of them were quite large. All of them were profitable, and the big, scary market drops led to some great Catapult results.


The Catapult System is in no way a complete stand-alone methodology for managing a portfolio. It could be used as a way to extract profits from the market during times where other strategies may exhibit little or no edge. And even those people who are averse to trading individual stocks could benefit by incorporating the CBI into their index trading techniques.


There have not been any catapult trades so far in 2011, and very few since the market rally began in July of 2010. The good times won't last forever though, and I'm afraid we are likely to see more big market drops occur in the next few years. Quantifiable Edges is prepared to try and take advantage of these drops using the Catapult System. If you think the catapult system might work as a new weapon in your arsenal and you'd like to learn more about it you can sign up for a gold membership here, or a trial subscription to Quantifiable Edges here.

Wednesday, January 26, 2011

Applying A Directional Market Edge To Your Own Individual Trades

This post is the 6th in the series "Using Quantifiable Edges to your Advantage". In the last two posts I've discussed 1) combining historical edges to develop a market bias, and 2) factoring in overbought/oversold measures to improve risk/reward. So now let's assume you've done those things, and the situation setting up is suggesting a strong directional edge. You've either got an upside bias and a market that is not "too overbought", or a downside bias and a market that is not "too oversold". How do you translate that information into profits?



The most obvious way to try and take advantage of this kind of setup is to take on an index position. This is something that I do a lot of, but index trading isn't for everyone and there are many ways to take advantage of a directional market edge without trading indices.


Another way to apply a directional market edge is to favor trades in the direction of that edge. Let's use the example of a systems trader that focuses on either individual stocks or ETFs. Rather than simply take entries that may occur at any time, that trader may elect to use directional market edges as a filter. In other words, if there appears to be a strong upside market edge and one of his short systems triggers, he could opt to ignore the signal or view it as invalid. But if the market edge is to the downside and a short system trade triggers, he could jump on it.


In the 10/6/10 blog I showed how I did this for my own systems. I used the Aggregator as a proxy for my market bias. I've discussed the Aggregator on numerous occasions, but if you are unfamiliar or would like a review the embedded link is a good place to start. For my tests I broke out the system performance by times the Aggregator was suggesting a market directional edge in the same direction as the system versus times it wasn't. I found that for almost all of my systems, statistics were substantially better when you were trading with a directional market edge. Times where the Aggregator signal was not confirming the individual system signal, the system simply did not fare as well.


But while I've been talking about this using a mechanical systems approach, the concept is applicable to discretionary traders as well. If you are able to identify a directional market edge then you can consistently apply that information in your decision-making. During periods where you expect the market to flourish, you should trade the long side more aggressively and the short side more conservatively. Those times when you determine there is a downside market edge you should take the opposite tack. Trade more aggressively with your short positions and more conservatively with your long ones.


At Quantifiable Edges I do my best to try and identify directional market edges for my subscribers. While some subscribers trade indices and perhaps utilize some of the index trade ideas I publish, many of the more astute subscribers simply use the information to enhance the application of their own strategies. A few public examples of this include David Varadi of CSS Analytics and Ray Barros of TradingSuccess.com.


In his 11/18/10 blog post entitled "3/10 Offset HV as a Mean-Reversion Filter" David had this to say. “I am always looking for new and interesting ideas to improve the edges of conventional systems or indicators. One valuable source of ideas is a subscription to Quantifiable Edges, where I get the opportunity each night to review how Rob Hanna classifies the most relevant situations in today’s market.”


On the other end of the trading spectrum from David is Ray. In his December 22nd post, “2010 Adieu” Ray wrote the following, “2010! You taught me many new things. If I had to choose, the Oscar would go to Rob Hanna of Quantifiable Edges. He and I are poles apart when it comes to trading style and timeframes. But through his excellent site and newsletter, he showed me his way of viewing quant studies. I have adapted and integrated his ideas into my own trading with success. Thanks Rob”.


But your trading skills don't need to be at the level of these two traders in order to take advantage of quantifiable edges. And you don't need to overhaul your trading strategies either. A simple approach like tweaking your aggressiveness based on your market outlook can go a long way in improving returns.


Index traders have long understood how to take advantage of directional market edges. But for those that trade individual stocks and ETFs, my research suggests it makes great sense to take a top-down approach. First determine a directional market edge and then look for those stocks or sectors that are set up best to take advantage of the anticipated market move. By doing this you'll have the market wind at your back and your risk/reward and total profits should benefit accordingly.

Monday, January 24, 2011

Using Quantifiable Edges to Your Advantage - Part 5 - How I Factor In Overbought/Oversold

This post is the next in the series "Using Quantifiable Edges to your Advantage". The last post discussed how I combine studies to help establish a bullish or bearish bias. Today I will discuss how I factor in overbought/oversold readings when considering whether to take (or hold) a position.



I'm typically averse to maintaining long positions in strongly overbought markets or short positions in strongly oversold markets. Being long in an overbought market, or short and oversold market, can carry a high level of risk since market reversals under such conditions can be sharp. Mean reversion traders strictly abide by this philosophy as they look to take advantage of stretched conditions and then exit once conditions revert to a more normal state. For instance they might look to buy a short-term low and then exit the trade on a moved back up through a short-term moving average. This can be a solid approach, especially if you also factor in the long-term trend of the market.


My approach is a little bit different. Rather than comparing the market’s price to a mean or measuring overbought/oversold with an oscillator, I compare recent price action to recent expectations based on estimates provided by my studies. This typically allows me to get long easier if my studies are suggesting an upside bias, and allows me to get short easier if my studies are suggesting a downside bias. At the same time it protects me from entering a position in the direction of a move that is already strongly overdone.


Let me provide a brief example to better explain. Assume that over the last three days the estimates from my studies suggested that the market should be up a total of 1%. If over that period of time the market rises 2% then I consider it overbought and too risky to hold a long position, even if my estimates for the next few days are for further upside. But if instead the market has only risen 0.75% while my estimates suggested it should be up 1%, then it would not be overbought and I could continue to maintain my long position. And if my estimates were for 1% up, and the market had declined, there again a long position would be justified. The combination of an underperforming market with positive expectations or a market that has outperformed and has negative expectations is a combination that I want to hold a position.


Some recent long signals provide nice examples of instances where a classic mean reversion approach would have to be flat or short, but I was able to maintain a long position. For most of the early December my studies suggested an upside bias. I was quickly taken out of my long position, though, as the SPX became extremely overbought early in the month. On December 15th the market pulled back for the first time in over a week and a long signal triggered. The next day the SPX reversed sharply and closed at a new high. In doing so it would've meant an exit for any classic mean reversion strategy. But despite the new high, the SPX was still considered "underperforming" versus expectations over the last few days. For me this meant I could continue to hold, or even establish new long positions. On the 17th the SPX again closed at a new high, but again it was considered underperforming versus my recent expectations. It wasn't until the 20th when the SPX was making its third new high in a row that my measurement suggested the short-term move up was getting too overheated and it was time to take profits. Even that exit was early as the market continued upward for two more days. My studies remained bullish and my next long signal occurred on December 27th despite the market closing up for the day and only one point shy of another new high.


The purpose of this is not to discuss my trade triggers in any detail but rather to share the idea that overbought/oversold can 1) be incorporated to help reduce risk and 2) be looked at a number of different ways. When I determine my position size I consider both the strength of my current open studies, and the degree that the market is overbought or oversold versus recent expectations. While you may not track studies and generate estimates in the same way I do, you should still consider adjusting your overbought/oversold measures based on market conditions and/or your current and recent outlook.

Friday, January 7, 2011

Using QE to Your Advantage Part 4 - Does an edge equal a trade?

This post is the next in the series "Using Quantifiable Edges to Your Advantage". The first few posts examined how I lay out the studies, and what I look for when examining results that would make a study compelling. Today I will touch on what it means to have a compelling edge. Does it justify a trade? What if multiple studies appear to contradict each other?

First I should say that one of the biggest misconceptions about the studies I post on the blog is that they are market calls. They are not. They simply examine market action or conditions from one narrow perspective. It is rare that I would enter an index trade based on a single study. More often it is a combination of studies that helps provide me the confidence to put capital at risk.

I use studies as many traders use indicators. It is rare that someone might see all of their indicators line up perfectly at the same time. Often price action may be suggesting one thing, while breadth, or sentiment, or intermarket action may be suggesting something else. The tool I use to help me weight my studies and determine a market bias is the Aggregator. The basic method of the Aggregator is that it takes estimates from any studies I consider open and active, and combines them into one estimate. A more detailed description of the Aggregator can be found in this post below from 2008.


http://quantifiableedges.blogspot.com/2008/07/quantifiable-edges-aggregator.html


But information about market tendencies that suggests compelling edges are useful for more than just index trades. No matter what securities you deal in, it helps to have a market bias. A bias doesn't have to be formed mathematically, but by taking a reasoned approach traders can incorporate information from Quantifiable Edges, as well as other sources, in helping to establish their market bias. I'll discuss this concept in more detail in a future post. The takeaway today is that a single study is not a market call, but rather a somewhat narrowly-focused examination of market tendencies. It's a piece of the puzzle. A useful piece, but still just a piece.


And for my money, even if there is a combination of studies strongly suggesting a directional move, I still need to factor in risk/reward. I also need to consider what would constitute a trigger. My next post in this series will examine how I look at overbought/oversold and the role that plays in determining risk/reward. And hopefully by the end of the series I will be able to clearly demonstrate how narrowly focused studies can be used as part of a solid foundation when building your trading plan…or how experienced traders can incorporate them to improve an already solid trading plan.

Monday, January 3, 2011

Using QE to Your Advantage Part 3 - What Makes A Study Compelling?

This post will be the third in the series that looks at using quantifiable edges to your advantage. Today I will discuss considerations I use that help determine whether a study is compelling and whether I want to include that study in my analysis. I will be discussing nine things to consider. I have listed them all below.


1) Average Trade
2) Percent Profitable
3) Profit factor
4) Win / loss ratio
5) Equity Curve
6) Timing of instances
7) Average and max runup and drawdowns for the trades
8) Robustness across parameters
9) Robustness across securities

Average Trade - The average trade column on the results sheet is the first thing I tend to notice. It's the number that's most often used to determine expectations. Strong positive or strong negative numbers in this column would suggest a possible bullish or bearish edge.
Percent Profitable - Percent profitable helps to illustrate an edges consistency. It is a relatively important number because a high percent profitable suggests the odds of an extended drawdown would be low. As a trader controlling drawdown is important to me so I like to see high numbers in this column for bullish edges and low numbers for bearish edges.
Profit Factor - Profit factor is influenced by both win/loss ratio and average trade. It shows how large gross gains are versus gross losses. Here again I want to see high numbers for bullish studies and low numbers for bearish ones. I prefer to see a profit factor of at least two for bullish studies or at least 0.5 for bearish studies.

Win/loss ratio - This is probably the ratio I give the least amount of consideration to among those listed. Still it is preferable to see a strongly favorable win/loss ratio when considering a study’s worth. A positive win/loss ratio means you typically have more to gain on a trade than you have to lose. It will give a setup with a 50/50 chance of success (or sometimes worse) a positive expectancy.

Equity Curve – The equity curve is a visual representation of how the study has performed over time. It is important to consider for a few reasons. First, you want to see whether the edge has been steady or whether it is recently waxing or waning. Second, you want to see if the apparent statistical edge is the result of a few large outliers. This would suggest that a perceived edge may not be reliable. I could spend a lot of time discussing intricacies, but I think just a few pictures will provide a good idea of what I look for. Below are some equity curves that I have recently run and discussed in the subscriber letter. They are all real curves, but I have erased the setup criteria.
This first curve is one that I find especially appealing. When you can draw an arrow from the lower left to the upper right section of the chart and have it never be very far from the equity curve, then that suggests a steady, solid edge.


I also find this next curve appealing. The edge is not as steady, but you can see that there has always been an upward slope and that slope has recently increased.

This next curve is one that I do not find appealing. While it looked like the setup provided an edge for a period of time, it now appears that edge is either waning or no longer present. This is a setup I may continue to keep an eye on in the future, but would not include it as part of my current analysis.

This last curve is an example of one that was heavily affected by a few outliers. When the statistics were generated it appeared there may be a downside edge. A closer look at this equity curve tells a different story. What we see are three big losers in the middle of the curve that account for nearly all of the downside edge. If you take out those three instances, the rest of the curve is just sideways chop.

That should give you a decent sampling of things to look for when examining an equity curve. If you're able to find curves that looked like the first one, then you should do very well in identifying edges.  I don't commonly show equity curves in the blog, but it is an extra bit of information that I often include in the Subscriber Letter.
Timing of instances. Recent or distant history? - You want to look at more than just the statistics and the equity curve. You also want to look at when past setups similar to the one you're examining have occurred. Was the trading environment substantially different then than it is now? For instance, I recently ran a study whose results were very positive and it had a very strong, steady equity curve. But when I looked at the dates I found that most of the instances had occurred in the 60s and 70s. In fact the current setup was the first occurrence since 1996. While the setup looked good from all other aspects, I was wary of including it in my analysis due to the fact that it hadn't triggered in over 14 years. I would much rather rely upon results that have been achieved in the recent past as opposed to results that were all achieved in the distant past.
Average and max runup and drawdowns for the trades - I also make sure to note runup and drawdown statistics for each of the setups. This is helpful for number of reasons. Runup stats give me some idea of how much of a move to expect. If the market moves in the expected direction much beyond where a typical runup might take it, then I will often eliminate that study from my "Active List". I do this because any further move in the expected direction is likely due to forces other than that particular study. Looking at drawdown statistics provides further insight into how the market typically reacts to the setup being studied. Is there typically a fast move in the expected direction with little or no drawdown? If so, a move up opposite expectations could suggest the market is sicker than usual. Drawdown statistics are also very useful in helping determine appropriate position size. If the environment is volatile and trades often take a lot of heat before moving in the expected direction, then more conservative position sizing is likely appropriate.

Robustness (part 1) – Robust results serve a better chance of performing similar to expectations going forward. Robustness can mean a few different things. One way to test robustness is to see whether a minor change in parameters causes a big difference in results. Ideally you want to see a setup work across a range of parameters. If the parameters are too fine tuned, then the perceived edge may be more a result of data mining and not an actual edge. If a new study is being conducted and the current setup barely qualifies for the parameters being described, then there is a much higher chance that study is not robust. Researchers should strive to ensure the setup they are describing is typical of the sample set that makes up the results, and not an extreme case or an outlier. Of course this isn't always possible, but when a study appears robust and the setup is typical of the sample set, then I have a greater confidence level in those results.

Robustness (part 2) – Another way to test if a study or concept is robust is to run the setup across a broad list of securities. This isn't something I typically do with the index studies that I publish on the blog and in the Subscriber Letter. It is something I do when I develop systems. So systems like the Quantifiable Edges Big Time Swing System or any of the "numbered systems" that are available to Gold subscribers are all tested across a broad range of securities. A system that tests well across a broad range of securities, rather than one that is tailored to a specific security, stands a better chance of performing well in real-time.

 
Those are my top criteria when determining whether a study is worthy of consideration in formulating my market bias.  In my next installment of this series I will discuss whether an edge justifies a trade, and how I weigh different edges when considering trading opportunities.

Friday, December 17, 2010

How many instances are needed when considering study results?

This post is the 2nd part of a series I started a few weeks ago that will discuss using quantifiable edges to your advantage.  Today I'll discuss a common question I get about the studies.  How many instances are needed for valid and usable results?  It will lead into "What makes a study compelling?" in the next post.

Many of the posts I put on the blog are what I refer to as studies. In this previous post I showed the layout of the studies. A study is simply test results of an idea. Most of the time the idea is based in technical analysis. It looks to answer the question, “How has the market performed in the past after…”


Some studies are fairly general. For instance, I might look at how the market performs after it has traded down 3 days in a row. Others are more specific with added filters. Perhaps I notice that not only is the SPX down 3 days in a row, but it also is trading at a 10-day low, and is above the 200ma and volume has increased each of the last 3 days.


Both studies could tell me something about the market in relation to its current condition (assuming I’m describing current conditions, which is typically my approach). If I am able to describe conditions that more closely match the current market then I have a better shot at seeing behavior over the next several days match up with the study results. Of course there is a trade-off between general and specific, and that is the number of instances.


A general test may have hundreds or thousands of instances which it can refer to in order to generate expectations. A very specific test may have an extremely low number of instances. If the number of instances is too low then the results may have little or no meaning. For instance if my parameters are run and I find that the market had only set up in a similar manner 1 other time over my test period, is it reasonable to assume that the market will act the same way this time? Most people would correctly assume “no”. What if there were 2 instances and they both had similar reactions in the past. Could I assume this suggests a directional edge? 3 instances? 4? 10? 30? 50? More? How many instances is “enough” to have some level of confidence that your results are actually suggesting an edge and they are not the result of luck?

Before answering let me address 1 common misconception people have about statistical testing. That misconception is that you need 30 instances in order to demonstrate statistical significance. This idea originates in the fact that a sample size of 30 is needed in order to calculate a Z-score or run a chi-square test. The reason that 30 instances are necessary is that Z-scores assume a normal probability distribution. Without 30 instances it is not possible to resolve the shape of the normal probability distribution clearly enough to make certain statistical measures valid. One thing traders should be aware of is that the stock market does not have a normal distribution anyway. It has “fat tails”. In other words, there are more outliers present in stock market movements than one would expect under a normally distributed curve. So relying on standard statistical measures and assuming a normal distribution could expose a trader to more risk than his results would imply.


Still, these tests are helpful in determining whether your results were likely due to a real edge or whether there is a high risk that luck played a big part. But what if you don’t have 30 instances? In that case you could use a t-table statistic.


To better understand statistical significance and see how to run some of these tests I’ll refer you to the below post from a couple of years back:


http://quantifiableedges.blogspot.com/2008/05/significance.html


Note that this post also contains a t-table. One interesting thing we can see when looking at a t-table is the minimum number of instances you would need to have different confidence levels that your edge is actually an edge and not due to luck. For instance, if all instances were followed by a market rise, you would want at least 6 instances in order to be 95% confident that there was an actual edge. A 99.9% confidence would be reached if you had 11 instances that all resulted in a rise over the next X days.


So if you look back at the study I showed Wednesday, SPY only set up in that pattern 12 times in the past, but every time it was trading higher 5 days later. This means statistically there is about a 99.9% chance that the positive results were due to more than luck. That there has in fact been a real edge in that pattern in the past. Does this mean there is a 100% chance it will be higher 5 days after the setup? No! Not even close. A high degree of confidence means there is likely some kind of an edge. It doesn’t mean the past winning % or net expectations are likely to persist indefinitely.


So how many instances do I require before I’m willing to accept a study as part of my analysis and place it on my active list? It varies depending on things like the strength of previous reactions and other stats I’ll get into in my next post, but I’ll generally use a t-table to help me decide. Will I incorporate a study with only 10 or 11 instances? Yes, but it will have to have strong win/loss stats and a high win %. Personally, I tend to favor studies that have somewhere between 20-70 instances. Too low and they are less reliable. Too high and the setup is often too broad to have much meaning.


I’ve spent far more space discussing this than I wanted, but it is an issue that has come up time and again with readers, so I wanted to be somewhat thorough.


In fact, of the list of things I look at in a study to help me decide whether it is compelling or not, the number of instances (assuming it isn’t minuscule) is near the bottom .


I intend to accelerate this series of posts over the next couple of weeks and I’m sorry it’s taken so long to get rolling. In the next post I will discuss a list of other things I examine when determining whether I find a study compelling.

Thursday, November 18, 2010

Using Quantifiable Edges to Your Advantage - Part 1 - Understanding the Study Layout

This post is the beginning in a series which will provide readers some ideas on how they can take some of the edges they see here (and elsewhere) and use them to their advantage in their own trading.


Before getting into a theoretical discussion it’s important that I make sure everyone understands what it is I’m presenting when I show these studies in the blog and the Subscriber Letter. Over time I have pretty much standardized the statistics that I show in my tables. I have tried to strike a balance between giving enough information to make the table useful and giving too much information which could make it messy and confusing. Below is a sample study (with real results but a bogus description). I’ll use this as an example to refer to.




The top box of the study always lays out the conditions. Everything that was taken into account is described there. One thing to note is that I always run the studies on $100k/trade. This is because most of them look at the S&P 500. Since it trades at about 1,200 there will always be some leftover when buying into a portfolio (you can’t buy a half a share in Tradestation). The $100k makes the rounding error small enough so that it doesn’t have much of an affect. $10,000 would have too large of a rounding error. $1,000,000 would be better but then the numbers get so large it makes it more difficult to read.

With an even $100k I find the results easy to interpret. $1000 = 1% in the results columns. So in the above example the “Average Trade” shows a gain of $733 after 3 days. This is almost 0.75%.


Now let’s briefly review each column in the results table.


“X Days” – Most tests I run out over a number of days to see how the market has performed after the test conditions were in place. “X Days” just shows the length of time from the entry. The entry is normally assumed to take place at the close. The exits are also assumed to be at the close. The number of days refers to trading days – not calendar days. Note this column reads from the bottom up, which means all columns do. No reason for that. It’s just how I started doing it a long time ago.


“Net Profit” – This is the net gain or loss for the entire sample of instances included in the study. One thing to note is that I always “Buy” the setup. This is not because I am only looking for long edges. It is because it makes the table easier to read. A quick glance can tell me if the edge is bullish or bearish. Lots of positive, green numbers is bullish. Lots of negative, red numbers is bearish. A long time ago I would sometimes set the entry condition to “short” at the close. Then I could see profits from shorting. Doing this required me to read the entry conditions carefully and would occasionally lead to some confusion when I didn’t. So for purposes of easily reading the study tables, everything assumes a long position.


“Total Trades” – This is the total number of instances that triggered based on the study conditions. As in the case above, this number will sometimes be larger for Day 1 and then you’ll see a declining number of instances as you look further out. If you’re wondering why this happens, check out the June 18, 2010 blog post.


“Winning Trades” – The total number of trades that were showing a gain “X Days” later.


“Losing Trades” – The total number of trades showing a loss “X Days” later. The wining plus the losing trades typically add up to the total trades. In those rare instances when it doesn’t it means a trade was breakeven on that day.


“% Profitable” – This column simply shows the winners / total trades. Sometimes a 50% profitable situation can still show a strong edge. That would mean gains outsized losses by a large degree (or vice-versa). % profitable is important from a trading standpoint though. If a setup is 90% profitable it is generally less likely to put you through an extended drawdown as a setup that is 55% profitable with the same size average trade.


“Avg Winning Trade” – This looks at all the “winning trades” and divides them by the gross profits on those trades. (Gross gain and gross loss columns are not shown.) So in the table above, the “Avg Winning Trade” was up $692 after day 1. This means that of the 14 instances that finished higher the next day, the average gained just under 0.7%.


“Avg Losing Trade” – Just like “Avg Winning Trade”, but it is looking just at the losers. In this case after day 1, the 7 losers dropped about 0.9% on average.


“Win/Loss Ratio” – This takes the value from the “Avg Winning Trade” column and divides by the value from the “Avg Losing Trade” column. It can help you determine whether the reaction was typically more explosive on moves up or down.


“Profit Factor” – This is the stat I am asked about the most. It is a stat often cited by system traders. Profit Factor = Gross Gains / Gross Losses. Profit factors above 1 occur when there are positive net results and below 1 occurs when there are negative net results from a study. When thinking about the importance of profit factor, it is easiest to consider how 2 systems may compare. Consider 2 systems made a hypothetical $10,000 each over a specified time period. System 1 had $15,000 in gains and $5,000 in losses. Its profit factor was 3. (15k/5k = 3). System 2 also made $10,000 but it was on $100,000 in gains and $90,000 in losses. Its profit factor was 1.11 (100/90). Most people would find system 1 more appealing as it seemed to make the $10,000 with less effort and risk.

“Avg Trade” – This is simply the net gains divided by the total trades. Under most circumstances, I’ll use the information in this column to help generate estimates.


Last but not least I will often place a statement with additional information in a box below the results. This is typically information that can’t be seen in the table. A common bit of information I put here is how often the market might close up (or down) from the entry price at some point in the next few days.


In the next installment of this series I’ll give a brief discussion of attributes that would make a study compelling to me and entice me to incorporate it in formulating my market bias.