System Trader Success
Share It!

A Simple S&P System

Last week’s article, Trading Ideas And Systems: Keep It Simple, Smart Guy, highlighted the virtues of building simple trading systems. Simple trading systems have a lot of advantages namely, being robust. In this article I want to provide the EasyLanguage code for the concept provided in the orginal article. It’s a fine example of following the keep-it-simple mantra and just might inspire you to create a profitable system.

Simple S&P Futures System

The first system is based upon the concept provided in last week’s article. The rules are provided below.

System Rules

  • If today’s close is less than the close 6 days ago, buy (enter long).
  • If today’s close is greater than the close 6 days ago, sell (exit long).

Below is a screenshot of the system in action on the daily chart of the E-mini S&P futures contract.


Environmental Settings

I coded the above rules in EasyLanguage and tested it on the E-mini S&P futures market going back to 1998. 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
  • Dates tested are from 1998 through December 31, 2012
  • One contract was traded for each signal
  • The P&L is not accumulated to the starting equity
  • $30 was deducted per round trip for slippage and commissions
  • There are no stops

Baseline Results

Below is the equity curve for trading the E-mini futures contract based upon the rules as defined above. The equity curve looks very similar to the one from the original article. Below the equity curve is the weekly drawdown as a percentage of equity. We can see it reaches down in to the 40% range.

Simple_S&P_Baseline_EQ_Curve Simple_S&P_Baseline_Drawdown


Simple S&P System Baseline

Would anyone really trade this? Of course not, but that’s not the point. The point is simple rules can be rather powerful and be the start of a great system. Can we take this trading concept and take it to a few more steps closer to a real system? Let’s see…

Bull/Bear Regime Filter

You can probably guess this would be my first line of attack. That is, broadly divide the market into two distinct modes: bullish or bearish. Often a simple indicator such as a simple moving average applied to a daily bar chart can be very effective in dividing a market into a bullish or bearish regime. The idea in this case is to only take long trades when we are in a bull market. I will be using a simple moving average to act as my regime filter.

The first thing to do is to test various look-back values for the simple moving average indicator. Using TradeStation’s optimization feature I’m going to test look-back values between 10 – 200 in increments of 10. The results are depicted in the bar graph below where net profit is on the y-axis and the look-back period is on the x-axis.


We can clearly see there is a general trend of diminishing profit as you increase the length of the look-back period. Values 30 and 40 appear to be outliers. I decided to choose the value 20. This represents about a month’s worth of trading. Other values, such as 50, 60, 70, 80 and 90, will probably produce similar results. After applying the regime filter we get the following results:




Simple System With Regime Filter

So, does this look like an improvement? While we make less money, the system is more effective overall, in my opinion. The profit factor increases as does the average net profit per trade. We also reduce the drawdown by a lot. I would guess we are eliminating a number of losing trades by only taking trades during a bull market.

Volatility Filter

Another way to divide the market is through volatility. Markets go through periods of rising volatility and falling volatility. In general, market volatility rises and peeks as the market falls and makes new lows. Some systems do well during these high volatility times while others do better during more quiet times. How are we going to measure volatility? We’re going to use the VIX index.  The VIX is a popular measure of the implied volatility of S&P 500 index options and is often called the fear index. In general, the VIX represents a measure of the market’s expectation of volatility over the next 30 days. The VIX has an inverse relationship to the price action on the S&P. Thus, we often see the VIX making new highs as the market is making new lows.

I’m going use the VIX in a very simple manner. I’m going to take the average of the daily VIX value over a number of days to create a simple moving average. Trade will only be opened when the current VIX is below the moving average. This should help the system by only taking trades when the VIX is likely to be falling.

But what value to use for the look-back? Using TradeStation’s optimization feature I’m going to test look-back values between 5 – 60 in increments of 5. The results are depicted in the bar graph below where the net profit is on the y-axis and the look-back period is on the x-axis.


The value 20 looked like a reasonable value to pick. The results of using 20 for the simple moving average for the VIX is below.

Simple_S&P_VIX_EQ_Curve Simple_S&P_VIX_Drawdown


Simple System VIX Results


It’s rather an interesting fact that both the regime filter and volatility filter create about the same number of net profit. Furthermore, like the regime filter we see an improvement in many of the performance indicators such as profit factor, average trade net profit and reduced drawdown.  The regime filter does get to $34,000 in net profit more effectively with only 198 trades when compared to the volatility filter.

Overall, I like the equity curve and performance of the VIX filter over the Regime filter. Both represent an improvement over the original concept and demonstrate how simple concepts can produce positive results. Added one of the filters to the baseline concept was a “next step” to a potential profitable system. Clearly, more work needs to be done. Just for curiosity I did run the VIX filter system up to the current date and the system continues to make new equity highs into 2014.


About the Author Jeff Swanson

Jeff is the founder of System Trader Success - an inBox magazine dedicated to sharing great ideas and concepts from the world of automated trading systems. Read More Google

follow me on:

Leave a Comment:

Add Your Reply