# Historical volatility from non-uniform samples

The way I compute historical volatility is that I take two parameters $dt$ and $T$, get a list of stock prices with the step of $dt$ over the window $T$ (so $T/dt+1$ samples in total), compute $T/dt$ returns from this prices, compute their sample standard deviation, and scale using $\sqrt{dt}$ to annualize it.

In case I have non-uniformly sampled data, i.e. $dt_1\neq dt_2 \neq \dots$ I wondered whether I can compute annualized historical volatility without resampling?

Step 1. Calculate $V=\sum_i \frac{\Delta P_i^2}{dt_i}$
Step 2. Annualize V. $V_a=\frac{V}{T}$
Step 3. Find $\sigma = \sqrt{V_a}$