Documentation
¶
Overview ¶
Package optimize implements the parameter-optimization study type. It evaluates strategy parameter combinations across cross-validation splits, ranks them by out-of-sample performance, and produces a report with rankings, per-fold detail for the best combination, and an overfitting diagnostic comparing in-sample versus out-of-sample scores.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Optimizer ¶
type Optimizer struct {
// contains filtered or unexported fields
}
Optimizer is a study.Study that evaluates strategy parameter combinations across cross-validation splits and ranks them by out-of-sample performance.
func New ¶
New creates an Optimizer for the given cross-validation splits. Default objective is Sharpe; default topN is 10.
func (*Optimizer) Analyze ¶
Analyze processes all RunResults, groups them by combination and split, ranks by out-of-sample objective score, and builds the optimization report.
func (*Optimizer) Configurations ¶
Configurations returns a single RunConfig whose date range spans the earliest start and latest end across all configured splits.
func (*Optimizer) Description ¶
Description returns a short explanation of what the study does.
type Option ¶
type Option func(*Optimizer)
Option configures an Optimizer.
func WithBaseParams ¶ added in v0.9.1
WithBaseParams sets parameter values applied to every parameter combination before the swept value is overlaid. Use this to fix non-swept strategy flags (e.g. when sweeping --sector-cap but pinning --top-holdings to a specific value).
func WithObjective ¶
WithObjective sets the metric used to rank parameter combinations.