Firedrops

Parkinson's Volatility Estimator

The Parkinson's Volatility Estimator (PVE) provides an alternative method for assessing market volatility using the highest and lowest prices within a given period. Unlike traditional models that predominantly rely on closing prices, the PVE considers the full range of intra-candle price movements, thereby potentially offering a more comprehensive gauge of market volatility. The estimator is derived from the logarithm of the ratio of the high to low prices, squared and then averaged over the period of interest. This calculation is rooted in the assumption that the logarithmic high-to-low ratio represents a normalized measure of price movements, capturing both upward and downward volatility in a symmetric manner (Parkinson, 1980).

In this specific implementation, the estimator is calculated as follows:

Parkinson’s Volatility = (1/4 log(2)) * (1/n) * Σ from i=1 to n of (log(High_i/Low_i))^2

where n is the lookback period defined by the user, and High_i and Low_i are the highest and lowest prices at each interval i within that period. This formulation takes advantage of the logarithmic properties to scale the volatility measure appropriately, utilizing a factor of 1/4 log(2) to normalize the variance estimate (Parkinson, 1980).

This implementation includes options for output normalization between 0 and 1 and for plotting horizontal lines at specified levels, allowing the estimator to function like an oscillator to evaluate volatility relative to recent market regimes. Users can customize these features through script inputs, enhancing flexibility for various trading scenarios and improving its utility for real-time volatility assessments on the TradingView platform.

Reference:

Parkinson, M. (1980). The extreme value method for estimating the variance of the rate of return. The Journal of Business, 53(1), 61-65.
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?