Calculate Rolling Volatility for Large Datasets

Asked at Fidelity · Coding Questions · Difficulty: Medium

Given a sequence of price data, use Python to calculate **rolling volatility**. Consider the size of the rolling window and optimize your algorithm for large datasets. Provide test cases and reason about data scale.

Loading the problem…