Skip to main content

WalkForwardCV

Analyzes a statistical arbitrage model using cross-validation. Method generated by attrs for class WalkForwardCV.

Ancestors

  • systematica.walk_forward.base.BaseWalkForward
  • abc.ABC
  • systematica.generic.base.Model
  • systematica.generic.base.Feature

Descendants

  • systematica.api.analytics.arbitrage_index.ArbitrageIndexCV
  • systematica.api.analytics.meta_model.MetaModelCV
  • systematica.api.analytics.momentum.AverageMomentumFactorCV
  • systematica.api.analytics.momentum.MomentumFactorCV
  • systematica.api.analytics.ou_process.OUProcessCV
  • systematica.api.analytics.range_breakout.RangeBreakoutCV
  • systematica.api.analytics.volatility.VolatilityFactorCV
  • systematica.api.analytics.volume_profile.VolumeProfileFactorCV

Static methods

check_is_valid

Validates CV model. Raises:

reshape_nested_dataframe

Reshape a DataFrame by transposing, unstacking, reindexing, and restacking. Parameters: Returns:

Instance variables

  • index_train: pandas.core.indexes.base.Index: Computes and returns the train set index of the dataset. The train set index is derived from the end bounds values returned by the splitter.
  • index_test: pandas.core.indexes.base.Index: Computes and returns the test set index of the dataset. The test set index is derived from the end bounds values returned by the splitter.
  • all_portfolio_metrics: List[str]: Get available cross-validation metrics.
  • close_reset_stacked_by_set:
  • high_reset_stacked_by_set:
  • low_reset_stacked_by_set:
  • model_output_reset_stacked_by_set:
  • open_reset_stacked_by_set:
  • preprocess_data_reset_stacked_by_set:
  • price_reset_stacked_by_set:
  • returns_reset_stacked_by_set:
  • split_preprocess_data:
  • splitter:

Methods

get_splits

Splits based on the cross-validation splitter. Returns:

set_index

Set valid datetime index Parameters: Returns:

signals_reset_stacked_by_set

Resets the model output stacked by set and attaches bounds to the index. This method uses the splitter to reset signals, stacking it by set and attaching bounds to the index. it then select the test-set. Parameters: Returns:

compare_train_test_split

Compare train and test set across all splits. Calculate all train/test comparison registered features. Parameters: Returns:

get_annualized_return

Computes the annualized returns for the test set. Parameters: Returns:

get_portfolio_metrics

Computes portfolio performance metrics for different test sets. Parameters: Returns: