Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

jswanson

Double Seven Strategy

Recommended Posts

It's time to look at another simple trading system which can be found in the book, ”Short Term Trading Strategies That Work” by Larry Connors and Cesar Alvarez. In this article we are going to look at the Double 7 strategy. This is a simple strategy that can be applied to the major market indices such as DIA, DOW and QQQ. It can also be applied to the futures markets.

 

The rules of this system are very simple.

 

  • The instrument must be above its 200 day moving average.
  • If the instrument closes at a 7-day low - buy.
  • If a long position is open and the instrument closes at a 7-day high - sell.

The trading system follows two basic concepts we have talked a lot about on this website. Namely when trading the major market indices, like the S&P, an effective strategy is to buy pullbacks in a major up trend. This system does just that. The major up-trend is defined by price being above the 200-day moving average. A pull-back is defined as a close below the lowest-low over the past seven days. Once a trade is entered, we simply look for a new seven day high to exit. Super simple. Below is an example of some trades on the S&P Cash Index. Click the image for a larger view.

 

 

Double_Seven_Chart_Example-300x247.png

 

 

Looking at the trading rules, you will also notice it's a long-only system. Later in this article I will also reverse the rules and test it on the short-side. But for now, let's look at the performance for the long-only system. At this point I'm going to test it on the S&P cash index ($SPX.X for TradeStation).

 

Unless otherwise stated, all the tests performed in this article will be based on the following assumptions:

 

  • Starting account size of $100,000.
  • The number of shares traded will be based on volatility estimation and risking no more than $2,000 per trade.
  • Volatility is estimated with a five times 20-day ATR calculation. This is done to normalize the amount of risk per trade.
  • The P&L is not accumulated to the starting equity.
  • There are no deductions for commissions and slippage.
  • There are no stops.

 

Here is the position sizing formula used:

 

Shares=$2,000 per trade / ( 5 * ATR(20) * Big_Point_Value )

 

 

Long_Only_EQ_Curve.png

 

This looks very promising. Keep in mind, the system has no stops.

 

Is The 7-Day Optimized?

Let's look at changing the 7-day look-back period for two reasons. First, I would like to see if the default seven value is optimized. Secondly, I would like to know if other nearby values are used, would the system remain viable. In short, I would like to test the robustness of the look-back period. For example, if we change the 7-day low value to six, I don't want to see the system's equity curve drastically change. Likewise, if we increase the 7-day low value to eight, I don't want to see a drastic change in results. The neighboring values around seven should still produce positive results. In fact, it would be great to see the system remain profitable over a wide range of values.

 

I will use TradeStation's optimization feature to optimize the look-back period over the values 2-20 in increments of one. Keep in mind this single input value controls two look-back periods. The first is the entry look-back and the second is the exit look-back. As the trading system is defined, both these variables use the same value. The results of the test are in the graph below. You can click the image to see a larger view. The x-axis contains the look-back period while the y-axis contains the trading systems total P&L.

 

Long_Only_Lookback-300x243.png

 

This looks great. Any value you choose produces positive results. Each change in the look-back period also does not drastically change from neighboring values. The default value of seven is near the peek, which is six, but it's not the most optimal number. It's also important to keep in mind we will be using the default value of seven for other instruments as well and it's highly unlikely the bar graph for those instruments would look exactly like what we have here. In any event, I think this brings a lot of confidence to the look-back period.

 

 

Is The Regime Look-Back Optimized?

Just as we did for the look-back period for our entry trigger, let's perform the same type of test on the regime look-back period. Again, I will use TradeStation's optimization feature to optimize the look-back period over the values 20-200 in increments of ten. The results are in the graph below. You can click the image to see a larger view. The x-axis contains the look-back period while the y-axis contains the trading systems total return.

 

Long_Only_Regime_Lookback-300x241.png

 

This looks great as well. All values produce positive returns. In general, the longer the look-back period the more profit the system generates. While I did not study the numbers just beyond 200, I feel confident that a 200-period look-back is not optimized.

 

Taken both these tests we can feel confident that this system does not appear to be optimized and it's robust given a wide variety of input values.

 

 

Going Short

The original system is a long-only system. Let's try to use the current rules to short the market. We can do this by simply reversing the rules. In other words, we will modify the regime filter to only open trades when price is below the 200-day moving average. Trades will then open when price makes a new 7-day high and close when they make a new 7-day low.

 

  • The instrument must be below its 200 day moving average.
  • If the instrument closes at a 7-day high - sell short.
  • If a position is open and the instrument closes at a 7-day low - buy to cover.

 

I created a separate trading system to study only the short-side. The results of the system can be seen in the equity graph below.

 

Short_Only_EQ_Curve.png

 

This is not so great. Most of the time the equity curve is below the zero line. It's choppy and ugly. Clearly the market participants' psychology during a bear market is different than simply a mirror image of those found in a bull market. One would think shorting new highs in a bear is a good idea, and maybe it is, but this system is not successful at capturing profit. Taking a wild guess simply from past experience, I have found that exiting quickly during bear markets tends to work better than in bull markets. Thus, maybe a modification of the exit rules to only hold a trade until the first profitable day or only hold for a maximum of three days may produce significantly better results. However, such modifications are best left for another day.

 

To further test our shorting idea, let's now look at testing a range of look-back periods just like we did during our bull market. If our shorting concept is truly flawed, I would expect to see not much improvement in modification of our look-back period. In fact, since my wild guess is we need to exit quickly to remain profitable, I would expect to see greater losses as we continue to increase our look-back period. Likewise, I would expect to see greater profit as we shorten our look-back period. I will optimize the look-back period over the values 2-20 in increments of one. The results are in the graph below. You can click the image to see a larger view.

 

Short_Only_Lookback-300x241.png

 

Just as I expected. In general the shorter the look-back period, the more profitable. However, since this is our first look at the Double Seven Strategy, I don't want to over complicate it by introducing a shorting component. We'll keep it simple for now and apply our long-only strategy to several major market ETFs.

 

Double Seven Strategy

Confident the long-only trading rules are robust and appear to hold potential, let's now test this system on several major ETFs. Let's test, SPY, QQQ, DIA, and IWM. For this test we are going to use all the same trading assumptions and position sizing as we did above except for the following modifications.

 

  • $50,000 starting account
  • Risk 2% of account equity per trade
  • P&L is not reinvested

 

Double-Seven-ETF-Returns.png

 

Conclusion

The Double Seven Strategy does produce positive results across the four major market ETFs we tested. Is this system tradable with real money as is? Probably not. Remember, there are no stops. However, this does appear to be a great start to a viable system. I would imagine if some of the larger losing trades could be eliminated by some type of stop method, this system could be viable with real money.

 

Downloads

 

You can download the source code here.

Share this post


Link to post
Share on other sites

additionally, what is the buy and hold return for the same period?

or what is the get set long only, and use a stop of 7 days below the entry, but not an exit above the entry....ie; you let things run once in an established position that trends.

 

Comparing these might give an insight into costs as well as risk return costs of purely day trading.

(Otherwise I am sure everyone appreciates the ideas jswanson - thanks)

Share this post


Link to post
Share on other sites
have to consider costs though..

 

I would if it was a trading system, but it's not a trading system. Note, it does not even have stops! What this article demonstrates is a potential market edge.

 

However for the sake of commissions and slippage, below are the SPY results of adding...

 

  1. 2% Stop Loss
  2. Deducting $20 + $.01 per share per round trip.

 

Net Profit: $33,232

Profit Factor: 1.96

Avg. Trade Net Profit: $216.37

Total Return: 33.32%

Annual Rate of Return: 1.50%

Share this post


Link to post
Share on other sites
additionally, what is the buy and hold return for the same period?

or what is the get set long only, and use a stop of 7 days below the entry, but not an exit above the entry....ie; you let things run once in an established position that trends.

 

Comparing these might give an insight into costs as well as risk return costs of purely day trading.

(Otherwise I am sure everyone appreciates the ideas jswanson - thanks)

 

Going back to the start of SPY (1993) a buy-and-hold strategy based upon the same risk position sizing would produce...

 

Net Profit: $165,933

Profit Factor: N/A

Avg. Trade Net Profit: $165,933

Total Return: 165%

Annual Rate of Return: 5.09%

 

Clearly much better results if you entered in 1993 and rode those bear markets where you will see 40% drawdowns. Also, dividends are not included.

 

Since the year 2000 things would look like this for the buy-and-hold:

 

Net Profit: $3,220

Profit Factor: N/A

Avg. Trade Net Profit: $3,220

Total Return: 3.2%

Annual Rate of Return: .24%

 

Since the year 2000 things look like this for the Double Seven

 

Net Profit: $13,732

Profit Factor: 1.49

Avg. Trade Net Profit: $140.12

Total Return: 13.7%

Annual Rate of Return: .96%

Share this post


Link to post
Share on other sites
On 4/9/2013 at 4:59 PM, jswanson said:

It's time to look at another simple trading system which can be found in the book, ”Short Term Trading Strategies That Work” by Larry Connors and Cesar Alvarez. In this article we are going to look at the Double 7 strategy. This is a simple strategy that can be applied to the major market indices such as DIA, DOW and QQQ. It can also be applied to the futures markets.

 

The rules of this system are very simple.

 

 

  • The instrument must be above its 200 day moving average.
  • If the instrument closes at a 7-day low - buy.
  • If a long position is open and the instrument closes at a 7-day high - sell.

 

The trading system follows two basic concepts we have talked a lot about on this website. Namely when trading the major market indices, like the S&P, an effective strategy is to buy pullbacks in a major up trend. This system does just that. The major up-trend is defined by price being above the 200-day moving average. A pull-back is defined as a close below the lowest-low over the past seven days. Once a trade is entered, we simply look for a new seven day high to exit. Super simple. Below is an example of some trades on the S&P Cash Index. Click the image for a larger view.

 

 

Double_Seven_Chart_Example-300x247.png

 

 

Looking at the trading rules, you will also notice it's a long-only system. Later in this article I will also reverse the rules and test it on the short-side. But for now, let's look at the performance for the long-only system. At this point I'm going to test it on the S&P cash index ($SPX.X for TradeStation).

 

Unless otherwise stated, all the tests performed in this article will be based on the following assumptions:

 

 

  • Starting account size of $100,000.
  • The number of shares traded will be based on volatility estimation and risking no more than $2,000 per trade.
  • Volatility is estimated with a five times 20-day ATR calculation. This is done to normalize the amount of risk per trade.
  • The P&L is not accumulated to the starting equity.
  • There are no deductions for commissions and slippage.
  • There are no stops.

 

 

Here is the position sizing formula used:

 

Shares=$2,000 per trade / ( 5 * ATR(20) * Big_Point_Value )

 

 

Long_Only_EQ_Curve.png

 

This looks very promising. Keep in mind, the system has no stops.

 

Is The 7-Day Optimized?

Let's look at changing the 7-day look-back period for two reasons. First, I would like to see if the default seven value is optimized. Secondly, I would like to know if other nearby values are used, would the system remain viable. In short, I would like to test the robustness of the look-back period. For example, if we change the 7-day low value to six, I don't want to see the system's equity curve drastically change. Likewise, if we increase the 7-day low value to eight, I don't want to see a drastic change in results. The neighboring values around seven should still produce positive results. In fact, it would be great to see the system remain profitable over a wide range of values.

 

I will use TradeStation's optimization feature to optimize the look-back period over the values 2-20 in increments of one. Keep in mind this single input value controls two look-back periods. The first is the entry look-back and the second is the exit look-back. As the trading system is defined, both these variables use the same value. The results of the test are in the graph below. You can click the image to see a larger view. The x-axis contains the look-back period while the y-axis contains the trading systems total P&L.

 

Long_Only_Lookback-300x243.png

 

This looks great. Any value you choose produces positive results. Each change in the look-back period also does not drastically change from neighboring values. The default value of seven is near the peek, which is six, but it's not the most optimal number. It's also important to keep in mind we will be using the default value of seven for other instruments as well and it's highly unlikely the bar graph for those instruments would look exactly like what we have here. In any event, I think this brings a lot of confidence to the look-back period.

 

 

Is The Regime Look-Back Optimized?

Just as we did for the look-back period for our entry trigger, let's perform the same type of test on the regime look-back period. Again, I will use TradeStation's optimization feature to optimize the look-back period over the values 20-200 in increments of ten. The results are in the graph below. You can click the image to see a larger view. The x-axis contains the look-back period while the y-axis contains the trading systems total return.

 

Long_Only_Regime_Lookback-300x241.png

 

This looks great as well. All values produce positive returns. In general, the longer the look-back period the more profit the system generates. While I did not study the numbers just beyond 200, I feel confident that a 200-period look-back is not optimized.

 

Taken both these tests we can feel confident that this system does not appear to be optimized and it's robust given a wide variety of input values.

 

 

Going Short

The original system is a long-only system. Let's try to use the current rules to short the market. We can do this by simply reversing the rules. In other words, we will modify the regime filter to only open trades when price is below the 200-day moving average. Trades will then open when price makes a new 7-day high and close when they make a new 7-day low.

 

 

  • The instrument must be below its 200 day moving average.
  • If the instrument closes at a 7-day high - sell short.
  • If a position is open and the instrument closes at a 7-day low - buy to cover.

 

 

I created a separate trading system to study only the short-side. The results of the system can be seen in the equity graph below.

 

Short_Only_EQ_Curve.png

 

This is not so great. Most of the time the equity curve is below the zero line. It's choppy and ugly. Clearly the market participants' psychology during a bear market is different than simply a mirror image of those found in a bull market. One would think shorting new highs in a bear is a good idea, and maybe it is, but this system is not successful at capturing profit. Taking a wild guess simply from past experience, I have found that exiting quickly during bear markets tends to work better than in bull markets. Thus, maybe a modification of the exit rules to only hold a trade until the first profitable day or only hold for a maximum of three days may produce significantly better results. However, such modifications are best left for another day.

 

To further test our shorting idea, let's now look at testing a range of look-back periods just like we did during our bull market. If our shorting concept is truly flawed, I would expect to see not much improvement in modification of our look-back period. In fact, since my wild guess is we need to exit quickly to remain profitable, I would expect to see greater losses as we continue to increase our look-back period. Likewise, I would expect to see greater profit as we shorten our look-back period. I will optimize the look-back period over the values 2-20 in increments of one. The results are in the graph below. You can click the image to see a larger view.

 

Short_Only_Lookback-300x241.png

 

Just as I expected. In general the shorter the look-back period, the more profitable. However, since this is our first look at the Double Seven Strategy, I don't want to over complicate it by introducing a shorting component. We'll keep it simple for now and apply our long-only strategy to several major market ETFs.

 

Double Seven Strategy

Confident the long-only trading rules are robust and appear to hold potential, let's now test this system on several major ETFs. Let's test, SPY, QQQ, DIA, and IWM. For this test we are going to use all the same trading assumptions and position sizing as we did above except for the following modifications.

 

 

  • $50,000 starting account
  • Risk 2% of account equity per trade
  • P&L is not reinvested

 

 

Double-Seven-ETF-Returns.png

 

Conclusion

The Double Seven Strategy does produce positive results across the four major market ETFs we tested. Is this system tradable with real money as is? Probably not. Remember, there are no stops. However, this does appear to be a great start to a viable system. I would imagine if some of the larger losing trades could be eliminated by some type of stop method, this system could be viable with real money.

 

Downloads

 

You can download the source code here.

Looks great, thanks for sharing. I wonder, is it possible to adapt this EA for MT5 platform. I use one from Hotforex.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Topics

  • Posts

    • CARA Therapeutics stock breakout at https://stockconsultant.com/?CARA
    • TGTX TG Therapeutics stock finding some support with high trade quality at https://stockconsultant.com/?TGTX  
    • KRYS Krystal Biotech stock with a continuation breakout, good volume 40% above normal at https://stockconsultant.com/?KRYS  
    • Date: 26th July 2024. The Yen Soars as the Likelihood of a BoJ Rate Hike Rises! The Japanese Yen wins back some lost ground as global Central Banks edge closer to rate cuts. The probability of another interest rate hike by the Bank of Japan increases. July’s best performing currencies are the Japanese Yen (+4.35%), British Pound (+1.41%) and the Swiss Franc (+1.41%). Currencies are taking advantage of the weaker US Dollar, but the worst performing currency remains the New Zealand Dollar. USDJPY – Growing Likelihood of a Second BoJ Rate Hike! The USDJPY increases in value for a third consecutive week and for a fourth consecutive day. Three factors are contributing to the Dollar decline: The Fed’s upcoming interest cut, the Bank of Japan’s interest rate hike and the political uncertainty in the US. The day’s best performing currency is the Japanese Yen which is currently increasing in value against all currencies. Currently, the USDJPY is trading below the trend-line and below the 100-Period SMA which indicates in the medium-term sellers are controlling the price actions. The exchange rate is also below the neutral on all oscillators and forms a clear bearish trend price pattern. Currently the only indications pointing towards a loss of bearish momentum is the diversion formed on the RSI. As a result, even though the trend clearly forms downwards, investors need to be cautious of a potential retracement. If the price trades above 152.96, a larger retracement becomes likely. However, if the price falls below 152.015, momentum will indicate the continuation of the downward trend to 151.674 in the short term and 151.267 thereafter. The likelihood of further monetary policy tightening by the Japanese regulator is growing. Preliminary data for July showed an increase in business activity, indicating a recovery in the national economy. The consumer price index remains above the target level, reaching 2.8% in June, with the core indicator stabilizing around 2.6%. Officials are optimistic about maintaining these high levels, supported by significant wage increases. According to Reuters, Bank of Japan officials will discuss the possibility of raising the interest rate at their meeting on July 31st. Analysts do not expect active measures until after the summer months. However, investors will price in the adjustment before the decision takes place. The US Fed experts may turn to “dovish” rhetoric in September, which puts pressure on the dollar. Currently, inflation is slowing growth, business activity is declining, and the labor market is showing signs of cooling. The US PMI data from yesterday largely triggered an attempted bullish correction but was viewed as mixed. The price action of the US Dollar and the USDJPY will now largely depend on the Gross Domestic Product and Weekly Unemployment Claims. These will be made public at 12:30 GMT. Analysts expect the US economy to grow 2.0%. If the US GDP reading is lower than expectations, the US Dollar potentially can come under pressure. At the same time, weaker earnings data from the US can trigger higher demand for the Japanese Yen. The Yen is known as a safe haven currency alternative to the Dollar. Always trade with strict risk management. Your capital is the single most important aspect of your trading business. Please note that times displayed based on local time zone and are from time of writing this report. Click HERE to access the full HFM Economic calendar. Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding on how markets work. Click HERE to register for FREE! Click HERE to READ more Market news. Michalis Efthymiou Market Analyst HFMarkets Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in FX and CFDs products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • The cheat is on ! ... just sayin’.   This cycle it only needs to occur in 2 states, and in those 2 states in only 14 precincts... the organized  ‘machines’ for these cheats have been in been in place for decades... And here’s a tiny counter balance to a massive psyop narrative being perpetrated 24 7... as predicted the "entertaining ourselves to death" show is on full blast with the media re-creating Kasmella Devil as a firebrand ‘gettrdone’ kind of woman.  In reality, she is not a leader.  At work, no one wants to work for or with her or negotiate with her.  For this potus application - worse she is just a follower... a whore who is putty in the hands of the exploiters who ‘own’ her... the same ppl who owned and ‘managed’ Joe.  She is just a team member of probably the most corrupt, evil administration in history.  She is only good for regurgitating whatever narrative is handed her - until very recently how superbly fit Joe is, how the border was visited and secure, etc. etc.   She is not in charge of her vp office and duties... and now she will not even be in charge of her own party or campaign... she’s simply not sufficiently competent. As AG of CA she was a puppet who nudged along the social engineering policies that made that beautiful state the ugly mess it is today - esp the cities.   And, btw, by Willie fkng her way to the top, she has placed herself in a position where she can’t really get too deep into calling Donald a predator...cause she’s ‘paying’ as a ‘victim’ / being paid off the same way as Stormy... whoa. .. and lest you are ready to stereotype me and my positions - In my view, this election is not about preventing the decline of the USA.  That decline trajectory was established many decades ago and stabilized by the mid 1970’s.   There is no making America great again.  This election is about either hastening the end or tapping the brakes a little bit on the inevitable decline of the USA.  So - if you think her promises that the “middle class is our main priority” are real or if you think America is 1 man away from greatness again, well I have a finely designed bridge in Baltimore for sale ... best offer...
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.