Parkinson Volatility uses the daily trading range (High vs Low) rather than the close-to-close return, assuming prices follow a continuous geometric Brownian motion with no drift and no overnight jumps.

The formula is as follows:

\[\text{Parkinson Variance} = \operatorname{Mean}(\ln(H / L) ^{2}) / (4 \cdot \text{ln}\; 2)\]

Source: Parkinson, M. (1980). “The Extreme Value Method for Estimating the Variance of the Rate of Return.” Journal of Business, 53(1), 61-65.

In the Finance Toolkit this is get_volatility with method="parkinson"; the Volatility page has the function’s full description.

Parkinson Volatility in Python

Install the Finance Toolkit with:

pip install financetoolkit -U

Then call get_volatility as shown below.

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["EURUSD", "BTCUSD", "^GSPC", "GCUSD"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2021-01-01",
    end_date="2025-12-31",
)

toolkit.risk.get_volatility(method="parkinson", period="yearly")

Which returns:

Date EURUSD BTCUSD ^GSPC GCUSD Benchmark
2021 0.0544 0.7735 0.1062 0.1467 0.1073
2022 0.1013 0.5457 0.1876 0.1557 0.1916
2023 0.0736 0.3792 0.1084 0.1332 0.1101
2024 0.0597 0.464 0.0973 0.1479 0.0989
2025 0.0744 0.3779 0.1491 0.1911 0.152

Parameters

get_volatility accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe data frequency for returns (weekly, monthly, quarterly, or yearly). Defaults to “quarterly” if the Toolkit is initialised with quarterly=True, otherwise “yearly”."quarterly"
rollingintThe rolling window size to use for the calculation. If set, Volatility is calculated over a rolling window of this many periods (e.g. period=’monthly’ and rolling=6 gives the rolling 6-month Volatility) instead of one value per period. Only available for method=”close_to_close”. Defaults to None.4
methodstrWhich Volatility estimator to use, one of “close_to_close”, “parkinson”, “garman_klass”, “rogers_satchell” or “yang_zhang”, as described above. Defaults to “close_to_close”."yang_zhang"
roundingint | NoneThe number of decimals to round the results to. Defaults to None, which uses the rounding of the Toolkit (4 unless set otherwise).2
growthboolWhether to calculate the growth of the Volatility values over time. Defaults to False.True
lagint | list[int]The lag to use for the growth calculation. Defaults to 1.4
standardizeboolWhether to standardize (Z-Score) the result. When combined with growth=True, standardizes the growth values instead of the raw values. Defaults to False.True
show_columnsstr | list[str] | NoneThe columns to keep, a name or a list of names, matched on every column level, or the rows when no column has those names (such as the line items of a financial statement). Names that do not exist are logged, and when none exist the result is returned in full. Defaults to None, which keeps every column.None, which keeps every column
Share