OptunaTuner
Static methods
get_all_metrics
Returns:
Instance variables
-
target_names: List[str]: Normalize metric names. -
create_study_kwargs: Dict[str, Any]: Additional optuna study parameters. -
cross_validate: bool: Whether to use cross-validation analytics throughrun_report, wrappingBaseReportCVorBaseRollingReportinstead of usingrun_pipelinealone. If True, optimize using cross validation. Otherwise, uses data history as a whole. Defaults to False. -
direction: str | List[str]: Optimization direction for Optuna (default: ‘maximize’). If list, direction is modified to “directions” internally. -
gc_after_trial: bool: Flag to determine whether to automatically run garbage collection after each trial. Set toTrueto run the garbage collection,Falseotherwise. It runs a full collection by internally callinggc.collect. If you see an increase in memory consumption over several trials, try setting this flag toTrue. -
metric_registry_kwargs: Dict[str, Any]: Additional arguments for metric registry. Parameters such aswindowofminpfor rolling metrics should be specified at this level. -
metrics: str | List[str]: Performance metrics to compute (default: ‘sharpe_ratio’). -
n_completed_trials: int: Number of trials to complete before stopping (default: None). -
n_jobs: int: Parallel jobs for Optuna (default: -1). -
n_trials: int: Number of optimization trials for Optuna (default: 100). -
optimize_kwargs: Dict[str, Any]: Additional arguments for Optuna optimization. -
pruner: optuna.pruners._base.BasePruner: Pruner. Defaults to Asynchronous Successive Halving Algorithm. -
reduce_func: Callable: Reduce function when using cross_validate. If None, defaults tovbt.nb.nanmedian_nb. Defaults to None. -
sampler: optuna.samplers._base.BaseSampler: Sampler. Defaults to TPE (Tree-structured Parzen Estimator) algorithm. -
tracker: systematica.portfolio.trackers.base.BaseTracker: Log and monitor the Optuna hyperparameter using tracker integration. -
use_rolling: bool: Flag to use rolling method viaBaseRollingReport. Note that both rolling and cv models can be passed. Defaults to False. -
verbose: bool: Enable verbose output (default: True).
Methods
check_direction
Raises:
check_metrics
Raises:
create_objective
Returns:
run_feature
Returns:
run
Returns:
run_tracker
Returns:
run_optuna
Returns:

