I came across an article over at the blog, Jay On The Markets, that talked about applying a bullish outside indicator on a monthly chart. The article I was reading is entitled, "One Sign That the Bull May Still Have Legs". In this article Jay talks about the incredible run the U.S. broad market has experienced as of late. Remarking that "The Trend is Your Friend", Jay goes on to highlight a potential bullish indicator which appears on the monthly chart of the S&P. The indicator is a bullish outside month. I thought I would spend some time testing this indicator and see what the results may tell. Of course, the code used to test this indicator appears at the bottom of this article.
A Bullish Outside Month happens when…
- Current month’s low is less than or equal to last month’s low
- Current month’s close is greater than last month’s high
In EasyLanguage this could be written as follows:
BullishOM = ( Low <= Low ) And ( Close > High );
- Starting account size of $100,000
- Dates tested are from 1960 through May 2014
- The entire account value will be put at risk for each trade
- The P&L is not accumulated to the starting equity
- There are no deductions for commissions and slippage
- No stops were used
If ( BullishOM ) Then Begin // Code for when Bullish Outside Month Happens End Else Begin // Code for when Bullish Outside Month Does NOT Happen End; This above code will determine if a Bullish Outside Month has occurred and provides a conditional test to take action based upon the result. The result in this case, is a boolean value indicating if a Bullish Outside Bar occurred. To test the effectiveness of BOM I’m going to create a simple TradeStation strategy based on the code above. When a BOM occurs I will purchase shares and hold for X number of bars. Jay performed his test on a monthly chart. I will duplicate that here. I will then also apply the BOM strategy on a weekly and daily chart.
Testing Environment. I decided to test the strategy on the S&P cash index going back to 1960. The following assumptions were made:
I used TradeStation’s optimize feature to test the holding period of 0 through 11. This holding period represents the number of bars to hold an open trade. Each bar represents a single interval of time based upon the type of chart I’m backtesting. For example, on a monthly chart the holding period represents weeks, while the daily chart represents days. So why do I start at the value of zero? This is a little nuance on how EasyLanguage works when executing simple market orders. Essentially this means open and close the trade on the current bar. So, the trade is opened at the “open” of the current bar and the trade is then closed on that bar. Except the trade is actually closed at the “open” of the next bar. Thus, a holding period of zero is a one bar hold. Clear as mud, right? In the end what we are doing is testing the market’s behavior after a bullish outside bar appears. The bar graphs below represent net profit generated by the system based upon the holding period.
Monthly Results. The bar graph below represents the net profit (y-axis) generated on a monthly chart based upon the holding period (x-axis). It’s interesting to note that profit tends to climb as you increase the holding period. In this test net profit peeks at the 9-month holding period. The values of of 8, 9, and 11 maintain about the same level of net profit.
Does this tell us anything? At first glance it does appear that after our BOM event there is an edge in going long, but we have to remember that the market is bias to the long side. There are many indicators that you could use that will show a positive edge. What is an interesting observation on the chart of this strategy is it does appear to avoid the major bear markets. Notice how no trades are opened during the two bear markets after 2000 and 2007. Click on the chart for a larger view. Only after the market started to recover did we see signals. Is this just a fluke or does the BOM on a monthly chart really help tell us the market is due for new highs over the coming months? On the monthly chart we only have 17 data points, so this is far from a significant number.
The next chart is a depiction of the drawdown experienced when holding each trade. Notice that we experienced drawdowns as high as 24% during the 70's however, starting in the late 1980's until present day, the drawdown has been tiny (under 4%). This means our positions have taken very little heat. Again, is this just a fluke?
Weekly Results. The bar graph below represents the net profit (y-axis) generated on a weekly chart based upon the holding period (x-axis). Here we see a very different picture. When this strategy is applied to a weekly chart we see very poor performance for the first 10 weeks or so. I’m guessing that our BOM on the weekly chart appears to be a shorter term exhaustion indicator which more likely tells us that the market will consolidate and/or have a slight pullback over the coming weeks.
Picking a value of 19 (20-week holding period) we have 63 trades over the duration of the backtest with an average profit of $2,141. Below is the equity graph and weekly drawdown graph.
Daily Results. The bar graph below represents the net profit (y-axis) generated on a daily chart based upon the holding period (x-axis). This chart appears most likely the monthly chart. All holding periods appear to be profitable and in general, the longer you hold the more net profit you make.
Picking a value of 29 (20-day holding period) we have 145 trades over the duration of the backtest with an average profit of $930. Below is the equity graph and weekly drawdown graph. The equity graph is not nearly as “clean” on the weekly chart. There is a large break in the equity curve during the financial crash of 2007 and 2008. Could this be the start of a trading system? It very well could be.