The relationship between ATR and standard deviation
Let's begin this post with a gross generalisation:
Professional buyers tend to degree risk and target chance the use of trendy deviation. Amateur traders generally tend to apply a funky little variety called the ATR: 'Average True Range'.
Both try to acquire the same aim: summarise the everyday motion inside the rate of some thing the usage of a single quantity. However they're calculated differently. Can we reconcile the 2 measures? This is an essential element to do - it'll help us understand the professionals and cons of each estimator, and assist human beings the usage of exclusive measures to talk with each other. It will also help ameliorate the picture of ATR as a poor mans volatility degree, and the same old deviation as some kind of quant witchcraft unsuited to buying and selling inside the actual world.
A short primer on the standard deviation (SD)
Measuring standard deviation is surprisingly easy. We start out with some returns at some time frequency. Most generally those are each day returns, taken off last fees. We then plug them into the standard preferred deviation formula: 1/N.Sum[x - x*]^2
A extra professional approach is to use an exponentially weighted moving average; this gives a smoother transition among volatility shifts which could be very beneficial if you're scaling your position in step with vol (and also you need to!).
Some interesting points can be made here.
How many factors need to one use? All of records, or just remaining week? Broadly speakme using the last few weeks of trendy deviation offers the first-class forecast for future wellknown deviation.
We do not get ultimate fees over weekends. To degree a calendar day volatility rather than a commercial enterprise day volatility I'd want to multiply the fee by way of sqrt(365.25)/sqrt(X) where X is the quantity of enterprise days. There is a general assumption in doing any time scaling of volatility, that is that returns are independent. A greater subtle assumption that we're making is that the market charge is ready as volatile over the weekend as at some point of the week. If as an example we assumed that nothing happened on the weekend then no adjustment could be required.
We ought to use less common prices, weekly or month-to-month, or even annual. However it is no longer obvious why you would need to do that - it will come up with less facts.
We could, in theory, use more frequent prices; for example hourly, minute or even second by second prices. Note that at some point the volatility of the price would be dominated by 'bid-ask bounce' (even if the mid price doesn't shift, a series of buys and offers in the market will create apparent movement) and you'd have an overestimate of volatility. When you reach that point depends on the liquidity of the market, and the ratio of the volatility to the tick size.
If we use more frequent prices then we'd need to scale them up, eg to go from hourly volatility to calendar day volatility we'd do something like multiply by sqrt(Y). But what should Y be? If there are 8 hours of market open time then should we multiply by 8? That assumes that there is no volatility overnight, something we know isn't true. Should we multiply by 24? That assumes that we are as likely to see market moving action at 3am as we are when the non farm payroll comes out in the afternoon (UK market time).
[Note: Even in a market that trades 24 hours a day like the OTC spot FX market there is still an issue... Although we have hourly prices it's still unclear whether we should treat them all as contributing equally to volatility.]
This is analogous to our hassle with rescaling business day vol - whilst the market is closed the vol is unobservable; we do not know what the vol is like when the market is closed as opposed to whilst it's far open. This is a key perception to be able to be essential later.
A short primer on the Average True Range (ATR)
According tohttps://en.wikipedia.org/wiki/Average_true_range the true range over some time period is defined as:
max[(high-low), abs(high - close_prev), abs(low-close_prev)]
Then we take aa transferring common of the true tiers, over a few wide variety of information points n (the averaging is correctly an exponential weighting, with a fixed weight at the maximum current value of one/n). As with volatility the same old exercise involves using each day records, but I guess you can be dumb and use much less frequent data, or attempt to use more common records.
Using extra statistics is probably higher, despite the fact that one apparent disadvantage is that the excessive and the low could be spurious noise or one off spikes. I think one ought to argue that last expenses are issue to being driven round as nicely.
Comparing SD and ATR
So the important thing differences here are:
- standard deviations are normalised versus the average return; the ATR is not
- There is a square, average, then square root in the calculation of standard deviations; this will upweight larger returns versus smaller returns. The ATR calculation is just an average of absolute changes
- the standard deviation is calculated using just a daily return close - close_prev, so doesn't use any intraday data unlike the ATR. Also the true range will always be equal to or greater than the daily change.
The first point is not too important due to the fact over each day statistics the average return is going to be incredibly small compared to the volatility of the charge. However it does imply that during a trending marketplace the ATR may be biased upwards compared to SD. The second factor is quite exciting, and it way for example that just after a big market move the ATR might be understated compared to the SD. The 1/3 point is the most interesting of all and I'll spend maximum of the publish discussing it.
Mapping of SD and ATR: the easy bit
Let's start with the clean bit; those factors:
- There is a square, average, then square root in the calculation of standard deviations; this will upweight larger returns versus smaller returns. The ATR calculation is just an average.
- standard deviations are normalised versus the average return; the ATR is not
As I've already mentioned we can quite tons ignore the second one point; without a doubt if we count on expenses have no float then on common it'll cancel to 0. The impact of the first point will rely upon the underlying distribution of returns. Let's assume for the moment they're Gaussian, then using a easy simulation you may do in a spreadsheet the empirical impact comes out at a ratio of about 1.255.
In different words focusing in basic terms at the distinction among rectangular,average,rectangular root and the suggest absolute go back, to move from ATR to SD you'll multiply by way of 1.255. In actual existence there are probable to be greater jumps, which indicates this range would be a little bigger.
I go away the analytical calculation of this determine as an workout for the reader. I want it was a miles cooler quantity, but it isn't always.
Mapping of SD and ATR: the difficult bit
That 'simply' leaves us with this difference:
- the standard deviation is calculated using just a daily return close - close_prev, so doesn't use any intraday data unlike the ATR. Also the true range will always be equal to or greater than the daily change.
So to go from SD to ATR we'd need to multiply the SD by Y, where Y>=1. But here we can't just do some trivial adjustment. Let me explain why. Consider the following price action:

The blue line indicates while the marketplace was closed; the red line indicates while it became open. The x-axis is the hour count, so the market is open between 8am and 5pm day by day. The go back for popular deviation functions is the difference between the ultimate fee on the second one day (taken at 5pm) and the first day (also at 5pm):
close - close_prev = 109.48 - 103.89 = 5.59
But the authentic range for the second day proven could be:
max[(high-low), abs(high - close_prev), abs(low-close_prev)]
= max[(109.48 - 107.09), abs(109.48-103.89), abs(107.09-103.89)] = 5.59
In this case the two phrases are equivalent. However this might not constantly be the case; and it's smooth to construct examples where the differences aren't the identical. To come up with a rule of thumb like I did earlier than I might want to generate loads of these experiments.
[I could also do this experiment in reverse by taking the closing prices and using something like a Brownian bridge to interpolate the missing values]
However in producing the plot above I've made a key assumption which is that the volatility is the same during the 24 hours - and as already alluded to we cannot easily make that assumption. It's much more likely that the vol is decrease. Here for example is some other plot, however this time I've assumed that after the marketplace is closed the vol is 1/5 of the everyday fee while the marketplace isn't buying and selling.

This is all thoroughly, but what have to the ratio of open:near volatility be? By definition it is unobservable. We may want to attempt to infer it from monitoring option fees that are near expiry, but that might well be a biased degree (humans are probably to call for higher implied vol when the market is closed, when you consider that the choice isn't hedgeable).
[This problem would also apply if we tried to use the brownian bridge approach]
Mapping of SD and ATR: an empirical approach
We've got as far as we can running experiments; the only thing left to do is look at some real data. Here is some pysystemtrade code. This will acquire contract level data (with HLOC prices) from quandl, and set up some futures data in mongodb, as described here. It will then measure the ATR and standard deviation, and compare the two.
I ran this over an entire bunch of futures contracts, and the magic variety I got turned into 0.875. Basically when you have an ATR and you need to convert it to a each day general deviation, then you definately multiply the ATR by 0.875. If you opt for your fashionable deviations annualised then multiply the ATR via 14.
It's worth considering how this variety pertains to our previous findings:
"focusing in basic terms on the difference between square,common,square root and the suggest absolute go back, to head from ATR to SD you'll multiply by 1.255. In real life there are in all likelihood to be extra jumps, which shows this number might be a touch larger."
"[to account for the difference between range and true range] So to go from SD to ATR we'd need to multiply the SD by Y, where Y>=1."
In other phrases:
SD = ATR*zero.875 [empirical]
ATR = SD*Y and SD = ATR*1.255 -> SD = ATR*1.255/Y [theory]
This suggests Y is round 1.Forty three. I notice in passing that is rattling near the square root of 2. Does this mean anything? I do not know however it is an awful lot cooler than the fairly arbitrary 1.255.
Summary
There isn't any first-rate measure of volatility. SD and ATR are simply one of a kind, each with their personal strengths and weaknesses. If you appear to have an ATR measure however need to apply fashionable deviation as a threat measure then you could multiply it via zero.875. The opposite is also viable.
Incidentally I'll be the usage of this result in my new ebook; to be posted subsequent yr.