arbitragelab.stochastic_control_approach.optimal_convergence

This module is a realization of the methodology in the following paper: Liu, J. and Timmermann, A., 2013. Optimal convergence trade strategies. The Review of Financial Studies, 26(4), pp.1048-1086.

Module Contents

Classes

OptimalConvergence

This module models the optimal convergence trades under both recurring and nonrecurring arbitrage opportunities

class OptimalConvergence

This module models the optimal convergence trades under both recurring and nonrecurring arbitrage opportunities represented by continuing and “stopped” co-integrated price processes.

Along with delta neutral portfolios, this module also considers unconstrained optimal portfolios where the portfolio weights of both the stocks in the spread are calculated dynamically. Conventional long-short delta neutral strategies are generally suboptimal and it can be optimal to simultaneously go long (or short) in two mis-priced assets. Standard arbitrage strategies and/or delta neutral convergence trades are designed to explore long-term arbitrage opportunities but do typically not optimally exploit the short-run risk return trade-off. By placing arbitrage opportunities in the context of a portfolio maximization problem, this optimal convergence strategy accounts for both arbitrage opportunities and diversification benefits.

fit(prices: pandas.DataFrame, mu_m: float, sigma_m: float, r: float, delta_t: float = 1 / 252)

This method estimates the error-correction terms (lambda) using the inputted pricing data.

Parameters:
  • prices – (pd.DataFrame) Contains price series of both stocks in spread.

  • mu_m – (float) Market Risk Premium.

  • sigma_m – (float) Market Volatility.

  • r – (float) Interest Rate.

  • delta_t – (float) Time difference between each index of data, calculated in years.

describe() pandas.Series

Method returns values of instance attributes calculated from training data.

Returns:

(pd.Series) Series describing parameter values.

unconstrained_portfolio_weights_continuous(prices: pandas.DataFrame, gamma: float = 4) tuple

Implementation of Proposition 1.

This method calculates the portfolio weights for the market asset and for both the stocks in the spread when there are no constraints put on values of lambda. We also assume a continuing cointegrated price process (recurring arbitrage opportunities), which gives closed-form solutions for the optimal portfolio weights.

If lambda_1 = lambda_2, from the portfolio weights outputted from this method phi_2 + phi_1 = 0, which implies delta neutrality. This follows Proposition 3 in the paper.

Parameters:
  • prices – (pd.DataFrame) Contains price series of both stocks in spread.

  • gamma – (float) Signifies investor’s attitude towards risk (positive float value).

Returns:

(tuple) Consists of three numpy arrays: weights for asset 1, asset 2, and market portfolio.

delta_neutral_portfolio_weights_continuous(prices: pandas.DataFrame, gamma: float = 4) tuple

Implementation of Proposition 2.

This method calculates the portfolio weights for the market asset and for both the stocks in the spread when the portfolio is constrained to be delta-neutral, where sum of portfolio weights of both the assets in the spread is zero. We also assume a continuing cointegrated price process (recurring arbitrage opportunities), which gives closed-form solutions for the optimal portfolio weights.

Parameters:
  • prices – (pd.DataFrame) Contains price series of both stocks in spread.

  • gamma – (float) Signifies investor’s attitude towards risk (positive float value).

Returns:

(tuple) Consists of three numpy arrays: weights for asset 1, asset 2, and market portfolio.

wealth_gain_continuous(gamma: float = 4, sigma: float = 0.15, b: float = 0.3, mu_m: float = 0.05, sigma_m: float = 0.35, r: float = 0.02, lambda_1: float = 0.52, lambda_2: float = -0.35) numpy.array

Implementation of Proposition 4.

This method calculates the expected wealth gain of the unconstrained optimal strategy relative to the delta neutral strategy assuming a mis-pricing of the spread.

We take fixed values of spread between [0, 0.2]. The time to maturity is assumed to be 1 year for each value of spread.

The default values of the input parameters are taken according to the paper.

Parameters:
  • gamma – (float) Signifies investor’s attitude towards risk (positive float value).

  • b – (float) Model Parameter found in Equation (2-3) in the paper.

  • mu_m – (float) Market Risk Premium.

  • sigma_m – (float) Market Volatility.

  • r – (float) Interest Rate.

  • lambda_1 – (float) Parameter signifies relative liquidity of asset 1.

  • lambda_2 – (float) Parameter signifies relative liquidity of asset 2.

  • sigma – (float) Model Parameter found in Equation (2-3) in the paper.

Returns:

(np.array) Wealth gain numpy array.

static plot_wealth_process(prices: pandas.DataFrame, phi_1: numpy.array, phi_2: numpy.array, r: float, delta_t: float = 1 / 252)

Function for plotting the wealth process.

Parameters:
  • prices – (pd.DataFrame) Contains price series of both stocks in spread.

  • phi_1 – (np.array) Weights for asset 1.

  • phi_2 – (np.array) Weights for asset 2.

  • r – (float) Interest Rate.

  • delta_t – (float) Time difference between each index of data, calculated in years.