Creating a SPY Trading System

Let’s say you’re designing a trading system to trade the SPY every day by buying (or selling short) the open of the second 1 minute bar and holding until the market close. The one thing you can vary is your position size — so you can choose to use large size some days, trade zero shares some days (i.e. don’t take a position at all), or trade a negative number of shares (i.e. sell short).

These are the parameters of the system — you can’t change anything else about the mechanics of the system.

What information would you look at to inform your decision about what position size to use on a given day? There are a lot of technical indicators and data points you could look at — literally thousands! You can’t look at all of them, so how do you decide which ones are important? One was I will evaluate data points is to look at the correlation. Which indicators are most correlated with the profit of the system. The higher the correlation, the stronger the relationship with profit.

For this system, I picked 4 indicators and posed a question on Twitter asking which one people believed was the most correlated with profit.

Here are the indicators:

% gap from yest close: how big was the gap between yesterday’s daily close price and today’s open.

Gap

The Range of the 1st 1 minute bar of the day: the high price minus the low price of the first one minute bar.

Range of the bar

Close of first 1 minute bar in relation to the range: where does the bar close in relation to the range of the first bar? Think of it as a value between 0 and 100 where 0 means it closed at the low and 100 means it closed at the high of the range of the bar.

Close in relation to range

Close of bar in relation to the open of the bar: where did the bar close in relation to the open price? This is related to the overall range but different. The bar could close at the same price as the open but both those prices could be equal to the high of the bar. Think of this as a value between -100 and 100 with 0 being a “doji”, a value of 100 being a solid green bar with no wicks, and a value of -100 being a solid red bar with no wicks. Here’s a good example of bars that close similarly in the range of each bar but quite differently in relation to the open price.

So which do you think is most important for this trading system? Here were the answers given:

Most thought the gap would be the most important. Surprisingly though that is the least important of the 4 variables. It turns out the range of that first bar is the most important factor of the 4.

This makes sense in light of a general rule of thumb when determining the value of a data point: all things equal the recency of the data is more likely to be important. In this case the gap is the least “recent” of the data points — it includes the open of the day and yesterday’s close both of which are in the past compared to the other indicators.

1 comment
  1. Very surprising results. Curious though, what was the trade you were testing? Was it a blind long position put in at 9:31 and held to EOD? Did it depend on a gap up or down? Thanks and good stuff.

Leave a Reply

Your email address will not be published. Required fields are marked *