PineForge HPO 1.11.0
Native hyperparameter optimization for PineForge strategies
Loading...
Searching...
No Matches
selected_evaluation.hpp
Go to the documentation of this file.
1#pragma once
2
4
5#include <cstddef>
6#include <cstdint>
7#include <optional>
8#include <string>
9
10namespace pineforge {
11namespace hpo {
12
16 std::uint64_t fed_input_bars = 0;
18 std::uint64_t fed_script_bars = 0;
20 std::uint64_t preroll_input_bars = 0;
22 std::uint64_t preroll_script_bars = 0;
24 std::uint64_t window_input_bars = 0;
26 std::uint64_t window_script_bars = 0;
27};
28
34 pf_selected_window_counts_v1 counts{};
36 pf_execution_observation_v1 observation{};
38 pf_execution_boundary_v1 boundary{};
40 std::optional<std::string> effective_settings;
41};
42
49class SelectedEvaluation final {
50public:
59 const StrategyPlugin& plugin, const pf_bar_t* bars, std::size_t count,
60 std::int64_t start_ms, std::int64_t end_ms, const SelectedExpectedCounts& expected,
61 const ParameterValues& inputs, const ParameterValues& strategy_overrides = {},
62 const BacktestConfiguration& configuration = {},
63 const std::optional<std::string>& expected_manifest_version = std::nullopt);
64};
65
66} // namespace hpo
67} // namespace pineforge
Dedicated one-shot OOS execution on a fresh handle using full report mode.
static SelectedEvaluationResult evaluate(const StrategyPlugin &plugin, const pf_bar_t *bars, std::size_t count, std::int64_t start_ms, std::int64_t end_ms, const SelectedExpectedCounts &expected, const ParameterValues &inputs, const ParameterValues &strategy_overrides={}, const BacktestConfiguration &configuration={}, const std::optional< std::string > &expected_manifest_version=std::nullopt)
Runs exactly once using already-planned bounds, retained rows and expected counts.
RAII wrapper around one compiled PineForge strategy plugin.
std::map< std::string, std::string > ParameterValues
Serialized Pine input or runtime-override values keyed by strategy parameter name.
Immutable engine settings applied to every execution owned by a TrialExecutor.
Owning report snapshot detached from strategy and C-ABI report lifetimes.
One fully checked selected run, detached from the engine handle and report.
pf_selected_window_counts_v1 counts
Native counts correlated against the observation and supplied plan.
std::optional< std::string > effective_settings
Optional effective-settings JSON from this handle, unavailable when nullopt.
pf_execution_boundary_v1 boundary
Boundary captured by the one successful non-exporting callback.
pf_execution_observation_v1 observation
Native execution identities and successful Results state.
ReportSnapshot report
Full owning snapshot, always including resident trades and the equity curve.
Already-planned retained primary counts; no planning is performed by SelectedEvaluation.
std::uint64_t fed_input_bars
Retained input rows fed to the engine, including preroll.
std::uint64_t preroll_script_bars
Used preroll script groups (the planner's used_script_bars).
std::uint64_t window_input_bars
Selected input rows in the half-open window.
std::uint64_t fed_script_bars
Retained script groups fed to the engine, including preroll.
std::uint64_t preroll_input_bars
Retained input rows before the selected start.
std::uint64_t window_script_bars
Selected script groups in the half-open window.