Skip to main content

BaseStatArb

Base Statistical Arbitrage class. Method generated by attrs for class BaseStatArb.

Ancestors

  • abc.ABC

Descendants

  • systematica.api.models.arbitrage_index.ArbitrageBaseIndex
  • systematica.api.models.arbitrage_index.ArbitrageClipIndex
  • systematica.api.models.arbitrage_index.ArbitrageCumulativeIndex
  • systematica.api.models.arbitrage_index.ArbitrageProbabilityIndex
  • systematica.api.models.arbitrage_index.ArbitrageResetIndex
  • systematica.api.models.arbitrage_index.ArbitrageRollingZscoreIndex
  • systematica.api.models.meta_model.MetaModel
  • systematica.api.models.momentum.AverageMomentumFactorCV
  • systematica.api.models.momentum.RollingAverageMomentumFactor
  • systematica.api.models.ou_process.RollingOUProcess
  • systematica.api.models.range_breakout.RangeBreakout
  • systematica.api.models.spread.RollingSpreadModel
  • systematica.api.models.spread.RollingZscoreModel
  • systematica.api.models.volatility.RollingVolatilityFactor
  • systematica.api.models.volatility.VolatilityFactorCV
  • systematica.api.models.volume_profile.RollingVolumeProfileFactor
  • systematica.api.models.volume_profile.VolumeProfileFactorCV

Static methods

is_valid

Validate model parameters. This method checks if the model parameters are valid for the statistical arbitrage model. It should be implemented in subclasses and decorated with staticmethod to allow calling it without an instance. If the model does not require validation, it can be implemented as a no-op method with the @staticmethod decorator. Examples: To implement this method, define it in the subclass and use the @staticmethod decorator like so:
Parameters:

run_walk_forward

Analyzes model using rolling or cross-validation techniques. Determine the appropriate wf selection class based on model attributes and use_rolling flag. Parameters: Returns:

run_analyzer

Executes the portfolio analyzer.
Combines scoring, signal generation, and portfolio simulation into a single pipeline for streamlined backtesting.
Parameters: Returns:

run_model

Run parameterized scores generation.
The method utilizes parameterization to run scores over various parameter combinations. The results can be merged and accessed as a single output object.
Parameters: Returns:

run_signals

Run parametrized signals generation.
The method utilizes parameterization to run signal generation over various parameter combinations. The results can be merged and accessed as a single output object.
Parameters: Returns:

run_pipeline

Executes the portfolio pipeline. Method is parametrizable.
Combines scoring, signal generation, and portfolio simulation into a single pipeline for streamlined backtesting.
Parameters: Returns:

run_expression

Build an indicator class from an indicator expression. Builds a new indicator class based on a Python expression string. See vbt.IF.from_expr for more information. Parameters: Returns: Raises:

run_optuna_study

Run hyperparameter optimization using optuna for a signal-based trading strategy.
  • Optuna is used for hyperparameter tuning and efficiently finds the best parameters.
  • The study prunes trials with poor results to accelerate the search process.
References: Parameters: Returns:

Methods

get_signals

Generate trading signals based on scores. Parameters: Returns: