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.
Açık kaynak kodlu komut dosyası

Gerçek TradingView ruhuyla, bu betiğin yazarı, yatırımcının anlayabilmesi ve doğrulayabilmesi için onu açık kaynak olarak yayınladı. Yazarın eline sağlık! Bunu ücretsiz olarak kullanabilirsiniz, ancak bu kodun bir yayında yeniden kullanımı Kullanım Koşulları ile yönetilir. Bir grafikte kullanmak için favorilere ekleyebilirsiniz.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.

Bu komut dosyasını bir grafikte kullanmak ister misiniz?