|
PineForge HPO 1.11.0
Native hyperparameter optimization for PineForge strategies
|
All published fields of one series plus diagnostics. More...
#include <pineforge/hpo/return_stats.hpp>
Public Member Functions | |
| double | value (ReturnStatistic statistic) const noexcept |
| Returns the field as the double the metric layer publishes; NaN stands for null. | |
| bool | all_fields_finite () const noexcept |
True when count, skipped and all six real fields are finite. | |
| bool | status_invariant_holds () const noexcept |
| True when status is Ok exactly when every other field is finite. | |
| void | enforce_status_invariant () noexcept |
| Final step of every computation: sets status Ok when all fields are finite, and replaces a status Ok that has an undefined field with DerivedNonfinite, so that no series is ever published as qualified while a field is null. | |
Public Attributes | |
| ReturnStatsStatus | status = ReturnStatsStatus::NonfiniteInput |
| Series status; a default-constructed series is the null series with status 4. | |
| std::optional< std::int64_t > | count |
| T; empty when the series is not interpretable. | |
| std::optional< std::int64_t > | skipped |
Skipped intervals; empty with count. | |
| double | periods_per_year = std::numeric_limits<double>::quiet_NaN() |
| P or NaN. | |
| double | mean = std::numeric_limits<double>::quiet_NaN() |
| Mean or NaN. | |
| double | std_dev = std::numeric_limits<double>::quiet_NaN() |
Wire field std. | |
| double | sharpe_per_period = std::numeric_limits<double>::quiet_NaN() |
| Sharpe or NaN. | |
| double | skew = std::numeric_limits<double>::quiet_NaN() |
| Skewness or NaN. | |
| double | kurt_raw = std::numeric_limits<double>::quiet_NaN() |
| Raw kurtosis or NaN. | |
| ReturnPeriodFailure | period_failure = ReturnPeriodFailure::None |
| Diagnostic, not on the wire: the reason behind status PeriodUnavailable. | |
| std::int64_t | intervals = 0 |
Diagnostic, not on the wire: intervals examined, equal to T plus skipped plus nonfinite_returns whenever count is present. | |
| std::int64_t | nonfinite_returns = 0 |
| Diagnostic, not on the wire: intervals whose return was not finite. | |
All published fields of one series plus diagnostics.
Undefined numeric fields are NaN and become JSON null on the wire; an infinity is never stored. The std_dev member is the wire field std, renamed only because std names a namespace.
Definition at line 133 of file return_stats.hpp.
|
noexcept |
True when count, skipped and all six real fields are finite.
|
noexcept |
Final step of every computation: sets status Ok when all fields are finite, and replaces a status Ok that has an undefined field with DerivedNonfinite, so that no series is ever published as qualified while a field is null.
|
noexcept |
True when status is Ok exactly when every other field is finite.
|
noexcept |
Returns the field as the double the metric layer publishes; NaN stands for null.
| std::optional<std::int64_t> pineforge::hpo::ReturnSeriesStats::count |
T; empty when the series is not interpretable.
Definition at line 136 of file return_stats.hpp.
| std::int64_t pineforge::hpo::ReturnSeriesStats::intervals = 0 |
Diagnostic, not on the wire: intervals examined, equal to T plus skipped plus nonfinite_returns whenever count is present.
Definition at line 149 of file return_stats.hpp.
| double pineforge::hpo::ReturnSeriesStats::kurt_raw = std::numeric_limits<double>::quiet_NaN() |
Raw kurtosis or NaN.
Definition at line 143 of file return_stats.hpp.
| double pineforge::hpo::ReturnSeriesStats::mean = std::numeric_limits<double>::quiet_NaN() |
Mean or NaN.
Definition at line 139 of file return_stats.hpp.
| std::int64_t pineforge::hpo::ReturnSeriesStats::nonfinite_returns = 0 |
Diagnostic, not on the wire: intervals whose return was not finite.
Such an interval is neither counted in T nor in skipped, and it makes the statistics null (status 8).
Definition at line 152 of file return_stats.hpp.
| ReturnPeriodFailure pineforge::hpo::ReturnSeriesStats::period_failure = ReturnPeriodFailure::None |
Diagnostic, not on the wire: the reason behind status PeriodUnavailable.
Definition at line 146 of file return_stats.hpp.
| double pineforge::hpo::ReturnSeriesStats::periods_per_year = std::numeric_limits<double>::quiet_NaN() |
P or NaN.
Definition at line 138 of file return_stats.hpp.
| double pineforge::hpo::ReturnSeriesStats::sharpe_per_period = std::numeric_limits<double>::quiet_NaN() |
Sharpe or NaN.
Definition at line 141 of file return_stats.hpp.
| double pineforge::hpo::ReturnSeriesStats::skew = std::numeric_limits<double>::quiet_NaN() |
Skewness or NaN.
Definition at line 142 of file return_stats.hpp.
| std::optional<std::int64_t> pineforge::hpo::ReturnSeriesStats::skipped |
Skipped intervals; empty with count.
Definition at line 137 of file return_stats.hpp.
| ReturnStatsStatus pineforge::hpo::ReturnSeriesStats::status = ReturnStatsStatus::NonfiniteInput |
Series status; a default-constructed series is the null series with status 4.
Definition at line 135 of file return_stats.hpp.
| double pineforge::hpo::ReturnSeriesStats::std_dev = std::numeric_limits<double>::quiet_NaN() |
Wire field std.
Definition at line 140 of file return_stats.hpp.