The first step in calculating ATR is to find a series of true range values for a security. The price range of an asset for a given trading day is its high minus its low. To find an asset’s true range value, you first determine the three terms from the formula.
Suppose that XYZ’s stock had a trading high today of $21.95 and a low of $20.22. It closed yesterday at $21.51. Using the three terms, we use the highest result:
( \text{H} – \text{L}) = \$21.95 – \$20.22 = \$1.73(H−L)=$21.95−$20.22=$1.73
| ( \text{H} – \text{C}_p ) | = | \$21.95 – \$21.51 | = \$0.44∣(H−Cp)∣=∣$21.95−$21.51∣=$0.44
| ( \text{L} – \text{C}_p ) | = | \$20.22 – \$21.51 | = \$1.29∣(L−Cp)∣=∣$20.22−$21.51∣=$1.29
The number you’d use would be $1.73 because it is the highest value.
Because you don’t have a previous ATR, you need to use the ATR formula:
\begin{aligned}\Big ( \frac{ 1 }{ n } \Big ) \sum_{i}^{n} \text{TR}_i\end{aligned}(n1)i∑nTRi
Using 14 days as the number of periods, you’d calculate the TR for each of the 14 days. Assume the following prices from the table.
Daily Values | |||
---|---|---|---|
High | Low | Yesterday’s Close | |
Day 1 | $ 21.95 | $ 20.22 | $ 21.51 |
Day 2 | $ 22.25 | $ 21.10 | $ 21.61 |
Day 3 | $ 21.50 | $ 20.34 | $ 20.83 |
Day 4 | $ 23.25 | $ 22.13 | $ 22.65 |
Day 5 | $ 23.03 | $ 21.87 | $ 22.41 |
Day 6 | $ 23.34 | $ 22.18 | $ 22.67 |
Day 7 | $ 23.66 | $ 22.57 | $ 23.05 |
Day 8 | $ 23.97 | $ 22.80 | $ 23.31 |
Day 9 | $ 24.29 | $ 23.15 | $ 23.68 |
Day 10 | $ 24.60 | $ 23.45 | $ 23.97 |
Day 11 | $ 24.92 | $ 23.76 | $ 24.31 |
Day 12 | $ 25.23 | $ 24.09 | $ 24.60 |
Day 13 | $ 25.55 | $ 24.39 | $ 24.89 |
Day 14 | $ 25.86 | $ 24.69 | $ 25.20 |
You’d use these prices to calculate the TR for each day.
Trading Range | |||
---|---|---|---|
H-L | H-Cp | L-Cp | |
Day 1 | $ 1.73 | $ 0.44 | $ (1.29) |
Day 2 | $ 1.15 | $ 0.64 | $ (0.51) |
Day 3 | $ 1.16 | $ 0.67 | $ (0.49) |
Day 4 | $ 1.12 | $ 0.60 | $ (0.52) |
Day 5 | $ 1.15 | $ 0.61 | $ (0.54) |
Day 6 | $ 1.16 | $ 0.67 | $ (0.49) |
Day 7 | $ 1.09 | $ 0.61 | $ (0.48) |
Day 8 | $ 1.17 | $ 0.66 | $ (0.51) |
Day 9 | $ 1.14 | $ 0.61 | $ (0.53) |
Day 10 | $ 1.15 | $ 0.63 | $ (0.52) |
Day 11 | $ 1.16 | $ 0.61 | $ (0.55) |
Day 12 | $ 1.14 | $ 0.63 | $ (0.51) |
Day 13 | $ 1.16 | $ 0.66 | $ (0.50) |
Day 14 | $ 1.17 | $ 0.66 | $ (0.51) |
You find that the highest values for each day are from the (H – L) column, so you’d add up all of the results from the (H – L) column and multiply the result by 1/n, per the formula.
\begin{aligned}\$1.73 &+ \$1.15 + \$1.16 + \$1.12 + \$1.15 + \$1.16 + \$1.09 \\&+ \$1.17 + \$1.14 + \$1.15 + \$1.16 + \$1.14 + \$1.16 \\&+ \$1.17 = \$16.65 \\\end{aligned}$1.73+$1.15+$1.16+$1.12+$1.15+$1.16+$1.09+$1.17+$1.14+$1.15+$1.16+$1.14+$1.16+$1.17=$16.65
\begin{aligned}\frac{ 1 }{ n } (\$16.65) = \frac{ 1 }{ 14 } (\$16.65)\end{aligned}n1($16.65)=141($16.65)
\begin{aligned}0.714 \times \$16.65 = \$1.18\end{aligned}0.714×$16.65=$1.18
So, the average volatility for this asset is $1.18.
Now that you have the ATR for the previous period, you can use it to determine the ATR for the current period using the following:
\begin{aligned}\frac{ \text{Previous ATR} ( n – 1 ) + \text{TR} }{ n }\end{aligned}nPrevious ATR(n−1)+TR
This formula is much simpler because you only need to calculate the TR for one day. Assuming on Day 15, the asset has a high of $25.55, a low of $24.37, and closed the previous day at $24.87; its TR works out to $1.18:
\begin{aligned}\frac{ \$1.18 ( 14 – 1 ) + \$1.18 }{ 14 }\end{aligned}14$1.18(14−1)+$1.18
\begin{aligned}\frac{ \$1.18 ( 13 ) + \$1.18 }{ 14 }\end{aligned}14$1.18(13)+$1.18
\begin{aligned}\frac{ \$15.34 + \$1.18 }{ 14 }\end{aligned}14$15.34+$1.18
\begin{aligned}\frac{ \$16.52 }{ 14 } = \$1.18\end{aligned}14$16.52=$1.18
The stock closed the day again with an average volatility (ATR) of $1.18.