arbitragelab.hedge_ratios.half_life

Module which implements Minimum Half-Life Hedge Ratio detection algorithm.

Module Contents

Functions

get_minimum_hl_hedge_ratio(→ Tuple[dict, ...)

Get hedge ratio by minimizing spread half-life of mean reversion.

get_minimum_hl_hedge_ratio(price_data: pandas.DataFrame, dependent_variable: str) Tuple[dict, pandas.DataFrame, pandas.Series, pandas.Series, object]

Get hedge ratio by minimizing spread half-life of mean reversion.

Parameters:
  • price_data – (pd.DataFrame) DataFrame with security prices.

  • dependent_variable – (str) Column name which represents the dependent variable (y).

Returns:

(Tuple) Hedge ratios, X, and y, OLS fit residuals and optimization object.