|
PineForge HPO 1.11.0
Native hyperparameter optimization for PineForge strategies
|
Deterministic one-shot adapter from serialized parameters to a detached report. More...
#include <pineforge/hpo/trial_executor.hpp>
Public Member Functions | |
| TrialExecutor (std::shared_ptr< const StrategyPlugin > plugin, DatasetView view, BacktestConfiguration configuration={}) | |
| Binds a validated plugin, immutable dataset view, and execution configuration. | |
| TrialExecutor (std::shared_ptr< const StrategyPlugin > plugin, std::shared_ptr< const Dataset > dataset, BacktestConfiguration configuration={}) | |
| Binds the whole dataset as a view, preserving existing callers' pointer and length. | |
| TrialExecutionResult | execute (const ParameterValues &inputs, const ParameterValues &strategy_overrides={}) const |
| Runs one fresh strategy instance with overrides applied before ordinary inputs. | |
| TrialExecutionResult | execute_prefix (const ParameterValues &inputs, const ParameterValues &strategy_overrides, std::size_t bar_count) const |
| Runs the exact full-backtest engine path on an immutable bar prefix. | |
| const BacktestConfiguration & | configuration () const noexcept |
| Returns the immutable per-execution configuration. | |
| const Dataset & | dataset () const noexcept |
| Returns the shared immutable owner; its size may exceed the execution view. | |
| const DatasetView & | view () const noexcept |
| Returns the immutable execution range. | |
| const StrategyPlugin & | plugin () const noexcept |
| Returns the loaded strategy plugin. | |
Deterministic one-shot adapter from serialized parameters to a detached report.
execute() is const and may be called concurrently: every call creates a fresh strategy handle while all calls share only the immutable plugin function table and DatasetView. Report-owned resources are released before the strategy handle on every path.
Definition at line 231 of file trial_executor.hpp.
| pineforge::hpo::TrialExecutor::TrialExecutor | ( | std::shared_ptr< const StrategyPlugin > | plugin, |
| DatasetView | view, | ||
| BacktestConfiguration | configuration = {} |
||
| ) |
Binds a validated plugin, immutable dataset view, and execution configuration.
| std::invalid_argument | for a null plugin, an ABI-incompatible view size, non-positive magnifier samples, or an unknown magnifier distribution. |
| pineforge::hpo::TrialExecutor::TrialExecutor | ( | std::shared_ptr< const StrategyPlugin > | plugin, |
| std::shared_ptr< const Dataset > | dataset, | ||
| BacktestConfiguration | configuration = {} |
||
| ) |
Binds the whole dataset as a view, preserving existing callers' pointer and length.
| std::invalid_argument | for null dependencies or invalid execution settings. |
|
inlinenoexcept |
Returns the immutable per-execution configuration.
Definition at line 261 of file trial_executor.hpp.
|
inlinenoexcept |
Returns the shared immutable owner; its size may exceed the execution view.
Definition at line 263 of file trial_executor.hpp.
References pineforge::hpo::DatasetView::owner.
| TrialExecutionResult pineforge::hpo::TrialExecutor::execute | ( | const ParameterValues & | inputs, |
| const ParameterValues & | strategy_overrides = {} |
||
| ) | const |
Runs one fresh strategy instance with overrides applied before ordinary inputs.
Strategy-reported errors are returned as TrialExecutionStatus::kEngineError. Adapter and plugin contract violations may throw.
| TrialExecutionResult pineforge::hpo::TrialExecutor::execute_prefix | ( | const ParameterValues & | inputs, |
| const ParameterValues & | strategy_overrides, | ||
| std::size_t | bar_count | ||
| ) | const |
Runs the exact full-backtest engine path on an immutable bar prefix.
The prefix must contain between one and view().size() bars. An empty view cannot run.
|
inlinenoexcept |
Returns the loaded strategy plugin.
Definition at line 267 of file trial_executor.hpp.
|
inlinenoexcept |
Returns the immutable execution range.
Definition at line 265 of file trial_executor.hpp.