arbitragelab.hedge_ratios.johansen

Johansen hedge ratio calculation.

Module Contents

Functions

get_johansen_hedge_ratio(→ Tuple[dict, ...)

Get hedge ratio from Johansen test eigenvector.

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

Get hedge ratio from Johansen test eigenvector.

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 and OLS fit residuals.