arbitragelab.hedge_ratios.adf_optimal

Implementation of finding ADF optimal hedge ratio.

Module Contents

Functions

get_adf_optimal_hedge_ratio(→ Tuple[dict, ...)

Get hedge ratio by minimizing ADF test statistic.

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

Get hedge ratio by minimizing ADF test statistic.

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.