ROGERS–SATCHELL VOLATILITY
Intuição
O estimador Rogers–Satchell é um estimador range-based que permanece útil em presença de drift (tendências), sendo frequentemente usado como componente em estimadores mais completos (ex: Yang–Zhang).
Definição
Seja:
HO_t = ln(high_t/open_t)HC_t = ln(high_t/close_t)LO_t = ln(low_t/open_t)LC_t = ln(low_t/close_t)
A variância RS diária é:
RS_t = HC_t * HO_t + LC_t * LO_t
A série é agregada via média rolling em janela n, e a volatilidade é sqrt(max(RS, 0)).
Uso
from quantmaster.features.volatility import rogers_satchell_volatility
df["rs"] = rogers_satchell_volatility(df, window=20)
API
Source code in src/quantmaster/features/volatility.py
224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | |