The Ideal Pull-back Criteria

One familiar recommendation for swing trade entries is to buy the pullback’s. But, what is the best method for determining at what point a pullback makes a good entry? Desirable characteristics of a pull back entry technique include:

  • Works for a diverse group of trading entities: stocks, futures, Forex.
  • Self-adjusting for price and volatility.
  • Allows an easy calculation of risk and reward.
  • Includes symbol selection filters that maximize risk-adjusted gain.

Popular Pull-Back Methods

Several methods have been used to identifying suitable pullbacks, but most have one or more disadvantages:

Pull back methods and potential disadvantages of each

Table 1. Pull-back methods and potential disadvantages of each

Only the last item, deviation from linear regression center line expressed in standard error units, appears not to have any significant weaknesses. Let’s take a closer look at this method and see why it is favored.

Chart Setup for Swing Trade Analysis

The chart below shows a linear regression line drawn thru the most recent 2 month period of a daily chart of GLBL (Global Industries). This company was identified in a scan for companies that had a high Sharpe ratio over the most recent 2 month period. Sharpe ratio is the annualized average growth rate divided by the standard deviation of the grow rate. The ideal Sharpe ratio stock (one that will have a high Sharpe ratio value), will be growing at a relatively high rate, and have a very little variation in this growth rate. High Sharpe ratio stocks will, using the chart below as an example, have a linear regression channel with a relatively steep slope (high percentage rate of change) and a relatively narrow width if the width is measured in standard error units. Standard error, by definition, is the average amount the price deviates from a linear regression center line drawn thru the price trend for the time frame under question. A low average deviation from the linear regression line means the channel will be relatively narrow. This Sharp Ratio screening of potential swing trade stocks favors the 4th criteria of a desirable swing trading techniques, by limiting the technique to symbols with high risk-adjusted gain.

Linear Regression Channel demonstrating typical swing trade

Fig 1. Linear Regression Channel Standard Error Deviation Method of Swing Trading

The above chart stock represents a typical stock selected for swing trading. In the sub graph, the running 40 bar Sharpe Ratio indicator reflects the risk adjusted (volatility adjusted) rate of gain of the stock. The FxDeviation indicator reveals where the current price is in terms of standard error units from the linear regression line. At the right most bar, the current closing price is 2.01 standard error units above the center line. Looking at the Linear Regression Channel in the main chart, the closing price of the last bar is 2 lines above the center line. Displaying the FxDeviation indicator in the sub graph provides a convenient way to cross-check the Linear Regression Channel (LRChan) settings to ensure they have been specified correctly. The Avg$Traded indicator, expresses the liquidity of the stock in terms of dollars traded each day (price X total daily volume, expressed in millions of dollars). Expressing liquidity in dollars traded rather than shares makes it easier to determine if the desired trade size can be accommodated, since the trade size is usually expressed in dollars.

Important Characteristics of Standard Error Linear Regression Channels

When a stocks is in a well-behaved trend, the price action typically moves between minus 2-3 and plus 2-3 standard error units from the linear regression center line. This is true regardless of the price and regardless of the volatility, since the standard error calculation automatically adjusts for volatility and price and sets the width of the linear regression channel accordingly. Thus, this pullback measure has a self-normalizingproperty that makes it especially attractive to traders, allowing a single technique to work well for a diverse group of symbols with respect to price and volatility. Swing trading entry and exits goals are approximately -2 standard error units and +2 standard error units, regardless of the entity traded. Not only does this method provide you with a rational entry point, it also provides for a rational profit target. For this method to work reliably, the time period over which the stock trend is analyzed must be long enough to show at least 2 or more decent amplitude “wiggles” so that the standard error measurement has some validity. If the time frame is too short, you will not have a “history” of what is “typical” for this stocks volatility as it continues its trend. The symbol should also be in a well behaved trend, which is encouraged by using a symbol selection filter requiring a high Sharpe Ratio. There is a second important observation regarding price action within the linear regression channel. When the price deviates by more than 3 standard error units from the center line, the trend is usually breaking down. The parallel line between -2.5 and -3 standard errors below the center line can be considered a proxy for a classical trend line drawn just below the lows of a trending stock. The corresponding rule for trading is then: Do not take trades in the direction of the trend when the price has pulled back to almost 3 or more standard error units from the center line. This becomes similar to the corresponding trend line rule: “do not take a long trade in a symbol that has just broken its trend line support.” The standard error deviation that is a proxy for a classical support trend line is easier to calculate than the algorithm required for calculating the exact position of a classical support or resistance trend line, and therefore lends itself evaluating a large number of symbols in an automated fashion, as will be seen later in this article.

Recommended Swing Trading Rules

In stocks prescreened for adequate liquidity and risk-adjusted growth rate (Sharpe ratio), recommended swing trading rules for long trades may be summarized as follows: Entry Rules

  • Enter when the price has a well-behaved pull back to approximately -1.75 to -2.50 standard error units from the linear regression center line. In this case, well-behaved means a gradually profit taking sell-off.
  • Avoid entry when the pull back to -1.75 to -2.5 has been abrupt, such as may occur with unfavorable news events. It is useful to check for any significant news events associated with a pull-back before a position is taken.
  • Do NOT make long entries when the price has pulled back to -3.0 or more standard error units.
  • Since deviations greater than -3.0 usually indicate a break in current trend, place an initial stop loss at -3.0. If price moves in your favor, use a trailing stop to lock in profits as the price continues in the desired direction.
Exit Rules
  • Consider taking profit when the stock climbs to approximately +1.75 to +2.50 standard error units.
  • Watch overall market action. If market is turning downwards, modifying profit target to less than +2.0 SE units.

Examples of Successful Swing Trades

Example of swing trade entry point for symbol DVR

DVR: Entry at -2.00 standard error (SE) units

Demonstration of successful swing trade completion on symbol DVR

DVR: Price hesitated and then rose for profitable exit at +2 SE units, in 22 days

Demonstration of successful swing trade on symbol BLBL

GLBL: Entry at -2 SE units , exit at 2.5 SE units in 12 days

Demonstration of successful swing trade on symbol IDCC

IDCC: entry at -2.00 SE units, exit at +1.75 SE units in only 4 days

Successful swing trade on symbol ETRM.  Bottom graph confirms liquidity is adequate for trade

ETRM: Entry at -1 SE units, exit at +1.9 SE units. Avg$Traded indicates adequate liquidity

Swing trade entry for symbol VG

VG: Entry at -1.75 SE units. Added to position 3 days later

Swing trade progresses but does not reach target for VG.  Stops out by trailing stop for profit.

VG continues upwards but price never reaches +2 SE profit target, then falls and trailing stop is hit

Examples of Failed Trades

Demonstration of failed swing trade symbol CPST

CPST: Entry at -3.5 SE units, stopped out. Deviations >=3 SE units often signify a change in trend

Demonstration of failed swing trade symbol ACHN.

ACHN: Entry at -4.2 SE units because price appeared to be holding, but violating rule #3

The -2.5 standard deviation trend line can be considered a proxy for a classical trend line drawn between the lows of the price action. Therefore, a price deviation greater than -3 SE units is essentially the same as breaking the classical trend line of support. Entering long after a classical support trend line is broken would be considered unwise, as this trade illustrates below:
Failed ACHN swing trade.  Entry was below -3 standard error units from center line

ACHN continues to decline and stopped out. Rule #3: Do not enter long below -3 deviation band

Failed swing trade for EMKR.  Entry was below -3 Std Error units from centerline.

EMKR: Entry far below -3, a risky trade as price has already broken the upward trend

EMKR trade progress.  Initially appears upwards, but then falls back and stops out.

EMKR moves sideways and continues to hold. Added to position

Complete EMKR swing trade demonstrating failure when entry is below -3 standard error units from centerline.

EMKR inches up, but then falls back stopping out. Deviations < -3.0 SE usually signify the prior trend is over

Failed swing trade symbol HW.  Entry was at -3 std error units.

HW: Entry at -3 SE units, therefore a risky trade

HW swing trade continues down and stops out.

HW Stopped out at -4 standard error units deviation. Price continued to decline.

Swing Trading Method Summary

 

1. Screen for Adequate Liquidity

My minimum liquidity criteria is the intended position may not exceed 2% of daily dollars traded per day. This is a fairly aggressive position relative to liquidity. More conservative traders may prefer limiting position size to less than 0.5% to 1% of daily dollars traded. In general, position size greater than 0.1% of the daily dollars traded per day may require scaling in and out to enter and exit over several minute periods to avoid moving the price significantly. With low liquidity stocks, it may also be used to hide the size of your limit orders using the “Show Only” size option of the Order Bar, or make trades near the beginning or end of the trading day, when volumes are typically 3-5X higher than those of mid-day.

Stocks may be pre-screened for adequate liquidity using the scanner and a custom indicator, Liquidity. Liquidity is measured in millions of dollars traded per day rather than shares because it is easier to relate this unit of measure to the position size (in dollars) the trader is prepared to take in each stock in the portfolio.

The scanner setup is shown below:

Liquidity Scan 1 Entire universe of stocks if about 8000 symbols

Fig. 2. The entire universe of stocks and ETF’s are selected (approximately 8000 symbols)

Custom Indicator Liquidity implements the liquidity criteria

Fig. 3. Custom indicator Liquidity implements the liquidity criteria

Input parameters for custom indicator Liquidity are set to ensure the 10 days (Length1) average dollars traded and the 50 days (Length2) average dollars traded are both above 0.5 million dollars. Daily average dollars traded is simply the daily closing price multiplied by the daily volume of shares. A second criterion (Min$) is used to ensure the price of the stock is above $0.50. My preference is to look for low priced stocks in the $1 to $15 range. I will rarely consider a stock below $1, even if the liquidity is adequate. Low priced stocks tend to move up at a greater rate of growth and also show more resistance to downward movements when the market indexes are pulling back. Out of the entire universe of stocks and ETF’s (8000) approximately half (4000) pass the liquidity screen.

The results of the liquidity scan are saved as a custom symbol list named “Liquidity” using the following scan settings:

Liquidity Scan Results Configuration to Save Results

Fig. 4. Scan result settings to create named list of resulting symbols, “Liquidity”

2. Determine Best Risk-Adjusted Return Candidates.

A 2 month (40 daily bars) or 4 months (80 daily bars) Sharpe Ratio value is calculated for all stocks determined to have adequate liquidity from the preliminary liquidity scan above. The best 500 Sharpe ratio stocks become the candidate group for long trades, using the scan setups shown below.

Results of previous liquidity scan are used as symbol universe

Fig. 5.  Results of the previous Liquidity scan are used as the symbol universe

Sharpe Ratio Scan Format Settings

Fig. 6.  Sharpe Ratio Scan Format Settings

Real-Time Monitoring of Price Pull-Backs

The 500 best 4-month Sharpe Ratio symbols identified by the above scan have been inserted inserted into the Radarscreen below, where the amount they have pulled back (deviation from the linear regression center line, Dev) is recalculated every several seconds in real time.

Radarscreen Indicator Showing Price Deviation from Linear Regression Center Line

Fig. 7.  Radarscreen Indicator: LRDeviation.RS monitors current price deviation from LR center line (Dev)

This Radarscreen indicator generates visual alerts (by color coding the Dev column results), and optionally audio alerts, whenever a symbol pulls back the “ideal amount” to be considered for a swing trade long entry.

Len is the number of bars included in the linear regression centerline analysis (80 trading days = 4-months). XOffset is the number of days the analysis is shifted away from the most current bar. This is done to prevent the most recent price movements (past 6 days) from influencing the direction of the linear regression center line. If these recent days were included, the linear regression center line would tend to turn in the direction of the most recent trend. This would then compromise our ability to see when the current price was breaking out of the historical trend.

DEV is the deviation of the current price from the LR center line. This column is color-coded to highlight those symbols that have pulled back an “ideal” amount for a long trade. A green background highlights those symbols that have pulled back between 2 and 2.5 standard error units from the LR center line. As the symbols approach this range (1.5 to 2.0 SE unit pullback), they are highlighted by green against a black background. Symbols that have pulled back more than an ideal amount (2.5 to 3.0 SE units) are highlighted in red against a black background, warning the trader that these may be at a point where the upward trend is breaking down. Symbols that have pulled back more than 3.0 SE units from the center line are highlighted by a bright red background. These symbols most often have pulled back so far that the trend is highly likely to have been broken and represent very high-risk trades. The bottom line is the trader should focus on those symbols with a green color or green background (ideal pull-back), and avoid those with a red color or red background (probably broken trend). By linking the above Radarscreen with a chart using global symbol links, the trader can go down this list of symbols clicking on the green and green-background symbols, looking for potential trades. As the price of all 500 symbols in this Radarscreen move during the day, this list is continually sorted and highlighted to show which symbols are approaching or at the ideal pull-back for a long entry.

Column Dev results are color-coded to assist the trader in identifying the symbols that have pulled-back an ideal amount for a long entry according to the swing trading method’s trading rules. The color codes are as follows:

Deviation Color Codes used to identify degree of deviation
These color codes alert the user to when the price deviation is reaching zone that is ideal for a potential long or short trade. Recall that the swing trading rules are attempt to enter a long trade at -2 SE deviation units from the linear regression center line. If the deviation is significantly more negative than this, the trend may be breaking down, and no long entry is recommended.

Note that for long trades, we also color code SE deviations > 2.5 as possible breakouts to the upside, and SE deviations > 3.0 as probably breakouts to the upside. Although this is not pertinent to this system of swing trading, some traders may use a breakout from a linear regression channel as a trigger to go long or short, rather than using the rules developed here for purposes of swing trading. This is the reason for choosing the color codes above +3.0 and -3.0, respectively.

ROC is the daily rate of change of the LR center line, measured as a percentage of price. Note the indicator results are sorted by ROC in descending order, placing the symbols with the highest rate of change at the top of the list. These stocks at the top of the list represent the stocks that are trending most strongly, on a percentage of price basis, and generally represent the most desirable symbols to trade in the long direction.

Risk-Reward Analysis

This swing trading technique lends itself easily to risk-reward analysis for each potential trade.

Two potential swing trades highlighted by blue boxe on chart

Two potential swing trades highlighted within the blue boxes

Calculation of Total Profit of two potential swing trades

Calculation of Total Profit of two potential swing trades, highlighted in blue

Total profit for each potential swing trade is the height of the respective blue boxes. This total profit can be seen to have two components: the profit contribution from the trend itself (P1 or P2), and the profit that results from the “swing” from -2 SE unit deviation point to +2 SE unit deviation point (P3).

Both of these components are easy to calculate.

P1 =[linear regression line rate of change (expressed in % of price)] X [Number of bars to complete trade]

or

P1 = ROC * 12 bars, and

P2 = ROC * 26 bars

P3 = distance between -2 SE deviation and +2 SE deviation = 4 X SE

Total Profit = P1 + P3 (first swing trade), OR

Total Profit = P2 + P3 (second swing trade)

Recalling from the trading rules of the swing trade strategy that deviations from the centerline of -3 SE units or more usually represents a break down in the trend, then the -3 SE deviation line becomes a reasonable stop loss for the trade. This makes the risk calculation very simple: risk is the distance between the entry point (-2 SE unit deviation line) and the stop loss (-3 SE unit deviation line), or:

Risk of Trade = 1 standard error unit

Risk reward calculations shown on price chart

Risk reward calculations for two potential swing trades

The reward/risk ratios for both potential swing trades are easy to calculate:

Reward/Risk (1st swing trade) = (P1 + P3) / (standard error) = (ROC * 12 + 4*SE) / SE = Approx. 6:1

Reward/Risk (2nd swing trade) = (P2 + P3) / SE = (ROC * 26 + 4*SE) / SE = Approx. 9:1

If one were lucky enough to enter a trade and to complete the swing trade in a single bar, the reward portion would be comprised of only the “swing profit” from the -2 SE deviation to the +2 SE deviation:

Reward / Risk = (4 * SE) / SE = 4:1

If the potential swing trade takes several days to complete, then the profit would also include that portion resulting from the trend of the linear regression (P1 or P2), and would, therefore, it would always be greater than 4 * SE. From this analysis we can conclude that with the swing trading technique proposed:

The theoretical reward/risk ratio will never be less than 4: 1!

The Radarscreen indicator LRDeviation.RS, previously shown, may now be expanded to included the reward and risk statistics calculated above:

Radarscreen Indicator LRDeviation.RS shows Risk Reward of potential trades

LRDeviation.RS expanded to include the reward and risk data for each potential trade

The above radarscreen indicator includes the reward and risk data, based on the assumption that the swing trade will take either 10 or 20 days to complete, shown by columns Swing Len 1 and Swing Len 2. The portion of the gain arising from the slope of the regression channel for both 10 and 20-day swing trades is ROC P1 and ROC P2. The portion of the profit arising from the swing from -2 SE deviation to +2 SE deviation is named 4 x SE = P3. Total profit for each swing trade duration is Total P1 and Total P2. The risk is 1 standard error unit, expressed as a percentage of price, Risk. The reward/risk ratio calculation for swing trades of 10 and 20 bars respectively is shown as Rsk Rwd 1 and Rsk Rwd 2. Break Even (BE) is the number of bars the trade must continue before the trailing stop is brought up to the entry point price. If the trade continues for at least BE days, there will be no loss.

Downloads

Initially posted version:  07/09/12

Latest Update:  09/24/221

*.ELD files are compiled for TS 9.5

All ELD and code text files are packaged here:

SWINGTRADING.zip

Users of earlier versions fo TradeStation may compile the code
from the text files included in the above *.zip file.

The code may be visualized here:

LRChan Indicator

Avg$Traded Liquidity Indicator (Chart)

FxDeviation Indicator (Chart)

SharpeRatio Indicator (Chart)

LRDeviation.RS Indicator (RadarScreen)

SharpeRatio.RS Indicator (Radarscreen)