I have exchange tick data and I was wondering how to calculate intraday volatility without having to resample the data set (e.g. to 1 or 5 minutes).
I have a time series of n rows of the security's traded prices and timestamps.
Do I just do the following:
numerator = sum of all intervals (n - 1 intervals)
where each interval is defined as: R(t(n_1))^2 * dt(n_1)
R(t(n_1)) = ln(P(t(n_1))/P(t(n_0))) dt(n_1) = (t(n_1)-t(n_0))
P(t) = price at time t t(n_x) = timestamp at x row
denominator = sum(of all time intervals)
intraday variance = (numerator/denominator)*sqrt(252)
intraday volatility = sqrt(intraday variance)