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:
  • BlueHorseshoe says:

    Hi Jeff,

    Along with the RSI and VIX, I’m pretty sure Connor also discusses 3 day pullbacks for entries.

    The majority of the time these two entry methods will produce identical signals, so it might be interesting to see what would happen if you ignore all entries signaled by both methodologies and compare those that are only signaled by one approach or the other.

    I believe that there are good reasons to expect the RSI to be superior in performance. ‘Two down days’ is too simplistic in that it tells you nothing about the degree to which price declined relative to recent volatility.

    • Hello Blue. Yes, Connor does have a couple price-based setups. One of them is the Simple Shorting Strategy ( where four consecutive up-days during a bear market generates a sell signal. Interesting idea about separating the unique signs only. I will keep that in mind if I create a follow-up. The RSI signal does contain different information from the simple price-based signal. I guess the simplicity of the price action based signals could also be seen as a strength. Thanks for writing!

  • Michael says:

    Another good article on an entry technique. I would like to see an article based on a random entry and explore direct exit techniques such as nth profitable close or nth unprofitable close. Earik Beann has a chapter in his book Mechanical Trading Systems about random entries and exit strategies. Would love to see an article applying this to an EasyLanguage program.

  • Hello Jeff. This is excellent analysis! I like your posts because they are to the point and your coding is clean. Actually, I have a general indicator that measures winning and losing streaks that is an integral part of my analysis along with my version of RSI and of course Wilder’s RSI and Cutler’s RSI.

    Here is more info on the Gambler’s Fallacy Indicator:

    and on the Harris’ RSI

  • Wilko says:

    I am a regular reader of your blogposts as well as a subscriber, thanks for providing all your work free of charge. Hope you keep ’em coming!

    I feel compelled to comment on your article as it touches on some of my own work:
    As a system developer, I am struggling with filtering out the bias in system creation that the longest bull streak recorded in history risks creating. I’m talking about the (exceptional) bull market since early 90s. Your system in the article is affected by this bias. Try running the strategy starting sometime late 70s and you’ll end up in ruin.

    Intuitively, these types of systems (I guess) are a way to bet on tail risks. not occurring. A type of “writing options” strategy, where you exchange a regular stream of small income for the risk of one (or more) huge negative outcome. One would basically be betting that we’ll not be hit by a October 1987-event (BlackMonday). As long as we are out before such an event, we should be fine. However, as can be seen by running the system on data from the 70’s, the regime can change and we’d be wiped. Are we heading into a stagflationary environment in the near future? Only future will tell. My take is that this type of system is a bet on that not occuring near-term and current regime (lower inflation => lower discoount factors) to continue

    • Thanks for writing and for the kind words Wilko. You raise good points but the mindset I have is this: I can’t trade the 1970’s market. Also, the electronic futures market is a different animal than the futures market of back then. In short, it’s not relevant. There are plenty of strategies that worked in the past that don’t work today. Market characteristics change over time yet, some of the characteristics work for decades before fading. You’re correct about the upside bias and this strategy takes advantage of it. In short, I guess I’m not worried about the upside bias and will continue to trade it until it stops working. I would recommend a portfolio approach to all trading thus, reducing the impact of a dramatic change in market characteristics.

  • >