WebCab Technical Analysis
(J2SE Edition)

webcab.lib.finance.trading.indicators
Class AccumulateDistribute

java.lang.Object
  |
  +--webcab.lib.finance.trading.indicators.AccumulateDistribute
All Implemented Interfaces:
Serializable

public class AccumulateDistribute
extends Object
implements Serializable

These indicators measure to what degree on net an asset is being accumulated (i.e. brought) or distributed (i.e. sold) by the market as a whole.

See Also:
Serialized Form

Constructor Summary
AccumulateDistribute()
          Creates a new instance.
 
Method Summary
 double accumulationDistribution(double high, double low, double volume)
          The accumulation/distribution indicator illustrates the degree to which an asset is being accumulated or reduced by the market on a given day.
 double accumulationDistributionPeriod(double[] highs, double[] lows, double[] volume)
          This indicator is a slight generalization of the AccumulationDistribution indicator above, here the indicator may be evaluated with respect to a period of a days rather than with respect to a one day period.
 double chaikinMoneyFlow(double[] high, double[] low, double[] closing, double[] volume)
          Chaikin Money Flow (CMF) is a volume weighted average of Accumulation/Distribution over a specified period, which is usually taken to be 21 days.
 double chaikinOscillator(double[] high, double[] low, double[] volume, double smoothingFactor)
          This method implements the Chaikin Oscillator (also known as the Chaikin A/D Oscillator).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccumulateDistribute

public AccumulateDistribute()
Creates a new instance.

Method Detail

accumulationDistribution

public double accumulationDistribution(double high,
                                       double low,
                                       double volume)
The accumulation/distribution indicator illustrates the degree to which an asset is being accumulated or reduced by the market on a given day. The indicator uses the closing price's proximity to the high or low to determine if accumulation or reduction is taking place in the market. The proximity measure if then multiplied by the volume in order to give more weight to moves with correspondingly higher volume.

Application
A divergence between the price action and the accumulationDistribution indicator can signal that a trend is nearing completion, a trends continuation and imminent break-outs from trading ranges. The actual value of this indicator is of no significance, what is significant is its change in value relative to the previous periods which can warn of a possible break-out during a trading range (falling/rising indicator), the continuation of a trend (higher highs in uptrend, or lower lows in downtrend) or a change/completion of a trend (divergence between the price action and the direction of the indicator).

Parameters:
high - the intraday high for the given day under consideration
low - the intraday low for the given day under consideration
volume - the days volume for the given day under consideration
Throws:
IllegalArgumentException - thrown if any of the parameters are strictly negative numbers.
See Also:
a slight variation which measures the Accumulation/Distribution over a period.

accumulationDistributionPeriod

public double accumulationDistributionPeriod(double[] highs,
                                             double[] lows,
                                             double[] volume)
This indicator is a slight generalization of the AccumulationDistribution indicator above, here the indicator may be evaluated with respect to a period of a days rather than with respect to a one day period.

Notes on the Indicators Application

The period accumulation/distribution indicator (accumulationDistributionPeriod) illustrates the degree to which an asset is being accumulated or distributed by the market on a given period. The indicator uses the closing price's proximity to the high or low over the period to determine if accumulation or reduction is taking place in the market. The proximity measure if then multiplied by the volume over the period in order to give more weight to moves with correspondingly higher volume.

Interpretation
A divergence between the price action and the AccumulationDistribution indicator can signal that a trend is nearing completion, a trends continuation and break-outs from trading ranges. The actual value of this indicator is of no significance, what is significant is its change in value relative to the previous periods which can warn of a possible break-out during a trading range (falling/rising indicator), the continuation of a trend (higher highs in uptrend, or lower lows in downtrend) or a change/completion of a trend (divergence between the price action and the direction of the indicator).

Parameters:
highs - an array of the intraday highs over the period
lows - an array of the intraday lows over the period
volume - an array of the volume on each day over the period
Throws:
IllegalArgumentException - throw when the three arrays highs, lows, volume do not have the same length, and when any element of these three arrays is a strictly negative number.
See Also:
measure the accumulate/distribution on an asset over a single trading period.

chaikinOscillator

public double chaikinOscillator(double[] high,
                                double[] low,
                                double[] volume,
                                double smoothingFactor)
This method implements the Chaikin Oscillator (also known as the Chaikin A/D Oscillator). The Chaiken Oscillator presents the information contained within the A/D indicator in the convenient form of an oscillator. That is, the Chaikin Oscillator is simply the Moving Average Convergence Divergence indicator (MACD) applied to the Accumulation/Distribution Line.

Interpretation
A sell signal is when price action develops a higher high into overbought zones and the Chaikin Oscillator diverges with a lower high and begins to fall. Conversely, a buy signal is generated when price action develops a lower low into oversold zones and the oscillator diverges with a higher low and begins to rise. The Chaikin Oscillator can also be used to time entry to existing trends by either buying the dip (when the oscillator turns down) or selling the rally (when the oscillator turns up).

Evaluation
The Chaiken Oscillator is given by:

EMA_3(Accumulate/Distribution) - EMA_10(Accumulate/Distribution),

where EMA_3 and EMA_10 is the exponential moving average over 3 and 10 days respectively; and Accumulate/Distribution is the corresponding indicator over those 3 or 10 days respectively.

Parameters:
high - an array of 10 elements where the first term is the high in the last trading period, the second term is the high in the trading period before that, and so on
low - an array of 10 elements where the first term is the low in the last trading period, the second term is the low in the trading period before that, and so on
volume - an array of 10 elements where the first term is the volume in the last trading period, the second term is the volume in the trading period before that, and so on
smoothingFactor - the number between 0 and 1. The lower the number the more sensitive the moving average is.
Throws:
IllegalArgumentException - thrown when the three arrays high, low, volume do not have the same length and when the smoothing factor does not lie within the closed interval [0,1].

chaikinMoneyFlow

public double chaikinMoneyFlow(double[] high,
                               double[] low,
                               double[] closing,
                               double[] volume)
Chaikin Money Flow (CMF) is a volume weighted average of Accumulation/Distribution over a specified period, which is usually taken to be 21 days. The CMF offers a volume weighted indicator on the following two principles:

Interpretation
A sell signal is generated in positive over brought territory when higher highs diverge into a lower high and the indicator continues to decrease. Conversely, a buy signal in generated in negative oversold territory when lower lows diverge into a high low and the indicator continues to increase.

The CMF indicator can be used as a confirmation signal after a breakout of a trading range. When a market breaks higher then the breakout is confirmed if the CMF moves into positive territory and continues to get stronger. Conversely, if the market down after a trading range then the breakout if confirmed if the CMF move into negative territory and continues to weaken.

Evaluation
The CMF indicator is evaluated for the following steps:

Parameters:
high - an array where the first term in the high in the latest trading period and the second term is the high in the previous trading periods and so on... Until the last term which is the highest market price during the first period which is used in the evaluation of the CMF indicator
low - an array where the first term in the low in the latest trading period and the second term is the low in the previous trading periods and so on... Until the last term which is the lowest market price during the first period which is used in the evaluation of the CMF indicator.
closing - an array where the first term is the closing price in the latest trading period and the second term is the closing price in the previous trading periods and so on... Until the last term which is the closing price during the first period which is used in the evaluation of the CMF indicator
volume - an array where the first term in the volume in the securities latest trading period and the second term is the securities volume in the previous trading periods and so on... Until the last term which is the securities volume during the first period which is used in the evaluation of the CMF indicator
Throws:
IllegalArgumentException - thrown if the arrays high, low, close, volume do not have the same length or if any element of these arrays is a strictly negative number.

WebCab Technical Analysis
(J2SE Edition)