Bekker-Parkinson Volatility

Calculate the Bekker-Parkinson Volatility per asset and period: the volatility in the daily High/Low range once the bid-ask spread of Corwin and Schultz (2012) is taken out.

The daily High is almost always a trade at the ask and the daily Low one at the bid, so the range of a day holds both the volatility and the spread, and a range-based volatility such as Parkinson’s overstates the volatility of an asset with a wide spread. Corwin and Schultz write the expected squared range of one day and of two days in terms of the spread and the volatility; the spread part does not grow with the length of the window while the volatility part does. Solving the two equations for the spread gives the Corwin-Schultz spread (get_bid_ask_spread), and solving them for the volatility gives this estimate, as López de Prado (2018, section 19.3.4 and snippet 19.2) does; RiskLabAI names it the Bekker-Parkinson volatility.

The formula is as follows:

\[\beta = \left[\ln\left(\frac{H_{t}}{L_{t}}\right)\right]^{2} + \left[\ln\left(\frac{H_{t+1}}{L_{t+1}}\right)\right]^{2}\] \[\gamma = \left[\ln\left(\frac{\max(H_{t},\; H_{t+1})}{\min(L_{t},\; L_{t+1})}\right)\right]^{2}\] \[k_{2} = \sqrt{\frac{8}{\pi}}\] \[\sigma_{t} = \max\left(\frac{\sqrt{\frac{\beta}{2}} - \sqrt{\beta}}{k_{2} \cdot (3 - 2 \sqrt{2})} + \sqrt{\frac{\gamma}{k_{2}^{2} \cdot (3 - 2 \sqrt{2})}},\; 0\right)\] \[\text{Bekker-Parkinson Volatility} = \operatorname{Mean}(\sigma_{t} \;\text{within the period}) \cdot \sqrt{\text{Trading Days per Period}}\]

Where H and L are the daily High and Low of two consecutive trading days t and t+1 of the asset, with the overnight adjustment of day t+1 of the Corwin-Schultz spread. \(\sigma_{t}\) is the volatility of the log price (continuously compounded) over one day; the mean is scaled to the period as the Parkinson Volatility of get_volatility is, by the square root of the trading days per period (252 / 12 for monthly, or 365 / 12 for a ticker that trades on weekends).

Also known as: Corwin-Schultz volatility, spread-adjusted high-low volatility.

Example · SNAP, ETSY, LYFT · 2025

Install the Finance Toolkit with pip install financetoolkit -U, then call get_bekker_parkinson_volatility:

from financetoolkit import Toolkit

toolkit = Toolkit(
    ["SNAP", "ETSY", "LYFT"],
    api_key="FINANCIAL_MODELING_PREP_KEY",
    start_date="2025-01-01",
    end_date="2025-06-30",
)

toolkit.risk.get_bekker_parkinson_volatility()

Or, with the Finance Toolkit MCP set up, ask an AI assistant such as Claude or ChatGPT:

What was the Bekker-Parkinson volatility of Snap, Etsy, Lyft and the S&P 500 in each month of the first half of 2025?

Which returns:

Parameters

get_bekker_parkinson_volatility accepts the following parameters.

ParameterTypeDescriptionExample
periodstrThe period to estimate the volatility over and scale to. Options are: “weekly”, “monthly”, “quarterly”, “yearly”. Defaults to “monthly”, as for the Corwin-Schultz spread."weekly"
rollingintAverage the two-day volatilities of the last rolling periods instead of one period (e.g. period=’monthly’ and rolling=3 for a three-month estimate at every month end). At least 2. Defaults to None.4
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 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

References

  • Paper Corwin, S. A., & Schultz, P. (2012). “A Simple Way to Estimate Bid-Ask Spreads from Daily High and Low Prices.” The Journal of Finance, 67(2), 719-760.
  • Paper López de Prado, M. (2018). “Advances in Financial Machine Learning.” Wiley, section 19.3.4.
  • Paper Parkinson, M. (1980). “The Extreme Value Method for Estimating the Variance of the Rate of Return.” Journal of Business, 53(1), 61-65.
  • Library Shares similar logic as RiskLabAI’s bekker_parkinson_volatility_estimates
Share