SNR | R Documentation |
The n-day SNR for a given market is calculated by taking the absolute price change over an n-day period and dividing it by the average n-day volatility.
SNR(HLC, n, ...)
HLC |
Object that is coercible to xts or matrix and contains High-Low-Close prices. |
n |
Number of periods for moving average. |
... |
Other arguments to be passed to |
SNR_n = \frac{|C_t - C_{t-n}|}{ATR_n}
Using average true range as the volatility measure captures more of the intraday and overnight volatility in a way that a measurement of Close-to-Close price change does not.
The interpretation is then relatively intuitive: an SNR value of five indicates that the market has moved five times the volatility (average true range) over the given look-back period.
A object of the same class as HLC or a matrix (if try.xts fails) containing the signal to noise ratio.
Peter Carl
Skeggs, James and Hill, Alex (2015). Back in Black Part 2: The Opportunity Set for Trend Following.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.