Links to the easylanguage code(s) can be found on the bottom of page 2 of this article, here.
When actively trading the financial markets, it is easy to overlook basic facts about the assets traded. For example, based on the time duration that a position is expected to remain open, does the trader know the asset’s average price range or whether it is a stock, futures or exchange-traded fund? To address this common oversight, a set of price-range statistical indicators was developed to gauge the measure of price ranges for the S&P 500 E-mini futures contract. This can be used to help make trading decisions.
“Flash crash volatility” (below) gives daily bars of the E-mini contract with an indicator measuring daily price range as a number of standard deviations from the contract’s average daily price range. Cyan coloring on the bottom indicator displays more than two standard deviations in daily price range (the day’s high-to-low value).
On May 6, 2010, the “flash crash,” we see a greater than five-standard-deviation price move. Also of interest is the indication of low volatility preceding the flash crash and then higher volatility aftershocks that appear to be the result of market nervousness immediately following the historic event. (The average price range indicator previously was highlighted in “Technical indicators: A statistical approach,” July 2010.)
Assuming price followed a normal distribution, a five-standard-deviation move has a probability of approximately 0.00003%, and if using a daily chart and 250 trading days per year, we should experience a five-standard-deviation flash crash event no more than once every 13,000 years. Obviously, financial markets cannot be modeled completely using normal distribution. Markets exhibit what are known as “fat tails,” which indicate more than normal activity far from the mean. Fat tails account for panics and over-exuberance, and different assumptions of distribution are required to model them.
Nonetheless, normal distribution works as a good first approximation (as long as extreme events are ensured against). For example, the Market Profile Value Area is defined as encompassing a 70% price movement beginning from a mode (most common) price. The 70% value represents a one-standard-deviation variation in price. Bollinger Bands are similarly based on standard deviation calculations and normal distribution.
Price range indicator
A new Daily Price Range Standard Deviation (DPR SD) indicator is shown in “Statistical indicator” (below) where it is applied to an intraday 10-minute E-mini bar chart. Its graph appears underneath the E-mini candlestick chart. DPR SD values are graphed as a continuously rising line of standard deviation values (z-scores). These indicate the current range of contract price based on a 400-period sample (the period length is configurable).
A DPR SD value less than zero indicates the day’s price range is less than the average price range. When the indicator plot reaches zero, the contract has met its average daily price range. Values above zero indicate the contract has exceeded its average daily price range.
On the E-mini contract candlestick chart, three values are printed: Average daily price range, the standard deviation of daily price range and the Coefficient of Variation (CV) of daily price range. The CV is the ratio of price range standard deviation to its average. As of Dec. 9, 2011, these values were: 18.91, 11.76 and 0.62. They change, modestly, from day to day as the market trades.
As the session progresses, the indicator plot has the following general behavior:
- At the open, its value typically is much less than 0, unless there is a significant opening gap.
- The indicator rises throughout the session. When it reaches the zero line, the average price range for the contract has been reached.
- When the indicator is above the zero line, price range is extended above its average value.
- When the market closes, the indicator provides the total price range, in standard deviations, of the session.
When implementing the DPR SD indicator, the issue of how to handle opening gaps must be addressed, specifically, whether an opening gap should be included or ignored in the session’s price range calculation. This is similar to the Welles Wilder Average True Range (ATR) consideration. The preference is to include opening gaps; however, some users will want to focus on price range activity that occurs just within the day session. For this reason, an ATR parameter is part of the indicator. With ATR = TRUE, the opening range will be included. With ATR = FALSE, the opening range will not be included. The default setting is ATR = TRUE.
The Dec. 10 session in “Statistical indicator” shows that the average daily price range was 18.93 with a standard deviation of 11.77. An opening gap down from the previous session was 1253.75 – 1238.25 = 15.50 points. The first 10-minute bar closed down an additional 5.75 points to 1232.50, making for first 10-minute bar opening range from the previous session of 15.50 + 5.75 = 21.25 points.
The DPR indicator gave a value of 0.20 standard deviations at its first 10-minute bar print, which is consistent: (0.20 x 11.77) + 18.93 = 21.28 points (roughly 21.25 points). Here we have used the formula x = zσ + μ to check that the DPR standard deviation output is consistent with price action.
By handling all the laborious price range calculations and providing a visual representation of price action, the DPR SD indicator assists the trader with an additional view of the market. TradeStation EasyLanguage source code for the indicator is provided available for download here .
Applying the indicator
It’s helpful to maintain the DPR SD indicator on a separate monitor throughout the trading day for occasional review. There is no single indicator that can make a successful trader. Rather, it is the review of a variety of inputs, with price action as the focus, that helps the participant navigate the market profitably.
The first examples of trading with the DPR SD indicator are shown in “Trading with the range” (below) from May 18-19, 2011. The chart gives an idea of how the indicator is put to use. From the May 18 session, we see a trend-up day with the DPR SD level rising consistently throughout the session. If the trader had been lucky enough to be long early in the session, then when the DPR indicated that the average daily price range had been reached, some (or all) profits might be taken.
From the next day’s session, May 19, we see a lesser valued and flat indicator for much of the day. Here the trader is seeing price rotation, and might expect to reduce profit target expectations, or focus on entering by fading the market at price channel extremes. (An alternate view of the price action is that compression was occurring and a breakout might result.)
The next example applying the DPR SD indicator comes from a review of the four most popular E-mini stock index futures markets: S&P 500 (ES), Russell 2000 (TF), Nasdaq 100 (NQ) and the Dow (YM). E-mini day-traders often will trade these four markets simultaneously, looking for price divergences among them that can make for profitable trading.
“All in the family” (below) from Dec. 8, 2011, shows the four markets in a single workspace: ES in the lower left corner, TF in the upper left, NQ in the upper right and YM in the lower right. In this setup, the trader scans the four markets to gain an understanding of the price action among them. We can see that an obvious divergence appears between the Nasdaq 100 and the other three markets. While the Nasdaq DPR SD remains flat, the other three markets have extended price above their averages, and in the case of the ES by a considerable amount (0.50 standard deviation).
One of two possibilities may be presenting itself:
- The tech-heavy Nasdaq is acting as the leader market, indicating that the session’s initial selling will subside; or
- The Nasdaq is temporarily out-of-sync with the broader market, and if the other markets make new lows on the day, then current price action in the Nasdaq may make a good short entry.
The second scenario turned out to be the case. The other three markets did break below their first hour lows and shorting the Nasdaq would have been a well-positioned trade.
Finally, let’s reconsider the Coefficient of Variation (CV) (the ratio of a standard deviation to average). The CV is a unit-independent means of comparing price distribution across applications. It is always eye-opening when a new indicator provides an additional view of market price action. The following table shows CV values for the four popular E-mini stock index futures markets:
CV (as of Dec. 12, 2011
We can see that the YM (Dow) is the most active of the four E-mini contracts, with a standard deviation of daily price range that is 64% of its average daily range. This runs counter to what might be the common assumption — that the blue chip Dow would be the less volatile of the four.
As we’ve seen here, the markets contain a plethora of information, about price and the movement of price, that may not readily be apparent. However, that data may sit just below the surface, and with a little digging, using common and accessible tools, you can uncover insightful new measures of
Michael Gutmann was a software engineer at Intel Corp. for 20 years. He trades daily and recently has published “The Very Latest E-Mini Trading: Using Market Anticipation to Trade Electronic Futures, 2nd Edition.” Reach him via www.anticipationtrading.com.