Professional Documents
Culture Documents
Average True Range - Step by Step Guide PDF
Average True Range - Step by Step Guide PDF
Calculation
Contents
Introduction ............................................................................................................................................ 2
Step One – Obtaining the Data ............................................................................................................... 3
Step Two – Arranging the Data ............................................................................................................... 5
Step Three – Calculating the True Range and Average True Range ....................................................... 9
Summary ............................................................................................................................................... 16
1
Introduction
The Average True Range (ATR) of an asset is a historical volatility indicator that calculates the
average of a number of previous True Range values. The True Range (TR) of an asset can be defined
as follows:
( )
( )
The ATR and TR values allow us to understand historical volatilities; and when we compare these
values across various periods we can gauge how volatility of an asset has changed with time. By
understanding ATR as a historical volatility indicator we can use is to appreciate the trading
opportunities inherit in the asset and the risk that come with it.
In this example we calculate rolling one day ATRs for the S&P500, and compare averages of these
rolling ATRs over different periods in time.
2
Step One – Obtaining the Data
Go to www.finance.yahoo.com
In the quote box, type S&P and select the S&P500 from the drop-down list (ticker
^GSPC).
This will direct you to the summary page for the S&P500.
Now navigate to the historical prices page by clicking on “historical prices” on the left-
hand side.
On the historical prices page we can input the timeframe in which we want to extract prices from, as
well as the frequency. In this example we will use daily data from the 3rd of January 1962 to the 19th
of February 2013.
3
Change the start date to “3 Jan 1962”.
Change the end date to “19 Feb 2013”.
Select “daily” as the frequency.
Click “Get Prices” to update the data table.
With the prices table updated, scroll down to the bottom of the page and click
“download to spreadsheet”.
*Clicking “open spreadsheet”, will open the data in Excel straight away. You then need to save the
excel sheet to a folder on your hard drive to permanently store it. Alternatively you can save the file
straight to a location on your hard drive, and navigate to the file yourself and open it. Be sure to save
the file after any work or edits carried out.
4
Step Two – Arranging the Data
The screenshot below shows what the excel spreadsheet should look like when opened:
If the “Date” column is filled with # symbols as in the screenshot, the column width needs to be
adjusted so we can see the values in full.
5
For Average True Range analysis, we only need data for the High, Low and Open prices of each day.
To delete the other columns of data take the following steps:
Click on column E.
Hold CTRL and click on column F and G to add these to your selection.
Right-click on the selected area and select delete.
6
If you haven’t saved the spreadsheet already, save it now:
Navigate to FileSave As
Rename the file “S&P500 ATR” as an Excel Workbook, and save it to a preferred
directory on your computer.
7
8
Step Three – Calculating the True Range and Average True Range
In this step, we will create two columns with TR and ATR data respectively. The ATR will be
calculated on a rolling one-day basis.
The next stage involves calculating the true range using the formula provided at the start of this
guide. The True Range will simply be the High minus the Low of each day.
Select cell E2 and type “=C2-D2”. An alternative way to enter the formula would be using
the mouse to click on the desired cells (C2 and D2) at the appropriate place within the
formula.
Press Enter.
9
Next, we copy down the formula we just applied to cell E2, down to E12871 (the earliest date in our
dataset), which saves having to type the formula into every single one of these cells.
Now we have calculated the TR of each of our trading days, we move on to calculating the rolling
one-day ATR at each period (day):
Select cell F1 and type “1 D”, heading a column that will contain our one-day rolling ATR.
Press Enter.
10
We now apply the ATR calculation as shown at the beginning of this guide.
We are now going to copy this formula down to the entire F column – similarly to the process we
went through for calculating the TR column.
11
With these cells still selected, right-click within the selection and go to on “Format
Cells”.
Change the number category to display itself in percentage format with 2 decimal
places. Press OK.
This changes all the ATR values we have just calculated to display themselves in terms of
percentages. Notice how cell F12871 has an error “#DIV/0!”. This is because the ATR calculation
within this cell relies on data from the previous trading day, which we do not have. Before we
proceed, delete the contents of this cell.
12
Our ATR values show an average of two day trading ranges expressed as a percentage. This allows us
to track changes in the one-day ATR on a rolling basis through the historical period analysed. To see
how the one-day ATR of the S&P500 has evolved over time, we are now going to find some averages
of these rolling one-day ATRs over various time horizons.
These cells represent the time horizons, expressed in days, over which we will analyse the average
one-day rolling ATRs.
13
In cell H2 type “Years”. Press Enter.
In cell L2 type “1”. Press Enter.
In cell M2 type “3”. Press Enter.
In cell N2 type “5”. Press Enter.
In cell O2 type “10”. Press Enter.
In cell P2 type “20”. Press Enter.
In cell Q2 type “50”. Press Enter.
To find the average ATR over these periods take the following steps:
To finish the spreadsheet off, we can tidy up this table by adding some colour and borders:
Select cells H2:Q2 and change the cell background colour to a light green by displaying
the Home tab and navigating to Theme colours.
14
Select cells H3:Q3 and change the colour of the cells to a light grey.
Finally, add borders to this table by selecting cells H2:Q5 and navigating to
HomeBordersAll Borders.
15
A note on updating your spreadsheet:
If you want to keep on top of your rolling ATRs, the easiest way to do so would be to rearrange the
data to show the earliest date at the top of the sheet, down to the latest date at the bottom. You
can do this by applying a filter to the date column (a similar method is shown in the Returns
Distribution Example), and sorting the columns from oldest to newest. Then you can manually add in
the data at the bottom of the spreadsheet and update the relevant cell formulas (in cells F12872 and
I4:Q4).
Summary
In this guide we calculated the one-day rolling Average True Range of the S&P500 over the last 50
years. This gives us an idea of the changes in volatility of the asset. We then calculated the average
one-day ATRs over different time horizons. We can see that over the last 50 years there has been a
general tendency towards less and less daily volatility. This reiterates the fact that day trading
opportunities are typically minimal, and we must wait for periods of higher volatility to take
advantage of day trading. Most of the time, we require longer periods of time to see enough price
movement to make our trades worthwhile. Volatility indicators like ATR help us identify when we
adopt a portfolio management style of investing and when we switch to shorter term investing
horizons, such as day trading strategies.
16