Tuesday, October 13, 2009

Average True Range (ATR)

Introduction :

Developed by J. Welles Wilder and introduced in his book, New Concepts in Technical Trading Systems (1978), the Average True Range (ATR) indicator measures a security's volatility. As such, the indicator does not provide an indication of price direction or duration, simply the degree of price movement or volatility.

As with most of his indicators, Wilder designed ATR with commodities and daily prices in mind. In 1978, commodities were frequently more volatile than stocks. They were (and still are) often subject to gaps and limit moves. (A limit move occurs when a commodity opens up or down its maximum allowed move and does not trade again until the next session. The resulting bar or candlestick would simply be a small dash.) In order to accurately reflect the volatility associated with commodities, Wilder sought to account for gaps, limit moves, and small high-low ranges in his calculations. A volatility formula based on only the high-low range would fail to capture the actual volatility created by the gap or limit move.

Wilder started with a concept called True Range (TR) which is defined as the greatest of the following:

The current High less the current Low.
The absolute value of the current High less the previous Close.
The absolute value of the current Low less the previous Close.
If the current high-low range is large, chances are it will be used as the True Range. If the current high-low range is small, it is likely that one of the other two methods would be used to calculate the True Range. The last two possibilities usually arise when the previous close is greater than the current high (signaling a potential gap down or limit move) or the previous close is lower than the current low (signaling a potential gap up or limit move).
To ensure positive numbers, absolute values were applied to differences.



The example above shows three potential situations when the TR would not be based on the current high/low range. Notice that all three examples have small high/low ranges and two examples show a significant gap.

A small high/low range formed after a gap up. The TR was found by calculating the absolute value of the difference between the current high and the previous close.
A small high/low range formed after a gap down. The TR was found by calculating the absolute value of the difference between the current low and the previous close.

Even though the current close is within the previous high/low range, the current high/low range is quite small. In fact, it is smaller than the absolute value of the difference between the current high and the previous close, which is used to value the TR.
Note:

Because the ATR shows volatility as an absolute level, low price stocks will have lower ATR levels than high price stocks. For example, a $10 security would have a much lower ATR reading than a $200 stock. Because of this, ATR readings can be difficult to compare across a range of securities. Even for a single security, large price movements, such as a decline from 70 to 20, can make long-term ATR comparisons difficult.
Calculation :

Typically, the Average True Range (ATR) is based on 14 periods and can be calculated on an intraday, daily, weekly or monthly basis. For this example, the ATR will be based on daily data. Because there must be a beginning, the first TR value in a series is simply the High minus the Low, and the first 14-day ATR is the average of the daily ATR values for the last 14 days. After that, Wilder sought to smooth the data set, by incorporating the previous period's ATR value. The second and subsequent 14-day ATR value would be calculated with the following steps:

1. Multiply the previous 14-day ATR by 13.
2. Add the most recent day's TR value.
3. Divide by 14.



In the Excel spread sheet example above, the first True Range value (1.9688) equals the High minus the Low. The first 14-day ATR value (3.6646) was calculated by finding the average of first 14 True Range values. The second ATR value was smoothed by using the previous value.



For those trying this at home, here are a few caveats: There is always a beginning, and the first calculations may not conform exactly with the formula.

The first True Range value is simply the High minus the Low, and the first ATR is a simple average of the first 14 True Range values.

Many indicators involve a smoothing process. In this example, the current ATR calculation uses the previous period's ATR.

The size of the data set will affect the final outcome. This example only contains a small portion of the available historical price data.

Although the difference is not likely to be huge, a data set of 33 days will produce a different ATR value than a data set of 500 days.

Due to rounding issues and decimal places, an exact match may not be possible.
(If you want to create an ATR from your own data, first try to duplicate the above example using the provided Open-High-Low-Close data. Once your calculations match the example's, you can then plug in your own Open-High-Low-Close data.)



The IBM chart above provides an example of the 14-day ATR in action. Extreme levels (both high and low) can mark turning points or the beginning of a move. As a volatility-based indicator like Bollinger Bands, the ATR cannot predict direction or duration, simply activity levels. Low levels indicate quiet trading (small ranges), and high levels indicate violent trading (large ranges). A prolonged period of low ATR readings might indicate consolidation and the beginning of a continuation move or reversal. High ATR readings usually result from a sharp advance or decline and are unlikely to be sustained for extended periods.



The ATR is on the Indicators drop-down menu, listed as "Average True Range." The Parameters box to the right of the indicator contains the default value, 14, for the number of periods used to smooth the data. To adjust the period setting, highlight the default value, and enter a new period setting. SharpCharts also allows you to position the indicator above, below, or behind the price plot.

Monday, October 12, 2009

Aroon Oscillator - indicator

Aroon Oscillator Introduction :

Developed by Tushar Chande in 1995, Aroon is an indicator system that can be used to determine whether a stock is trending or not and how strong the trend is. "Aroon" means "Dawn's Early Light" in Sanskrit and Chande chose that name for this indicator since it is designed to reveal the beginning of a new trend.

The Aroon indicator system consists of two lines, 'Aroon(up)' and 'Aroon(down)'. It takes a single parameter which is the number of time periods to use in the calculation. Aroon(up) is the amount of time (on a percentage basis) that has elapsed between the start of the time period and the point at which the highest price during that time period occurred. If the stock closes at a new high for the given period, Aroon(up) will be +100. For each subsequent period that passes without another new high, Aroon(up) moves down by an amount equal to (1 / # of periods) x 100.

Technically, the formula for Aroon(up) is:
[ [ (# of periods) - (# of periods since highest high during that time) ] / (# of periods) ] x 100
For example, consider plotting a 10-period Aroon(up) line on a daily chart. If the highest price for the past ten days occurred 6 days ago (4 days since the start of the time period), Aroon(up) for today would be equal to ((10-6)/10) x 100 = 40.
Aroon(down) is calculated in just the opposite manner, looking for new lows instead of new highs. When a new low is set, Aroon(down) is equal to +100. For each subsequent period that passes without another new low, Aroon(down) moves down by an amount equal to (1 / # of periods) x 100.

The formula for Aroon(down) is :
[ [ (# of periods) - (# of periods since lowest low during that time) ] / (# of periods) ] x 100

Continuing the example above, if the lowest price in that same ten-day period happened yesterday (i.e. on day 9), Aroon(down) for today would be 90.

Aroon Oscillator :

A separate indicator called the Aroon Oscillator can be constructed by subtracting Aroon(down) from Aroon(up). Since Aroon(up) and Aroon(down) oscillate between 0 and +100, the Aroon Oscillator will oscillate between -100 and +100 with zero as the center crossover line.

Interpretation Guidelines :

Chande states that when Aroon(up) and Aroon(down) are moving lower in close proximity, it signals that a consolidation phase is under way and no strong trend is evident. When Aroon(up) dips below 50, it indicates that the current trend has lost its upward momentum. Similarly, when Aroon(down) dips below 50, the current downtrend has lost its momentum. Values above 70 indicate a strong trend in the same direction as the Aroon (up or down) is under way.

The Aroon Oscillator signals an upward trend is underway when it is above zero and a downward trend is underway when it falls below zero. The farther away the oscillator is from the zero line, the stronger the trend.



In some ways, Aroon is similar to Wilder's DMI system (and the Aroon Oscillator is similar to Wilder's ADX line) however the Aroon is constructed in a completely different manner. Divergences between the two systems may be very instructive.

Aroon and SharpCharts :



With SharpCharts, you can chart the Aroon and Aroon oscillator indicators using any specified number of periods. The default is 25, but it can be edited using the Parameters text box. The Position drop-down menu determines whether the indicators are placed above, below, or behind the main price plot window.

Saturday, October 10, 2009

Accumulative Swing Index And The McClellan Oscillator

The accumulation swing index (ASI) is a variation of Welles Wilder's swing index. It plots a running total of the swing index value of each bar. The swing index is a value from 0 to 100 for an up bar and 0 to -100 for a down bar. The swing index is calculated by using the current bar's open, high, low and close, as well as the previous bar's open and close. The swing index is a popular tool in the futures market.

The accumulative swing index is used to gain a better long-term picture than using the plain swing index, which uses data from only two bars. If the long-term trend is up, the accumulative swing index is a positive value. Conversely, if the long-term trend is down, the accumulative swing index is a negative value. If the long-term trend is sideways (non-trending), the accumulative swing index fluctuates between positive and negative values. This indicator is used to analyze futures but can be applied to stocks as well.

ASI will give the technician numerical price swings that are value quantified, and it will show short-term trend turnarounds. Metastock explains it best: "A breakout is indicated when the accumulative swing index exceeds its value on the day when a previous significant high swing point was made. A downside breakout is indicated when the value of the accumulative swing index drops below its value on a day when a previous significant low swing point was made." You can confirm trendline breakouts by comparing trendlines on the ASI to trendlines on the price chart. A false breakout is indicated when a trendline drawn on the price chart is penetrated but a similar trendline drawn on the accumulative swing index is not penetrated.



This 2002 chart of Apple Computer (AAPL) shows a couple of trendlines which confirm the short-term trend witnessed in May and the horizontal pattern that has developed over the summer and early fall. The ASI in this chart indicates no buy signal, yet each and every day the sellers of this stock find buyers.

This indicator can be used on occasion to confirm a belief in a trend swing.

McClellan Oscillator :

The McClellan Oscillator, developed by Sherman and Marian McClellan in the late 1960s, calculates the difference between two exponential moving averages by using the advances and declines from the same day period.

Now, this may be the most important part to understand: the two moving averages are always 19 and 39 time periods and represent 10% and 5% trend values, respectively. Professional charting software programs like Tradestation and others use 19 and 39-day periods as the default periods, but many chartists will experiment with other periods in an attempt to fine tune their studies. If you do use the 19/39 model, the McClellan is a good short-term indicator, anticipating positive and negative changes in the advance/decline stats for better market timing.

The McClellan Oscillator uses averages and differences based on this data to gauge market breadth. To plot the McClellan Oscillator accurately, the chart must contain both the advancing issues and the declining issues, and the inputs must specify the correct data number for each. Because the McClellan Oscillator uses exponential averages, the numeric value of the McClellan Oscillator will depend on the data available in the chart. If a stock market index is rallying but more issues are declining than advancing, then the rally is narrow and much of the stock market is not participating.

Similar to the moving average convergence/divergence, the McClellan Oscillator is a momentum indicator. When the short-term average moves above the long-term average, a positive value is recorded. As with most oscillators, the McClellan Oscillator shows an overbought issue when the indicator measures in the positive 70 to 100 range, and it shows an oversold issue in the minus 70 to 100 range. Buy signals are indicated when the oscillator advances from oversold levels to positive levels, and, conversely, sell signals are indicated by declines from overbought to negative territory. A rising trendline of troughs and peaks would be a positive sign to the trader while falling tops and bottoms would bring out the sellers.



In the 2002 chart of Exxon Mobil (XOM) you can see at the bottom of the chart that the plot is 81.19, indicating a sell signal for the issue.

These indicators serve as confirmation indicators to those of us who need to double check our findings on a regular basis.

Remember, it's your money - invest it wisely.

Saturday, October 3, 2009

Accumulation/Distribution Line

Introduction - Volume and the Flow of Money There are many indicators available to measure volume and the flow of money for a particular stock, index or security. One of the most popular volume indicators over the years has been the Accumulation/Distribution Line. The basic premise behind volume indicators, including the Accumulation/Distribution Line, is that volume precedes price. Volume reflects the amount of shares traded in a particular stock, and is a direct reflection of the money flowing into and out of a stock. Many times before a stock advances, there will be period of increased volume just prior to the move. Most volume or money flow indicators are designed to identify early increases in positive or negative volume flow to gain an edge before the price moves. (Note: the terms "money flow" and "volume flow" are essentially interchangeable.)

Methodology :

The Accumulation/Distribution Line was developed by Marc Chaikin to assess the cumulative flow of money into and out of a security. In order to fully appreciate the methodology behind the Accumulation/Distribution Line, it may be helpful to examine one of the earliest volume indicators and see how it compares. In 1963, Joe Granville developed On Balance Volume (OBV), which was one of the earliest and most popular indicators to measure positive and negative volume flow. OBV is a relatively simple indicator that adds the corresponding period's volume when the close is up and subtracts it when the close is down. A cumulative total of the positive and negative volume flow (additions and subtractions) forms the OBV line. This line can then be compared with the price chart of the underlying security to look for divergences or confirmation. In developing the Accumulation/Distribution Line, Chaikin took a different approach. OBV uses the change in closing price from one period to the next to value the volume as positive or negative. Even if a stock opened on the low and closed on the high, the period's OBV value would be negative as long as the close was lower than the previous period's close. Chaikin chose to ignore the change from one period to the next and instead focused on the price action for a given period (day, week, month). He derived a formula to calculate a value based on the location of the close, relative to the range for the period. We will call this value the "Close Location Value" or CLV. The CLV ranges from plus one to minus one with the center point at zero. There are basically five combinations:

( ( (C - L) - (H - C) ) / (H - L) ) = CLV

1. If the stock closes on the high, the top of the range, then the value would be plus one.
2. If the stock closes above the midpoint of the high-low range, but below the high, then the value would be between zero and one.
3. If the stock closes exactly halfway between the high and the low, then the value would be zero.
4. If the stock closes below the midpoint of the high-low range, but above the low, then the value would be negative.
5. If the stock closes on the low, the absolute bottom of the range, then the value would be minus one.
The CLV is then multiplied by the corresponding period's volume, and the cumulative total forms the Accumulation/Distribution Line.

The daily chart of Ciena (CIEN) gives a breakdown of the Accumulation/Distribution Line, and shows how different closing levels affect the value. The top
section shows the price chart for CIEN. The closing level relative to the high-low range is clearly visible. The second section with a black histogram is
the Closing Location Value (CLV). The CLV is multiplied by volume, and the result appears in the green histogram. Finally, at the bottom, is the
Accumulation/Distribution Line.


1. The close is on the low and the CLV = -1. Volume, however, was relatively light, so the Accumulation/Distribution Value for that period is only moderately
negative.

2. The close is very near the high and the CLV = +.9273. Volume is relatively high, so the resulting Accumulation/Distribution Value is high.

3. The close is near the low and the CLV = -.75. Volume is moderately high, so the resulting Accumulation/Distribution Value is moderately high as well.

4. The close is about half way between the mid-point of the high-low range and the high, and the CLV = +.51. Volume is very heavy, so the Accumulation/Distribution Value is also very high.



Accumulation/Distribution Line Signals :

The signals for the Accumulation/Distribution Line are fairly straightforward and center around the concepts of divergence and confirmation.
Bullish Signals :

A bullish signal is given when the Accumulation/Distribution Line forms a positive divergence. Be wary of weak positive divergences that fail to make
higher reaction highs or those that are relatively young. The main issue is to identify the general trend of the Accumulation/Distribution Line.
A two-week positive divergence may be a bit suspect. However, a multi-month positive divergence deserves serious attention.





On the chart for Alcoa, Inc. (AA), the Accumulation/Distribution Line formed a huge positive divergence that was over 4 months in the making. Even though
the stock fell from above 35 to below 30, the Accumulation/Distribution Line continued on a relentless march north. If one did not know better, it would
seem that the two plots did not belong together. However, the stock finally caught up with the Accumulation/Distribution Line when it broke resistance in
November.



Another means of using the Accumulation/Distribution Line is to confirm the strength or sustainability behind an advance. In a healthy advance, the
Accumulation/Distribution Line should keep up or, at the very least, move in an uptrend. If the stock is moving up at a rapid clip, but the
Accumulation/Distribution Line has trouble making higher highs or trades sideways, it should serve as an indication that buying pressure is relatively weak.






Wal-Mart Stores (WMT) began a sharp advance in August that was accompanied by an equally strong move in the Accumulation/Distribution Line. In fact, the
Accumulation/Distribution Line was stronger than the stock in early September. After a bit of a consolidation, both again started higher and recorded new
reaction highs in early October. Volume flows were behind this advance from the very beginning and continued throughout. The stock ended up advancing from
40 to 60 in about 3 months. Interestingly, as of this writing (December 1999) the Accumulation/Distribution Line has started to move sideways and is
indicating that buying pressure is beginning to wane.

Bearish Signals :

The same principles that apply to positive divergences apply to negative divergences. The key issue is to identify the main trend in the
Accumulation/Distribution Line and compare it to the underlying security. Young negative divergences, or those that are relatively flat, should be looked
upon with a healthy dose of skepticism.


The Wal-Mart chart shows a relatively flat negative divergence that is just over a month old. This negative divergence has yet to make a lower low, and
should probably be given a little more time to mature. The relative weakness in the Accumulation/Distribution Line should serve as a sign that buying
pressure is diminishing while the stock remains at lofty levels.


The Delta Air Lines (DAL) chart shows a negative divergence that developed within the confines of a clear downtrend. The stock had clearly broken down, a
nd the Accumulation/Distribution Line was declining in line with the stock. A deteriorating Accumulation/Distribution Line confirmed weakness in the stock.
During the June-July rally, the stock recorded a new reaction high, but the Accumulation/Distribution Line failed, thus setting up the negative divergence.



Accumulation/Distribution Line and SharpCharts :



With SharpCharts, the Accumulation/Distribution Line can be set as an indicator above or below a security's price plot, using the Position drop-down menu.
You can also add a simple moving average (SMA) to the indicator panel by entering the number of periods for the SMA into the Parameters text box.


Conclusions :


The Accumulation/Distribution Line is good means to measure the volume force behind a move.


1. As a volume indicator, the Accumulation/Distribution Line will help to determine if the volume in a security is increasing on the advances or declines.

2. The Accumulation/Distribution Line can be used to gauge the general flow of money. An uptrend indicates that buying pressure is prevailing, and a downtrend indicates that selling pressure is prevailing.

3. The Accumulation/Distribution Line can be used to spot divergences, both positive and negative.

4. The Accumulation/Distribution Line can be used to confirm the strength and sustainability behind a move.

There are some drawbacks to the Accumulation/Distribution Line, though.


1. The indicator does not take gaps into consideration. A stock that gaps up and closes midway between the high and the low will not receive any credit for
the advance off of the gap. A series of gaps could go largely undetected.

2. Because the Accumulation/Distribution Line is clearly tied to price movement, specifically the close, it will sometimes move in step with the underlying
security, and yield few divergences.

3. It sometimes difficult to detect subtle changes in volume flows. The rate of change in a downtrend could be slowing, but it may be impossible to detect
until the Accumulation/Distribution Line turns up. This drawback has been addressed in the form of the Chaikin Oscillator or Chaikin Money Flow, which are
next in the education series.