jclaffee 81 posts msg #36736 - Ignore jclaffee |
7/6/2005 12:01:39 PM
G L Gene --
If you want an "N" period EMA,
Take an N-1 period average of the values of the variable and use that for the
first "yesterday's EMA" below. Then
Today's EMA = K x (today's value of variable) + (yesterday's EMA) x (1-K)
where K = 2/(N+1).
For example, the "K" for a 13 period EMA is 2/14 and, for a 100 period EMA,
K is 2/101.
Jim
|
houghton 29 posts msg #36740 - Ignore houghton |
7/6/2005 12:34:03 PM
glgene,
As a follow up to jlclaffee, using your data:
The calculation for determining the percentage to use in the EMA is: 2/(# of periods +1), or in your case 2/6=0.33. The EMA for today is calculated by multiplying today’s price by 0.33 and adding that to yesterday’s price multiplied by 1-0.33.
Since you need to use both today’s and yesterday’s closing prices to calculate EMA, there is co calculation for Day 1 and the EMA for that day is the closing price ($8.00). The EMA for Day 2 is (8.50*0.33) + (8.00*.67) or 8.165. The EMA for Day 3 is (8.25*0.33) +(8.50*0.67) or 8.418. I’ll let you continue the calculation :)
|