Down Days Trading Model

I’ve written a lot about the 2-period RSI indicator popularized by Larry Connors and Cesar Alvarez. This indicator highlights significant pullbacks which can often be buying opportunities within major market indexes like the S&P.  Pullbacks in the market are a result of the market closing down. That means, today’s close is lower than the open. So, can this simple price action be used to locate buying opportunities. In this article I’m going to take a look at this price pattern and compare it to our the 2-period RSI setup. Free EasyLanguage code will be provided at the conclusion of this article.

Mean Reversion

As a reminder, the traditional two-period RSI indicator (RSI(2)) is an indicator we have used many times on this website. So I will not spend much time talking about it within this article. Overall, it’s primarily used on the stock index markets such as the S&P, as a method to determine an entry point for a mean reverting trading models. You can read more about the RSI(2) indicator and the trading models built from it by reviewing these articles:

 Down Days Setup

I’m going to use EasyLanguage in order to build a trading model to test the effectiveness buying the S&P after two consecutive down days. To build this simple trading model I’m going to assume that a down day is defined when the market closes below its open. I’ll sell the position when we have just the opposite condition, two consecutive up days. That is, two days when the market closes above its open.

The trading rules are:

  • Buy at the open of next day after two consecutive down days
  • Sell at the open of next day after two consecutive winning days

The EasyLanguage code for the basic strategy will look something like this:

BuySignal = ( Close < Open ) And ( Close[1] < Open[1] );
SellSignal = ( Close > Open ) And ( Close[1] > Open[1] );
If ( BuySignal ) then Buy("LE") next bar at market;
If ( SellSignal ) then Sell("LX") next bar at market;

Testing Environment

Because you, the reader might want to build a trading model based upon this market study, I’m going to break the historical data into two portions. An in-sample portion and out-of-sample portion. I will perform my testing for this article on the in-sample portion only. Thus, when I’m finished with my testing we’ll still have a good amount of data which can be used for out-of-sample testing.

Before getting into the details of the results, let me say this: All the tests within this article are going to use the following assumptions:

  • Starting account size of $25,000
  • In-sample dates are from 1998 through December 31, 2012
  • One contract was traded per signal
  • $30 was deducted per round-trip for slippage and commissions

Baseline Results

Below is the baseline results over our in-sample historical segment. The maximum drawdown is a percentage of our starting equity, which is $25,000. Keep in mind that this study has no stops, thus some positions will hold through some very deep pullbacks before exiting. Again, we are testing the behavior of the market buy building a trading model. In other words, we don’t have a complete trading system.



Longer Consecutive Losing Days

The first thing that I noticed when looking at two consecutive down days is it may not be deep enough. Two-day pullbacks are somewhat common.  Market pullbacks during the last few years of the study have been shallow and these have been great entry points. But what about helping to ensure this trading model will work under different conditions?  Testing three or four days consecutive losing days may generate more profitable and/or more tradable results. For past experience I know, in general, deeper pullbacks may provide a better profit vs risk. That is, the generated signals will be fewer in number but will also provide better rewards. So I modified the code and generated the following results based upon the number of consecutive down days required before opening a new position.

During this testing I did not modify the exit rules. They remained the same with two consecutive up days acting as the exit trigger.


As expected we see the number of trades decreases and the average profit per trade increases as we increase the number of down days. Deeper pullbacks happen less often, but have larger payouts based on our trading model. The four down days has only 85 trades so I’m going to use the three down days during the remainder of my testing. This is a good compromise as a three-day pullback does appear to eliminate many shallow and unproductive pullbacks. Below is the equity graph for the three down day trading model.


Bull/Bear Regime Filter

The next characteristic to explore is the difference between a bull and bear market. I’ll divide the market into two regimes based upon a 200-day simple moving average. The market will be “bullish” when price is trading above the 200-day SMA. The market will be “bearish” when price is below this moving average. Below is the trading model’s results in each regimes.


Surprisingly, at least to me, we see better performance with the bear market. Overall, both the bull and bear regimes are profitable. The bear regime does suffer from larger drawdowns but it also has the biggest rewards. Notice that both regimes also have the same number of trades. I checked this a couple of times and it does appear to be correct. Given this result, I will not include a regime filter as we test our final modification I wish to test.

5-Day SMA Exit

The 5-Day SMA Exit closes a position once price closes above a 5-day simple moving average. This exit is often used with the RSI(2) system and it’s worth testing here as well. Below are the results of this test vs our baseline. As a reminder, the Baseline column represents the three down day trading model with a 2-day exit.




The power of a good exit! By changing the exit to our 5-day simple moving average we have significantly improved the performance. All metrics have improved. Notice the significant reduction in drawdown. This is huge.

So how does this hold up against the 2-period RSI trading model? Let’s see…

RSI(2) vs Consecutive Down Days

Below is the results of using a two-period RSI with a threshold of 10 vs our 3 down day trading model. Both trading models exit when price crosses the 5-day SMA.


So which one is better? They are very similar in most of the metrics. The maximum drawdown is a lot higher with the RSI(2) system. Again, neither of these tests utilize a stop.

Overall, these are very interesting results and may be an effective replacement for the RSI. I encourage you to perform your own testing to see if this simple price pattern could be used in your own trading. Below you will find the EasyLanguage code for code used in this study.


Down Days Strategy (text file)
Down Days Strategy (TradeStation ELD file)
Down Days WorkSpace (TradeStation WorkSpace file)

About the Author Jeff Swanson

Jeff is the founder of System Trader Success – a website and mission to empowering the retail trader with the proper knowledge and tools to become a profitable trader the world of quantitative/automated trading.

follow me on: