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.
Skrypt open-source

Zgodnie z prawdziwym duchem TradingView, autor tego skryptu opublikował go jako open-source, aby traderzy mogli go zrozumieć i zweryfikować. Brawo dla autora! Możesz używać go za darmo, ale ponowne wykorzystanie tego kodu w publikacji jest regulowane przez Dobre Praktyki. Możesz go oznaczyć jako ulubione, aby użyć go na wykresie.

Wyłączenie odpowiedzialności

Informacje i publikacje przygotowane przez TradingView lub jego użytkowników, prezentowane na tej stronie, nie stanowią rekomendacji ani porad handlowych, inwestycyjnych i finansowych i nie powinny być w ten sposób traktowane ani wykorzystywane. Więcej informacji na ten temat znajdziesz w naszym Regulaminie.

Chcesz użyć tego skryptu na wykresie?