rvol_hodges_tompkins
Hodges-Tompkins volatility is a bias correction for estimation using an overlapping data sample.
Source Code: [link]
openbb.ta.rvol_hodges_tompkins(data: pd.DataFrame, window: int = 30, trading_periods: Optional[int] = None, is_crypto: bool = False, clean: Any = True)
Parameters
Name | Type | Description | Default | Optional |
---|---|---|---|---|
data | pd.DataFrame | Dataframe of OHLC prices. | None | False |
window | int [default: 30] | Length of window to calculate over. | 30 | True |
trading_periods | Optional[int][default: 252] | Number of trading periods in a year. | None | True |
is_crypto | bool [default: False] | If true, trading_periods is defined as 365. | False | True |
clean | bool [default: True] | Whether to clean the data or not by dropping NaN values. | True | True |
Returns
Type | Description |
---|---|
results | Dataframe with results. |
Examples
data = openbb.stocks.load('BTC-USD')
df = openbb.ta.rvol_hodges_tompkins(data, is_crypto = True)