ArbitrageIndexCV
WalkForwardCV.
Includes methods to compute Kendall’s Tau, determine the best copula, and
extract copula parameters.
Method generated by attrs for class WalkForwardCV.
Ancestors
systematica.walk_forward.cv.WalkForwardCVsystematica.walk_forward.base.BaseWalkForwardabc.ABCsystematica.generic.base.Modelsystematica.generic.base.Feature
Methods
get_kendall_tau
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
raw_output | bool | True | If True, returns raw results. Default is True, which returns processed results. |
set_datetime_index | bool | True | If True, set end-test datetime index. Ignored otherwise. Defaults to True. |
| Type | Description |
|---|---|
pd.Series | Series containing Kendall’s Tau values. |
get_ecdf
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
raw_output | bool | True | If True, returns raw results. Default is True, which returns processed results. |
set_datetime_index | bool | True | If True, set end-test datetime index. Ignored otherwise. Defaults to True. |
| Type | Description |
|---|---|
pd.DataFrame | DataFrame containing ECDF objects, indexed by the test set index. |
get_copula
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
raw_output | bool | True | If True, returns raw results. Default is True, which returns processed results. |
set_datetime_index | bool | True | If True, set end-test datetime index. Ignored otherwise. Defaults to True. |
| Type | Description |
|---|---|
pd.Series | Series containing the names of the best-fitting copula models. |
get_dependence
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
raw_output | bool | True | If True, returns raw results. Default is True, which returns processed results. |
set_datetime_index | bool | True | If True, set end-test datetime index. Ignored otherwise. Defaults to True. |
| Type | Description |
|---|---|
pd.Series | Series containing the dependence parameter. |
iter_transform_output
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
apply_transform | bool | False | If True, applies the model transformation to the output. Defaults to False. |
reset_stacked_by_set | bool | False | If True, resets the index stacked by set. Defaults to False. |
to_numpy | bool | False | If True, returns a NumPy array instead of a DataFrame. Defaults to False. |
| Type | Description |
|---|---|
pd.DataFrame | The model output. |
get_marginals
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
reset_stacked_by_set | bool | False | If True, resets the index stacked by set. Defaults to False. |
to_numpy | bool | False | If True, returns a NumPy array instead of a DataFrame. Defaults to False. |
| Type | Description |
|---|---|
pd.DataFrame | The model marginals. |
get_partial_derivative
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
reset_stacked_by_set | bool | False | If True, resets the index stacked by set. Defaults to False. |
to_numpy | bool | False | If True, returns a NumPy array instead of a DataFrame. Defaults to False. |
| Type | Description |
|---|---|
pd.DataFrame | The model partial derivatives. |
get_transform
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
reset_stacked_by_set | bool | False | If True, resets the index stacked by set. Defaults to False. |
to_numpy | bool | False | If True, returns a NumPy array instead of a DataFrame. Defaults to False. |
| Type | Description |
|---|---|
pd.DataFrame | The model output after applying the transformation. |
get_all_metrics
| Name | Type | Default | Description |
|---|---|---|---|
key | str | -- | Dataset to use, either ‘train’ or ‘test’. |
level_names | tp.List[str, str], default None“ | -- | Names for the levels in the resulting hierarchical index. if None defaults to ['field', 'symbol']. Defaults to None |
reset_stacked_by_set | bool | False | If True, resets the index stacked by set. Defaults to False. |
to_numpy | bool | False | If True, returns a NumPy array instead of a DataFrame. Defaults to False. |
| Type | Description |
|---|---|
pd.DataFrame | All metrics |
O(6n) to O(n) where n is
the number of splits.
run_portfolio
vectobtpro portfolio object.
Parameters:
| Name | Type | Default | Description |
|---|---|---|---|
key | str, optional | -- | Dataset to use, either ‘train’ or ‘test’. Default is ‘train’. |
validate_model | bool, optional | -- | If True, validate model parameters before processing. Default is True. |
| Type | Description |
|---|---|
vbt.Portfolio | A vbt portfolio object. |
run_report
| Name | Type | Default | Description |
|---|---|---|---|
key | str | 'train' | Dataset to use, either ‘train’ or ‘test’. |
validate_model | bool | True | If True, validate model parameters before processing. |
| Type | Description |
|---|---|
pd.DataFrame | A DataFrame containing model metrics, signals, and trade history, all aligned on a common index. |
plot_kendall_tau
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
fig | vbt.FigureWidget | None | Existing figure to update, by default None. |
layout_kwargs | tp.Kwargs | -- | Additional layout keyword arguments for customization. |
| Type | Description |
|---|---|
vbt.FigureWidget | The figure displaying Kendall’s Tau values. |
plot_copula
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
fig | vbt.FigureWidget | None | Existing figure to update, by default None. |
layout_kwargs | tp.Kwargs | -- | Additional layout keyword arguments for customization. |
| Type | Description |
|---|---|
vbt.FigureWidget | The figure displaying the best-fitting copula models. |
plot_dependence
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
fig | vbt.FigureWidget | None | Existing figure to update, by default None. |
layout_kwargs | tp.Kwargs | -- | Additional layout keyword arguments for customization. |
| Type | Description |
|---|---|
vbt.FigureWidget | The figure displaying dependence values. |
plot_tail_concentration
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
set_datetime_index | bool | True | It True, set output datetime index. Note that it is indexed by the test set index inferred from get_best_copula. Defaults to True. |
title | str | None | The title for the plot. If not provided, a default title based on the fitted copula’s representation is used. |
smoothing | float | 1.3 | Smoothing parameter for the spline line shape. If provided, the curves will be smoothed using a spline interpolation. |
| Type | Description |
|---|---|
pd.Series | Copula ail concentration figures. |
plot_heatmap
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
set_datetime_index | bool | True | It True, set output datetime index. Note that it is indexed by the test set index inferred from get_best_copula. Defaults to True. |
title | str | None | The title for the plot. If not provided, a default title based on the fitted copula’s representation is used. |
| Type | Description |
|---|---|
pd.Series | Copula heatmap figures. |
plot_surface
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
set_datetime_index | bool | True | It True, set output datetime index. Note that it is indexed by the test set index inferred from get_best_copula. Defaults to True. |
title | str | None | The title for the plot. If not provided, a default title based on the fitted copula’s representation is used. |
| Type | Description |
|---|---|
pd.Series | Copula surface figures. |
plot_contour
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
set_datetime_index | bool | True | It True, set output datetime index. Note that it is indexed by the test set index inferred from get_best_copula. Defaults to True. |
show_latest_point | bool, Default True“ | -- | If True, show latest values as red dot. Defaults to True. |
alpha | float | 0.5 | Contour alpha size. Defaults to 0.5. |
opacity | float | 0.2 | Point opacity. Defaults to 0.2. |
title | str | None | The title for the plot. If not provided, a default title based on the fitted copula’s representation is used. |
showlegend | bool | True | Show legend. Defaults to True. |
fig | tp.BaseFigure | None | Existing figure to update. If None, a new figure is created. Defaults to None. |
layout_kwargs | tp.Kwargs | -- | Additional keyword arguments for customizing the layout. |
| Type | Description |
|---|---|
pd.Series | Copula surface figures. |
plot_all
| Name | Type | Default | Description |
|---|---|---|---|
key | str | train | If train, extract train-set. If test, extract test-set. Defaults to train. |
in_outputs | None | -- | | str | tp.List[str], default None Report data. Defaults to None. |
select_signals | tp.Literal[VALID_SIGNALS] | None | Filter Signals by a signal (e.g. long_entries). If None, It is ignored. Defaults to None. |
set_datetime_index | bool | True | It True, set output datetime index. Note that it is indexed by the test set index inferred from get_best_copula. Defaults to True. |
show_contour | bool | True | Show contour if True. Defaults to True. |
show_latest_point | bool, Default True“ | -- | If True, show latest values as red dot. Defaults to True. |
alpha | float | 0.5 | Contour alpha size. Defaults to 0.5. |
opacity | float | 0.2 | Point opacity. Defaults to 0.2. |
title | str | None | The title for the plot. If not provided, a default title based on the fitted copula’s representation is used. |
showlegend | bool | True | Show legend. Defaults to True. |
fig | tp.BaseFigure | None | Existing figure to update. If None, a new figure is created. Defaults to None. |
layout_kwargs | tp.Kwargs | -- | Additional keyword arguments for customizing the layout. |
| Type | Description |
|---|---|
pd.Series | Copula surface figures. |
ArbitrageIndexRolling
BaseRollingWalkForward.
Includes methods to compute Kendall’s Tau, determine the best copula, and
extract copula parameters.
Method generated by attrs for class ArbitrageIndexRolling.
Ancestors
systematica.walk_forward.rolling.RollingWalkForwardsystematica.walk_forward.base.BaseWalkForwardabc.ABCsystematica.generic.base.Modelsystematica.generic.base.Feature

