PineForge HPO 1.11.0
Native hyperparameter optimization for PineForge strategies
Loading...
Searching...
No Matches
pineforge::hpo::ReportSnapshot Struct Reference

Owning report snapshot detached from strategy and C-ABI report lifetimes. More...

#include <pineforge/hpo/trial_executor.hpp>

Public Member Functions

std::optional< double > metric (std::string_view path) const noexcept
 Resolves a canonical objective path without allocating a string map.
 

Public Attributes

std::int32_t total_trades = 0
 Number of completed trades.
 
double net_profit = 0.0
 Report-level net profit in account currency.
 
std::int64_t input_bars_processed = 0
 Number of input-timeframe bars processed by the engine.
 
std::int64_t script_bars_processed = 0
 Number of script-timeframe bars processed by the strategy.
 
std::int64_t security_feeds_total = 0
 Number of requested secondary security feeds.
 
std::int64_t security_complete_total = 0
 Number of complete secondary-feed observations.
 
std::int64_t security_partial_total = 0
 Number of partial secondary-feed observations.
 
std::int64_t magnifier_sub_bars_total = 0
 Total magnifier sub-bars processed.
 
std::int64_t magnifier_sample_ticks_total = 0
 Total synthetic magnifier ticks sampled.
 
std::int32_t input_tf_seconds = 0
 Input timeframe duration in seconds.
 
std::int32_t script_tf_seconds = 0
 Script timeframe duration in seconds.
 
std::int32_t script_tf_ratio = 0
 Integer aggregation ratio reported by the engine.
 
bool needs_aggregation = false
 Whether the engine aggregated input bars for script execution.
 
bool bar_magnifier_enabled = false
 Whether bar magnification was active.
 
pf_metrics_t metrics {}
 Complete detached PineForge metrics structure.
 
std::vector< pf_equity_point_t > equity_curve
 Optional owned copy controlled by BacktestConfiguration::capture_equity_curve.
 
std::vector< pf_trade_t > trades
 Optional owned trade records controlled by BacktestConfiguration::capture_trades.
 
ReturnStatsFields return_bar
 Bar-return statistics, computed before the report was released when requested.
 
ReturnStatsFields return_monthly
 Monthly-return statistics, computed before the report was released when requested.
 
ReturnBlockLayout return_block_layout
 Block layout of the full-window equity curve, computed before the report was released when blocks were requested; the default, not usable, layout when they were not.
 
ReturnBlockMoments return_blocks
 Per-block moments of the full-window equity curve; status NotRequested when blocks were not requested.
 

Detailed Description

Owning report snapshot detached from strategy and C-ABI report lifetimes.

When requested, the equity curve supports independent sleeve alignment and approximate portfolio aggregation. It is not a shared-account simulation: completed reports cannot reconstruct shared cash, margin admission, or cross-strategy order ordering.

Definition at line 103 of file trial_executor.hpp.

Member Function Documentation

◆ metric()

std::optional< double > pineforge::hpo::ReportSnapshot::metric ( std::string_view  path) const
noexcept

Resolves a canonical objective path without allocating a string map.

Public fields under metrics.all, metrics.longs, metrics.shorts, and metrics.equity are supported, along with selected report.* counters. Integer metrics are converted losslessly to double for objective arithmetic. Unknown paths return std::nullopt. metrics.equity.sharpe_tv and metrics.equity.sortino_tv, the pre-1.0 engine names of sharpe_monthly and sortino_monthly, resolve as aliases. The eighteen names returns.{bar,monthly}.{count,skipped,periods_per_year,mean,std, sharpe_per_period,skew,kurt_raw,status} always resolve; a series that was not computed (not requested, or no report) reads NaN, which is published as null.

Member Data Documentation

◆ bar_magnifier_enabled

bool pineforge::hpo::ReportSnapshot::bar_magnifier_enabled = false

Whether bar magnification was active.

Definition at line 133 of file trial_executor.hpp.

◆ equity_curve

std::vector<pf_equity_point_t> pineforge::hpo::ReportSnapshot::equity_curve

Optional owned copy controlled by BacktestConfiguration::capture_equity_curve.

Definition at line 138 of file trial_executor.hpp.

◆ input_bars_processed

std::int64_t pineforge::hpo::ReportSnapshot::input_bars_processed = 0

Number of input-timeframe bars processed by the engine.

Definition at line 110 of file trial_executor.hpp.

◆ input_tf_seconds

std::int32_t pineforge::hpo::ReportSnapshot::input_tf_seconds = 0

Input timeframe duration in seconds.

Definition at line 125 of file trial_executor.hpp.

◆ magnifier_sample_ticks_total

std::int64_t pineforge::hpo::ReportSnapshot::magnifier_sample_ticks_total = 0

Total synthetic magnifier ticks sampled.

Definition at line 122 of file trial_executor.hpp.

◆ magnifier_sub_bars_total

std::int64_t pineforge::hpo::ReportSnapshot::magnifier_sub_bars_total = 0

Total magnifier sub-bars processed.

Definition at line 120 of file trial_executor.hpp.

◆ metrics

pf_metrics_t pineforge::hpo::ReportSnapshot::metrics {}

Complete detached PineForge metrics structure.

Definition at line 136 of file trial_executor.hpp.

◆ needs_aggregation

bool pineforge::hpo::ReportSnapshot::needs_aggregation = false

Whether the engine aggregated input bars for script execution.

Definition at line 131 of file trial_executor.hpp.

◆ net_profit

double pineforge::hpo::ReportSnapshot::net_profit = 0.0

Report-level net profit in account currency.

Definition at line 107 of file trial_executor.hpp.

◆ return_bar

ReturnStatsFields pineforge::hpo::ReportSnapshot::return_bar

Bar-return statistics, computed before the report was released when requested.

Definition at line 142 of file trial_executor.hpp.

◆ return_block_layout

ReturnBlockLayout pineforge::hpo::ReportSnapshot::return_block_layout

Block layout of the full-window equity curve, computed before the report was released when blocks were requested; the default, not usable, layout when they were not.

Definition at line 147 of file trial_executor.hpp.

◆ return_blocks

ReturnBlockMoments pineforge::hpo::ReportSnapshot::return_blocks

Per-block moments of the full-window equity curve; status NotRequested when blocks were not requested.

Definition at line 150 of file trial_executor.hpp.

◆ return_monthly

ReturnStatsFields pineforge::hpo::ReportSnapshot::return_monthly

Monthly-return statistics, computed before the report was released when requested.

Definition at line 144 of file trial_executor.hpp.

◆ script_bars_processed

std::int64_t pineforge::hpo::ReportSnapshot::script_bars_processed = 0

Number of script-timeframe bars processed by the strategy.

Definition at line 112 of file trial_executor.hpp.

◆ script_tf_ratio

std::int32_t pineforge::hpo::ReportSnapshot::script_tf_ratio = 0

Integer aggregation ratio reported by the engine.

Definition at line 129 of file trial_executor.hpp.

◆ script_tf_seconds

std::int32_t pineforge::hpo::ReportSnapshot::script_tf_seconds = 0

Script timeframe duration in seconds.

Definition at line 127 of file trial_executor.hpp.

◆ security_complete_total

std::int64_t pineforge::hpo::ReportSnapshot::security_complete_total = 0

Number of complete secondary-feed observations.

Definition at line 116 of file trial_executor.hpp.

◆ security_feeds_total

std::int64_t pineforge::hpo::ReportSnapshot::security_feeds_total = 0

Number of requested secondary security feeds.

Definition at line 114 of file trial_executor.hpp.

◆ security_partial_total

std::int64_t pineforge::hpo::ReportSnapshot::security_partial_total = 0

Number of partial secondary-feed observations.

Definition at line 118 of file trial_executor.hpp.

◆ total_trades

std::int32_t pineforge::hpo::ReportSnapshot::total_trades = 0

Number of completed trades.

Definition at line 105 of file trial_executor.hpp.

◆ trades

std::vector<pf_trade_t> pineforge::hpo::ReportSnapshot::trades

Optional owned trade records controlled by BacktestConfiguration::capture_trades.

Definition at line 140 of file trial_executor.hpp.


The documentation for this struct was generated from the following file: