Today, I will attempt to turn the Double Seven Strategy into a day trading system. Initially designed for daily charts, can I find an edge that will work on an intraday timeframe? Let's find out.
Nearly 10 years ago, I wrote a lot about the E-mini S&P setups found in Larry Connor's book, "Short Term Strategies That Work." I thought that book was great. The strategies were simple, easy to code, and provided valuable insight into the behavior of the E-mini S&P market. I'm going to take the Double Seven Strategy as my starting point.
I'll be using the E-mini S&P for this demonstration. However, it should work on other stock index markets. You can read about it more here. As a refresher, below are the basic rules.
Trading Rules:
- The market must be above its 200-day moving average.
- Buy when the instrument closes at a 7-day low.
- Sell when the instrument closes at a 7-day high.
The trading assumptions made are:
- Development period: 2007-01-01 - 2019-12-31.
- Out-of-sample: 60% of the development period.
- Starting account size of $75,000.
- 1 Contract per trade.
- $30 round trip deduction for commissions and slippage.
- There are no stops.
Using Build Alpha
My plan is to "code" the strategy in Build Alpha and allow Build Alpha to data-mine additional filters around the entry logic. I say "code" because there is no actual coding to be done in Build Alpha. Instead, you construct your buy signals from a menu of available indicators.
I will be changing two things when I construct the strategy in Build Alpha.
First, I'm not going to include the 200-day moving average filter. Why? I want Build Alpha to locate a better filter if one exists.
Second, I will exit the trade after holding for 1 bar (24 hours). Remember, this is a daily chart we're starting with. Why am I doing this? I want Build Alpha to use the basic premise of the strategy, a 7-day low, and locate the best filters for a very short-term system. This makes sense because we want to turn this daily strategy into an intraday strategy. Thus, I want a short-term strategy that works on the daily bar.
Below is an image showing the selection for the entry signal when we reach a new 7-day low.
And here is the equity graph of taking all entry signals and holding for one bar. This is a good starting point, and let's see if we can improve it.
Locating A Better Filter
Here I selected a 1-day hold for the entry signal and told Build Alpha to use Perfect Profit Percentage for the fitness function.
I also set the stop to $1,000 (not shown) since we're aiming for an intraday strategy - let's keep that stop small!
Now I'm going to allow Build Alpha to locate possible filters for our strategy. After a few minutes, Build Alpha generated several promising-looking filters.
After reviewing the results and using Build Alpha robustness tests, I decided on this strategy. Here are the buy rules:
- It's NOT the 3rd trading week of the month;
- Today is Monday, Tuesday, or Friday.
I was not expecting this. I thought Build Alpha may locate some price action-based filter or an indicator. Instead, it discovered two calendar-based filters.
Adding these filters to our original rules produced the following equity curve. I brought the code into TradeStation to generate these charts and results. The equity graph shows that the out-of-sample portion starts around trade 125 (60% of the data was reserved for out-of-sample).
Daily Strategy | |
---|---|
Net Profit | $51,258 |
NPDD | 5.5 |
Profit Factor | 1.74 |
Trades | 256 |
Avg.Trade Net Profit | $200.22 |
Max Drawdown (Intraday) | $9,327 |
The lack of new equity highs at the end of the equity graph is not what I want to see. But given the entirety of the equity curve and performance, it's not that bad. Besides, we're not done yet.
Let's turn this strategy into a day trading strategy.
Convert To Day Trading Strategy
Build Alpha has a great feature that allows you to quickly test your trading day on an intraday chart. In this case, I told Build Alpha to analyze the strategy on a 60-minute chart. Within a few seconds, many possibilities were generated.
All the trading systems generated on the intraday data close the trade within 24 hours. So, we're never holding more than 24 bars on a 60-minute chart. I reviewed some of the better-looking strategies and decided upon the following rules for a day trading strategy on a 60-minute chart.
- Open a new trade at 18:00 Central
- Hold trade for 8 bars
This means when a trading signal happens on our daily chart, we open a new trade at 18:00 Central. After the day session has closed, we're opening a new trade in the night session.
Once a new trade is opened, we hold it for 8 hours, which means we're getting out on the 7:00 AM bar of the next day. This strategy is an overnight system and not too surprising since we've seen the advantage of the overnight edge in past articles.
Build Alpha generates the EasyLanguage code, quickly loading it on a TradeStation chart. The 60-minute chart is on data1, while the daily chart is on data3. Build Alpha always uses data2 for VIX. So, we're ignoring that for now.
Here are the results of this new strategy on the 60-minute chart.
Daily Strategy | Intraday Strategy | |
---|---|---|
Net Profit | $51,258 | $24,163 |
NPDD | 5.5 | 5.6 |
Profit Factor | 1.74 | 1.67 |
Trades | 256 | 255 |
Avg.Trade Net Profit | $200.22 | $94.75 |
Max Drawdown (Intraday) | $9,327 | $4,275 |
Well, we have our intraday strategy. The equity curve is not the best after trade 240 or so. But not too bad given how quickly and easily it was developed. Why would you want to move over to an intraday system? We're making less profit, but we also reduced our risk and market exposure.
First, our drawdown was more than cut in half. Thus, if you did not have a large enough account to trade the daily chart, you might trade the 60-minute chart. A quick estimate for the amount of starting capital can be looking at the intraday drawdown and multiplying it by 4. In this case, our starting capital for the Daily Strategy would be about $40,000, and for the Intraday Strategy it's only $17,000. So, if you have a small account, the Intraday Strategy might work for you.
Another reason is to reduce our market exposure. The daily strategy has a holding for one whole day or 24 hours, and the Intraday Strategy is holding only for 8 hours! In those eight hours, it's capturing about 50% of the profits with less drawdown.
This Double Seven trading example was not an excellent demonstration of this particular reason, as seen by the NP vs. DD metric. They are about the same. However, we have more efficient use of our capital because it's only exposed for 8 hours. In those other hours, we may deploy that to another strategy.
I've been building intraday systems from daily systems for a few months now. I've seen intraday systems created from daily strategies that dramatically increase the NP vs. DD metric while making 75% or even 100% of the profits. Of course, you don't find that too often.
Anyway, those are two good reasons you may want to attempt to build an intraday strategy from your daily.
Walk Forward Test
If you noticed looking at the in-sample and out-of-sample date ranges, the last date of the historical test was 2019-12-31. I always like to reserve a chunk of data for a simple walk-forward test. This data is unseen by the strategy and never came into play when developing the strategy. Once the strategy-building process is complete, we can test the newly created strategy on the unseen data.
Here is the equity curve for the walk forward.
This looks promising! There are only 22 trades. I like to see 30+. However, the strategy continues to make new equity highs. It will be interesting to watch this strategy going forward.
Conclusion
Building this strategy from the original Double Seven daily strategy, took very little time and not a lot of effort. We may have not created the greatest day trading system, but it looks like a realistic candidate.
Overall, I'm really impressed with how quickly you can build an intraday trading system from a daily strategy when using the Intraday Edge feature of Build Alpha. I've been talking more and more about Build Alpha as I feel a specialized tool like this to help you test ideas will become more and more critical in the coming years.
If you want to know more about Build Alpha, I wrote an entire article called Creating Strategies Using Build Alpha. So if you want to learn more, check it out.
The code created during this article and the TradeStation WorkSpace is available for download for members of the EasyLanguage Mastery email list.
I remember there was a comment on Twitter that the return of SPY is better without the option expiration week. Do you think maybe that’s why the system recommended to exclude the 3rd week of the month? Could you code and try to exclude the option expiration week instead?