Chart Spotlight Top Advisor's Corner Learning Center Members Help
       
 
       
     
     
  Moving Averages  
     
       
   
 

[ Glossary menu ]

A moving average averages data in a specified period that "moves" in order to stay current with the present. A 200-day moving average, for example, moves so that it always represents the average of the last 200 days. In this discussion I will refer only to averages of days, but increments larger or smaller than days can be used when desired.

There are two kinds of moving averages that we will discuss here, simple and exponentially weighted.

SIMPLE MOVING AVERAGE
The simple moving average is calculated, as you can imagine, quite simply. Lets use an example of a 200-Day Moving Average (200-DMA). You add the data of the last 200 days, then divide the result by 200. Simple. The average "moves" and changes each day as the oldest value is dropped out of the calculation and the new day's value added in.

In a simple moving average every day's value is given equal weight, and the effect of large values dropping out of the calculation as the average moves can unduly effect the result or skew the result in a way that may not be desirable.

Another disadvantage of the simple moving average is that data must be maintained for the entire period covered by the average. For the standard 200-DMA this can become quite cumbersome.

EXPONENTIALLY WEIGHTED MOVING AVERAGE (EMA)
The exponentially weighted moving average (hereafter called the exponential average) has the advantage of giving the most weight to the most current value. Also it only requires that you maintain the value of the previous day's average rather than the data for the entire period being averaged, so it is very compact.

Note: In this discussion the division symbol will be represented by the slash (/) and the multiplication symbol by the asterisk (*) in all formulas shown here so that they will resemble formulas used in spreadsheet software.

TWO CALCULATION METHODS

I hate to complicate the issue by presenting different methods of calculating EMAs, but I have used one method for years (Method #1), and it is the one I use in calculating all of my indicators. For periods longer than 10, there is very little variation between the two methods, but for short periods Method #2 would be the preferred method.

EMA CALCULATION METHOD #1

To calculate an exponential average you must first calculate the EXPONENT, which is the element in the formula that determines the period of the moving average. .This is done by dividing 2 by the number of days in the period being averaged. For example, the exponent for a 200-DMA is determined by dividing 2 by 200. The result is 0.01 (2/200=0.01).

After you have determined the exponent, you have to calculate a simple moving average for the specified period before you can begin the exponential weighting. The simple MA is only calculated once when setting up the exponential calculation.

Once you have computed the exponent and the simple MA , you are prepared to begin calculating the exponential average. The following is a key for the symbols in the formula.

PDA = Prior Day's Average (Begin with simple MA, thereafter PDA is an exponential value.)

Exp = Exponent

CDV = Current Day's Value (If you are averaging a stock price, CDV is today's price.)

EMA = Current Day's Exponential Moving Average

To calculate the exponential average, subtract PDA from CDV, multiply the remainder by Exp, and add the result to PDA (round to two places). Expressed as a formula:

((CDV-PDA)*Exp)+PDA = EMA

Using real numbers:

PDA = 52
Exp = 0.01 (200-DMA)
CDV = 49

((49-52)*0.01)+52 = 51.97000

EMA CALCULATION METHOD #2

This in the method commonly used in charting software for EMA calculations.

The following is the formula for calculating the exponent for this method:

Exp = 2/Period + 1

For example, the exponent for a 200-DMA is determined by dividing 2 by 201. The result is 0.00995 (2/(200+1) = 0.00995).

After you have determined the exponent, calculate a simple moving average for the specified period before beginning the exponential weighting. The simple MA is only calculated as a starting point in the calculation.

Once you have computed the exponent and the simple MA , you are prepared to begin calculating the exponential average. The following is a key for the symbols in the formula.

PDA = Prior Day's Average (Begin with simple MA, thereafter PDA is an exponential value.)

Exp = Exponent

CDV = Current Day's Value (If you are averaging a stock price, CDV is today's price.)

EMA = Current Day's Exponential Moving Average

The formula to calculate the exponential average with this method is:

(CDV * Exp) + (PDA * (1 - Exp)) = EMA

Using real numbers:

PDA = 52
Exp = 0.00995 (200 -DMA)
CDV = 49

(49 * 0.00995) + (52 * (1 - 0.00995)) =  51.97015

HOW ARE MOVING AVERAGES USED
The primary purpose of moving averages is to "smooth" data so that trends are more discernable. They are used to construct market indicators and to assist in interpretation of price charts.

Moving average crossovers can also be used as signals to buy and sell. This is normally done in two ways: (1) by watching for price to cross whatever moving average you may be using, or (2) running two moving averages of the same price or index, one faster than the other (for example, a 20-DMA and a 200-DMA), and buying or selling when the faster average crosses the slower.

The weakness of moving average buy and sell systems is that they will most likely become unprofitable when the stock or index begins moving sideways in a narrow trading range. Under these circumstances price never moves above or below the average far enough to become profitable.

I don't recommend pure moving average systems for timing purposes, but, in spite of their weaknesses, if you are trying to develop your own system of timing, the use of moving averages is a good place to start looking.

WHICH AVERAGING METHOD TO USE
Whether to use a simple of exponential average is a matter of preference. I prefer the exponential because of their compactness (it only requires two lines on a spreadsheet - today and yesterday), and because they are more influenced by current prices.

GET A COMPUTER - GET A LIFE

In the early 1980's I used to do all my chart posting and calculating manually with the aid of a hand-held calculator. Considering the large volume of work I did, it is a wonder I survived it. There are two basic chores in an investment program, maintenance and analysis. Using a computer to do the bone-headed calculations and chart posting has made all the difference in my life -- I actually have a life now. And it has helped me maximize the amount of time I can devote to analysis, the most important part of the job.

While certain investment strategies can be executed with a minimum of external expense or help, a computer really equips you to cover a lot of ground with a minimum of effort. I strongly advise that you get computer with a spreadsheet program to track certain indexes and indicators. With a computer the calculation of moving averages as desired or required, is no longer a big issue in your life.

 
   
       
  Back to Learning Center Menu