Skip to main content

Overview

Statistical arbitrage models in Systematica are designed to identify and exploit temporary price divergences between related financial instruments. The framework provides several model categories, each implementing different statistical approaches to identify trading opportunities.

Copula-Based Arbitrage Models

Copula-based models use dependency structures between asset pairs to identify arbitrage opportunities. The ArbitrageClipIndex model implements various copula methods to model joint distributions and generate trading signals.

ArbitrageClipIndex

Arbitrage clip index: Marginal probability model. This model computes the accumulated sum of log returns and applies a clipping transformation to the accumulated index. It is useful for analyzing the performance of two assets over time, particularly in the context of arbitrage opportunities. The clipping transformation ensures that the accumulated index remains within specified bounds, preventing extreme values that could skew the analysis. Method generated by attrs for class ArbitrageClipIndex.

Ancestors

  • systematica.models.base.BaseStatArb
  • abc.ABC
  • systematica.api.models.arbitrage_index.ArbitrageIndexMixin

Static methods

is_valid

Validate model parameters. Parameters: Raises:

transform_func

Apply clipping transformation to model output. Parameters: Returns:

Instance variables

  • transform_params: Dict[str, Any]: Returns the transformation parameters.
  • alpha: float: Lower quantile is found with lower_quantile = np.quantile(pdfs, 1.0 - alpha), then removed from matrix. Used when cross_tail_method='quantile'. Defaults to 0.9.
  • bound_reversion: bool: if bound_reversion is set to True, it compute the cumulative sum of negative (positive) values toward the center, ignoring mask, uppon reaching the upper or lower bound respectively. This technique increases the speed of reversion toward neutrality. Defaults to False.
  • center: float: The center value to subtract from each prediction. Default is 0.5.
  • copula: str | type: The copula model to use. Default is auto, which selects the best copula model based on method criterion.
  • cross_tail_method: str: Mask method used to filter cross-tail concentration in the marginals. Specifies the type of mask applied to the marginal distributions. Available options are quantile (applies a quantile-based tail mask) and triangle (applies a triangular mask). If None, the mask is ignored. Defaults to None.
  • custom_splitter: str | None: Custom splitter to use for data partitioning. Default is None.
  • custom_splitter_kwargs: Dict[str, Any]: Additional keyword arguments for the custom splitter. Default is None.
  • list_copulas: list[systematica.models.arbitrage_index.base.BaseCopula] | None: A list of copulas to consider. If None, the model defaults to Archimedeans. Default is None.
  • lower: float: The lower bound for resetting the accumulated sum. Default is -1.0.
  • lower_triangle: float: Lower triangle coordinate point. Used when cross_tail_method='triangle'. Defaults to 0.5.
  • marginal_dependence: bool: If True, it calculates correlation coefficient on marginals. Otherwise, on rets features. Defaults to False.
  • model_validation_method: str: The method used for model selection. Default is aic. Choices are aic, bic and aicc.
  • rotation: str | systematica.models.arbitrage_index.utils.BaseCopulaRotation: Rotations allow the copula to be adapted for different types of tail dependence. - A 180 rotation captures extreme co-movements in the lower tail (i.e. simultaneous extreme losses). - A 90 rotation captures scenarios where one variable exhibits extreme losses while the other shows extreme gains. - A 270 rotation captures the opposite scenario, where one variable experiences extreme gains while the other suffers extreme losses. See BaseCopulaRotation. If set to auto, applies best fitted rotation. Defaults to BaseCopulaRotation.R0.
  • sequential: bool: Transformation is applied at every split if True. Otherwise, perform the transformation after computation. It Defaults to False.
  • splitter: str: The type of data splitter. Choices are from_rolling, from_custom_rolling, from_expanding, from_custom_expanding. Defaults to “from_custom_rolling”.
  • testing_window: int: The size of the testing window. Default is 60.
  • training_window: int: The size of the training window. Default is 365.
  • truncate: float: Truncate cross tail filter at specific point. Used when cross_tail_method='quantile'. Ignored if None. Defaults to 0.5.
  • upper: float: The upper bound for resetting the accumulated sum. Default is 1.0.
  • upper_triangle: float: Upper triangle coordinate point. Used when cross_tail_method='triangle'. Defaults to 0.5.

ArbitrageCumulativeIndex

Arbitrage cumulative index: Marginal probability model. This model computes the cumulative sum of log returns and applies a transformation to the cumulative index. It is useful for analyzing the cumulative performance of two assets over time, particularly in the context of arbitrage opportunities. Method generated by attrs for class ArbitrageCumulativeIndex.

Ancestors

  • systematica.models.base.BaseStatArb
  • abc.ABC
  • systematica.api.models.arbitrage_index.ArbitrageIndexMixin

Static methods

transform_func

Apply cumulative index transformation to model output. Parameters: Returns:

Instance variables

  • transform_params: Dict[str, Any]: Returns the transformation parameters.
  • alpha: float: Lower quantile is found with lower_quantile = np.quantile(pdfs, 1.0 - alpha), then removed from matrix. Used when cross_tail_method='quantile'. Defaults to 0.9.
  • center: float: The center value to subtract from each prediction. Default is 0.5.
  • copula: str | type: The copula model to use. Default is auto, which selects the best copula model based on method criterion.
  • cross_tail_method: str: Mask method used to filter cross-tail concentration in the marginals. Specifies the type of mask applied to the marginal distributions. Available options are quantile (applies a quantile-based tail mask) and triangle (applies a triangular mask). If None, the mask is ignored. Defaults to None.
  • custom_splitter: str | None: Custom splitter to use for data partitioning. Default is None.
  • custom_splitter_kwargs: Dict[str, Any]: Additional keyword arguments for the custom splitter. Default is None.
  • list_copulas: list[systematica.models.arbitrage_index.base.BaseCopula] | None: A list of copulas to consider. If None, the model defaults to Archimedeans. Default is None.
  • lower_triangle: float: Lower triangle coordinate point. Used when cross_tail_method='triangle'. Defaults to 0.5.
  • marginal_dependence: bool: If True, it calculates correlation coefficient on marginals. Otherwise, on rets features. Defaults to False.
  • model_validation_method: str: The method used for model selection. Default is aic. Choices are aic, bic and aicc.
  • rotation: str | systematica.models.arbitrage_index.utils.BaseCopulaRotation: Rotations allow the copula to be adapted for different types of tail dependence. - A 180 rotation captures extreme co-movements in the lower tail (i.e. simultaneous extreme losses). - A 90 rotation captures scenarios where one variable exhibits extreme losses while the other shows extreme gains. - A 270 rotation captures the opposite scenario, where one variable experiences extreme gains while the other suffers extreme losses. See BaseCopulaRotation. If set to auto, applies best fitted rotation. Defaults to BaseCopulaRotation.R0.
  • sequential: bool: Transformation is applied at every split if True. Otherwise, perform the transformation after computation. It Defaults to False.
  • splitter: str: The type of data splitter. Choices are from_rolling, from_custom_rolling, from_expanding, from_custom_expanding. Defaults to from_custom_rolling.
  • testing_window: int: The size of the testing window. Default is 60.
  • training_window: int: The size of the training window. Default is 365.
  • truncate: float: Truncate cross tail filter at specific point. Used when cross_tail_method='quantile'. Ignored if None. Defaults to 0.5.
  • upper_triangle: float: Upper triangle coordinate point. Used when cross_tail_method='triangle'. Defaults to 0.5.

ArbitrageBaseIndex

Arbitrage basis index: Marginal probability model. This model computes the cumulative log returns of two assets and applies a transformation to the cumulative index. It is useful for analyzing the performance of two assets over time, particularly in the context of arbitrage opportunities. The transformation ensures that the cumulative index reflects the relative performance of the two assets, allowing for a more nuanced analysis of their relationship. Method generated by attrs for class ArbitrageBaseIndex.

Ancestors

  • systematica.models.base.BaseStatArb
  • abc.ABC
  • systematica.api.models.arbitrage_index.ArbitrageIndexMixin

Static methods

transform_func

Apply base index transformation to model output. Parameters: Returns:

Instance variables

  • transform_params: Dict[str, Any]: Returns the transformation parameters.
  • alpha: float: Lower quantile is found with lower_quantile = np.quantile(pdfs, 1.0 - alpha), then removed from matrix. Used when cross_tail_method='quantile'. Defaults to 0.9.
  • copula: str | type: The copula model to use. Default is auto, which selects the best copula model based on method criterion.
  • cross_tail_method: str: Mask method used to filter cross-tail concentration in the marginals. Specifies the type of mask applied to the marginal distributions. Available options are quantile (applies a quantile-based tail mask) and triangle (applies a triangular mask). If None, the mask is ignored. Defaults to None.
  • custom_splitter: str | None: Custom splitter to use for data partitioning. Default is None.
  • custom_splitter_kwargs: Dict[str, Any]: Additional keyword arguments for the custom splitter. Default is None.
  • list_copulas: list[systematica.models.arbitrage_index.base.BaseCopula] | None: A list of copulas to consider. If None, the model defaults to Archimedeans. Default is None.
  • lower_triangle: float: Lower triangle coordinate point. Used when cross_tail_method='triangle'. Defaults to 0.5.
  • marginal_dependence: bool: If True, it calculates correlation coefficient on marginals. Otherwise, on rets features. Defaults to False.
  • model_validation_method: str: The method used for model selection. Default is aic. Choices are aic, bic and aicc.
  • rotation: str | systematica.models.arbitrage_index.utils.BaseCopulaRotation: Rotations allow the copula to be adapted for different types of tail dependence. - A 180 rotation captures extreme co-movements in the lower tail (i.e. simultaneous extreme losses). - A 90 rotation captures scenarios where one variable exhibits extreme losses while the other shows extreme gains. - A 270 rotation captures the opposite scenario, where one variable experiences extreme gains while the other suffers extreme losses. See BaseCopulaRotation. If set to auto, applies best fitted rotation. Defaults to BaseCopulaRotation.R0.
  • splitter: str: The type of data splitter. Choices are from_rolling, from_custom_rolling, from_expanding, from_custom_expanding. Defaults to from_custom_rolling.
  • testing_window: int: The size of the testing window. Default is 60.
  • training_window: int: The size of the training window. Default is 365.
  • truncate: float: Truncate cross tail filter at specific point. Used when cross_tail_method='quantile'. Ignored if None. Defaults to 0.5.
  • upper_triangle: float: Upper triangle coordinate point. Used when cross_tail_method='triangle'. Defaults to 0.5.

ArbitrageResetIndex

Arbitrage reset index: Marginal probability model. This model computes the accumulated sum of log returns and applies a reset transformation to the accumulated index. It is useful for analyzing the performance of two assets over time, particularly in the context of arbitrage opportunities. The reset transformation ensures that the accumulated index remains within specified bounds, preventing extreme values that could skew the analysis. The transformation resets the accumulated sum if it exceeds the specified upper or lower bounds, allowing for a more stable analysis of the relationship between the two assets. Method generated by attrs for class ArbitrageResetIndex.

Ancestors

  • systematica.models.base.BaseStatArb
  • abc.ABC
  • systematica.api.models.arbitrage_index.ArbitrageIndexMixin

Static methods

is_valid

Validate model parameters. Parameters: Raises:

transform_func

Apply reset index transformation to model output. Parameters: Returns:

Instance variables

  • transform_params: Dict[str, Any]: Returns the transformation parameters.
  • alpha: float: Lower quantile is found with lower_quantile = np.quantile(pdfs, 1.0 - alpha), then removed from matrix. Used when cross_tail_method='quantile'. Defaults to 0.9.
  • center: float: The center value to subtract from each prediction. Default is 0.5.
  • copula: str | type: The copula model to use. Default is auto, which selects the best copula model based on method criterion.
  • cross_tail_method: str: Mask method used to filter cross-tail concentration in the marginals. Specifies the type of mask applied to the marginal distributions. Available options are quantile (applies a quantile-based tail mask) and triangle (applies a triangular mask). If None, the mask is ignored. Defaults to None.
  • custom_splitter: str | None: Custom splitter to use for data partitioning. Default is None.
  • custom_splitter_kwargs: Dict[str, Any]: Additional keyword arguments for the custom splitter. Default is None.
  • list_copulas: list[systematica.models.arbitrage_index.base.BaseCopula] | None: A list of copulas to consider. If None, the model defaults to Archimedeans. Default is None.
  • lower: float: The lower bound for resetting the accumulated sum. Default is -1.0.
  • lower_triangle: float: Lower triangle coordinate point. Used when cross_tail_method='triangle'. Defaults to 0.5.
  • marginal_dependence: bool: If True, it calculates correlation coefficient on marginals. Otherwise, on rets features. Defaults to False.
  • model_validation_method: str: The method used for model selection. Default is aic. Choices are aic, bic and aicc.
  • rotation: str | systematica.models.arbitrage_index.utils.BaseCopulaRotation: Rotations allow the copula to be adapted for different types of tail dependence. - A 180 rotation captures extreme co-movements in the lower tail (i.e. simultaneous extreme losses). - A 90 rotation captures scenarios where one variable exhibits extreme losses while the other shows extreme gains. - A 270 rotation captures the opposite scenario, where one variable experiences extreme gains while the other suffers extreme losses. See BaseCopulaRotation. If set to auto, applies best fitted rotation. Defaults to BaseCopulaRotation.R0.
  • sequential: bool: Transformation is applied at every split if True. Otherwise, perform the transformation after computation. It Defaults to False.
  • splitter: str: The type of data splitter. Choices are from_rolling, from_custom_rolling, from_expanding, from_custom_expanding. Defaults to from_custom_rolling.
  • testing_window: int: The size of the testing window. Default is 60.
  • training_window: int: The size of the training window. Default is 365.
  • truncate: float: Truncate cross tail filter at specific point. Used when cross_tail_method='quantile'. Ignored if None. Defaults to 0.5.
  • upper: float: The upper bound for resetting the accumulated sum. Default is 1.0.
  • upper_triangle: float: Upper triangle coordinate point. Used when cross_tail_method='triangle'. Defaults to 0.5.

ArbitrageRollingZscoreIndex

Arbitrage rolling z-score index: Marginal probability model. This model computes the rolling z-scores of log returns and applies a transformation to the z-scores. It is useful for analyzing the performance of two assets over time, particularly in the context of arbitrage opportunities. The rolling z-scores transformation ensures that the index reflects the relative performance of the two assets, allowing for a more nuanced analysis of their relationship. The z-scores are computed over a specified rolling window, which allows for a dynamic analysis of the relationship between the two assets. Method generated by attrs for class ArbitrageRollingZscoreIndex.

Ancestors

  • systematica.models.base.BaseStatArb
  • abc.ABC
  • systematica.api.models.arbitrage_index.ArbitrageIndexMixin

Static methods

transform_func

Apply rolling z-score index transformation to model output. Parameters: Returns:

Instance variables

  • transform_params: Dict[str, Any]: Returns the transformation parameters.
  • alpha: float: Lower quantile is found with lower_quantile = np.quantile(pdfs, 1.0 - alpha), then removed from matrix. Used when cross_tail_method='quantile'. Defaults to 0.9.
  • center: float: The center value to subtract from each prediction. Default is 0.5.
  • copula: str | type: The copula model to use. Default is auto, which selects the best copula model based on method criterion.
  • cross_tail_method: str: Mask method used to filter cross-tail concentration in the marginals. Specifies the type of mask applied to the marginal distributions. Available options are quantile (applies a quantile-based tail mask) and triangle (applies a triangular mask). If None, the mask is ignored. Defaults to None.
  • custom_splitter: str | None: Custom splitter to use for data partitioning. Default is None.
  • custom_splitter_kwargs: Dict[str, Any]: Additional keyword arguments for the custom splitter. Default is None.
  • ddof: int: Delta degrees of freedom for standard deviation calculation. Default is 1.
  • list_copulas: list[systematica.models.arbitrage_index.base.BaseCopula] | None: A list of copulas to consider. If None, the model defaults to Archimedeans. Default is None.
  • lower_triangle: float: Lower triangle coordinate point. Used when cross_tail_method='triangle'. Defaults to 0.5.
  • marginal_dependence: bool: If True, it calculates correlation coefficient on marginals. Otherwise, on rets features. Defaults to False.
  • model_validation_method: str: The method used for model selection. Default is aic. Choices are aic, bic and aicc.
  • rotation: str | systematica.models.arbitrage_index.utils.BaseCopulaRotation: Rotations allow the copula to be adapted for different types of tail dependence. - A 180 rotation captures extreme co-movements in the lower tail (i.e. simultaneous extreme losses). - A 90 rotation captures scenarios where one variable exhibits extreme losses while the other shows extreme gains. - A 270 rotation captures the opposite scenario, where one variable experiences extreme gains while the other suffers extreme losses. See BaseCopulaRotation. If set to auto, applies best fitted rotation. Defaults to BaseCopulaRotation.R0.
  • sequential: bool: Transformation is applied at every split if True. Otherwise, perform the transformation after computation. It Defaults to False.
  • splitter: str: The type of data splitter. Choices are from_rolling, from_custom_rolling, from_expanding, from_custom_expanding. Defaults to from_custom_rolling.
  • testing_window: int: The size of the testing window. Default is 60.
  • training_window: int: The size of the training window. Default is 365.
  • truncate: float: Truncate cross tail filter at specific point. Used when cross_tail_method='quantile'. Ignored if None. Defaults to 0.5.
  • upper_triangle: float: Upper triangle coordinate point. Used when cross_tail_method='triangle'. Defaults to 0.5.
  • window: int: The rolling window size. It should be lower than testing_window. If None, it automatically fits to half of the testing window. Default is None.

ArbitrageProbabilityIndex

Arbitrage marginal index: Marginal probability model. Compute arbitrage index cross validation using marginals. No transformation is performed. Method generated by attrs for class ArbitrageProbabilityIndex.

Ancestors

  • systematica.models.base.BaseStatArb
  • abc.ABC
  • systematica.api.models.arbitrage_index.ArbitrageIndexMixin

Static methods

transform_func

No transformation is applied to model output. Parameters: Returns:

Instance variables

  • transform_params: Dict[str, Any]: Returns the transformation parameters.
  • alpha: float: Lower quantile is found with lower_quantile = np.quantile(pdfs, 1.0 - alpha), then removed from matrix. Used when cross_tail_method='quantile'. Defaults to 0.9.
  • copula: str | type: The copula model to use. Default is auto, which selects the best copula model based on method criterion.
  • cross_tail_method: str: Mask method used to filter cross-tail concentration in the marginals. Specifies the type of mask applied to the marginal distributions. Available options are quantile (applies a quantile-based tail mask) and triangle (applies a triangular mask). If None, the mask is ignored. Defaults to None.
  • custom_splitter: str | None: Custom splitter to use for data partitioning. Default is None.
  • custom_splitter_kwargs: Dict[str, Any]: Additional keyword arguments for the custom splitter. Default is None.
  • list_copulas: list[systematica.models.arbitrage_index.base.BaseCopula] | None: A list of copulas to consider. If None, the model defaults to Archimedeans. Default is None.
  • lower_triangle: float: Lower triangle coordinate point. Used when cross_tail_method='triangle'. Defaults to 0.5.
  • marginal_dependence: bool: If True, it calculates correlation coefficient on marginals. Otherwise, on rets features. Defaults to False.
  • model_validation_method: str: The method used for model selection. Default is aic. Choices are aic, bic and aicc.
  • preprocess_func: Callable: Preprocess data before calling the model. Should take prices as input. Defaults to get_returns_nb.
  • rotation: str | systematica.models.arbitrage_index.utils.BaseCopulaRotation: Rotations allow the copula to be adapted for different types of tail dependence. - A 180 rotation captures extreme co-movements in the lower tail (i.e. simultaneous extreme losses). - A 90 rotation captures scenarios where one variable exhibits extreme losses while the other shows extreme gains. - A 270 rotation captures the opposite scenario, where one variable experiences extreme gains while the other suffers extreme losses. See BaseCopulaRotation. If set to auto, applies best fitted rotation. Defaults to BaseCopulaRotation.R0.
  • splitter: str: The type of data splitter. Choices are from_rolling, from_custom_rolling, from_expanding, from_custom_expanding. Defaults to “from_custom_rolling”.
  • testing_window: int: The size of the testing window. Default is 60.
  • training_window: int: The size of the training window. Default is 365.
  • truncate: float: Truncate cross tail filter at specific point. Used when cross_tail_method='quantile'. Ignored if None. Defaults to 0.5.
  • upper_triangle: float: Upper triangle coordinate point. Used when cross_tail_method='triangle'. Defaults to 0.5.