Which is the correct formula (or approximation) for Daily, 30 Day Historical Volatility (HV)?: ivolatility uses the second formula: https://www.ivolatility.com/help/2.html#hv I found the first set of code on PRC. annualVol = 252 HVPeriod = 30 periods = 7// 1 = intraday chart 7 = daily chart Returns = log(close / close[1]) StdDev = std[HVPeriod](Returns) HVol = (StdDev * sqrt(annualVol / periods)) * 100 or: annualVol = 252 HVPeriod = 30 //periods = 7// 1 = intraday chart 7 = daily chart Returns = log(close / close[1]) StdDev = std[HVPeriod](Returns) HVol = StdDev * sqrt(annualVol) * 100 Also shouldn’t it be: Returns = log(close [HVPeriod] / close[HVPeriod-1]) because it’s the sample std deviation we’re calculating? Thanks, it’d be good to clear this up as I see it has been discussed in these forums.