TrialSelector
Instance variables
strategies: List[systematica.tuners.base.BaseTrialSelector]: List of selector strategies to apply.
Methods
run_all
| Name | Type | Default | Description |
|---|---|---|---|
df | pandas.DataFrame | -- | Data to run the strategies on. |
| Type | Description |
|---|---|
dict | Dictionary mapping strategy names to selection results. |
ElbowPoint
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
-
x: str: Column name for the x-axis metric (typically Sharpe ratio). -
y: str: Column name for the y-axis metric (typically returns).
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.Series | The selected parameter combination or None if selection fails. |
Preference
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
-
alpha: float: Weight coefficient for the y metric. 1-alpha is applied to x metric. -
x: str: Column name for the x-axis metric (typically Sharpe ratio). -
y: str: Column name for the y-axis metric (typically returns).
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.Series | The selected parameter combination with highest utility score. |
EpsilonConstraint
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
-
min_x: float: Minimum acceptable value for the x metric. -
x: str: Column name for the constraint metric (typically Sharpe ratio). -
y: str: Column name for the optimization metric (typically returns).
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.Series | The selected parameter combination or None if no parameters satisfy the constraint. |
ClosestIdealPoint
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
-
points: Tuple[float, float]: Ideal point coordinates in normalized space, e.g., (1.0, 1.0) for perfect Sharpe and returns. -
x: str: Column name for the x-axis metric (typically Sharpe ratio). -
y: str: Column name for the y-axis metric (typically returns).
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.Series | The parameter combination closest to the ideal point. |
DiversitySampling
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
-
metrics: List[str]: List of column names for the metrics to use in clustering. -
n_clusters: int: Number of clusters to form. Default is 3. -
random_state: int: Random seed for reproducibility. Default is None, which means no fixed seed.
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.DataFrame | DataFrame of representative points from each cluster. Empty DataFrame if there are fewer points than requested clusters. |
RiskAwareUtility
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
-
alpha: float: Weight coefficient for the return metric. 1-alpha is applied to the risk metric. -
x: str: Column name for the risk metric (typically Sharpe ratio). -
y: str: Column name for the return metric (typically returns).
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.Series | The parameter combination with highest utility score. |
BestMetricPoint
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
best_metrics: pandas.core.frame.DataFrame: DataFrame containing the best metrics for selection.
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.Series | Selected parameters. |
MaxMetricPoint
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
x: str: Column name for the metric to maximize.
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.Series | Selected parameters. |
MinMetricPoint
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
x: str: Column name for the metric to minimize.
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.Series | Selected parameters. |
RegretMinimization
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
-
x: str: Column name for the risk metric (typically Sharpe ratio). -
y: str: Column name for the return metric (typically returns).
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.Series | The parameter combination with minimum regret. |
HullMidPoint
- Convex Pareto front: Select solutions on the convex hull, representing efficient trade-offs.
- Concave Pareto front: Mid-front solutions may be better as extremes may represent diminishing returns.
- Convex: Favor extreme efficient strategies (maximize Sharpe or Return)
- Concave: Favor balanced strategies (mid-front), as returns may plateau
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
metrics: List[str]: List of metrics to use for the convex hull selection.
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
ValueError | If points lower than 3 after dropping NaNs to compute hull. |
| Type | Description |
|---|---|
pd.DataFrame or pd.Series | Selected parameter combinations based on the chosen mode. Returns entire DataFrame if fewer than 3 points are available. |
HullPoint
- Convex Pareto front: Select solutions on the convex hull, representing efficient trade-offs.
- Concave Pareto front: Mid-front solutions may be better as extremes may represent diminishing returns.
- Convex: Favor extreme efficient strategies (maximize Sharpe or Return)
- Concave: Favor balanced strategies (mid-front), as returns may plateau
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
metrics: List[str]: List of metrics to use for the convex hull selection.
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
ValueError | If points lower than 3 after dropping NaNs to compute hull. |
| Type | Description |
|---|---|
pd.DataFrame or pd.Series | Selected parameter combinations based on the chosen mode. Returns entire DataFrame if fewer than 3 points are available. |
HullExtremePoint
- Convex Pareto front: Select solutions on the convex hull, representing efficient trade-offs.
- Concave Pareto front: Mid-front solutions may be better as extremes may represent diminishing returns.
- Convex: Favor extreme efficient strategies (maximize Sharpe or Return)
- Concave: Favor balanced strategies (mid-front), as returns may plateau
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
metrics: List[str]: List of metrics to use for the convex hull selection.
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
ValueError | If points lower than 3 after dropping NaNs to compute hull. |
| Type | Description |
|---|---|
pd.DataFrame or pd.Series | Selected parameter combinations based on the chosen mode. Returns entire DataFrame if fewer than 3 points are available. |
AUCMaximization
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
-
x: str: Column name for the x-axis metric (typically Sharpe ratio). -
y: str: Column name for the y-axis metric (typically returns).
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.Series | The parameter combination with maximum contribution to the AUC. |
HypervolumeContribution
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
study: optuna.study.study.Study: Optuna study containing the trials.
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from with a ‘number’ column matching trial.number. |
| Type | Description |
|---|---|
ValueError | If no Pareto front trials are found or no matching trial is found in the DataFrame. |
| Type | Description |
|---|---|
pd.Series | The parameter combination with maximum hypervolume contribution. |
Random
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.Series | A randomly selected parameter combination. |
EfficientFrontierProjection
Ancestors
systematica.tuners.base.BaseTrialSelectorabc.ABC
Instance variables
-
risk_free_rate: float: Risk-free rate for volatility calculation. Defaults to 0.0. -
x: str: Column name for the risk metric (standard deviation or inverse sharpe). -
y: str: Column name for the return metric.
Methods
run
| Name | Type | Default | Description |
|---|---|---|---|
df | pd.DataFrame | -- | DataFrame containing parameters to select from. |
| Type | Description |
|---|---|
pd.Series | The parameter combination with maximum Sharpe ratio. |

