|
PineForge HPO 0.1.0
Native hyperparameter optimization for PineForge strategies
|
Immutable in-memory OHLCV input shared by independent trial executions. More...
#include <pineforge/hpo/dataset.hpp>
Public Member Functions | |
| Dataset (std::vector< pf_bar_t > bars) | |
| Takes ownership of validated bars. | |
| const pf_bar_t * | data () const noexcept |
| Returns a const pointer suitable for PineForge backtest calls. | |
| std::size_t | size () const noexcept |
| Returns the number of bars. | |
| bool | empty () const noexcept |
| Returns whether the dataset contains no bars. | |
| const std::vector< pf_bar_t > & | bars () const noexcept |
| Returns the immutable owning bar container. | |
Static Public Member Functions | |
| static Dataset | load_csv (const std::filesystem::path &path) |
Loads timestamp,open,high,low,close,volume columns from a CSV file. | |
Immutable in-memory OHLCV input shared by independent trial executions.
The public API intentionally exposes only const access even though the legacy PineForge C ABI accepts pf_bar_t* rather than const pf_bar_t*. Timestamps must be strictly increasing and every OHLCV value must be finite.
Definition at line 17 of file dataset.hpp.
|
explicit |
Takes ownership of validated bars.
| std::invalid_argument | for non-finite values or non-increasing timestamps. |
|
inlinenoexcept |
Returns the immutable owning bar container.
Definition at line 38 of file dataset.hpp.
|
inlinenoexcept |
Returns a const pointer suitable for PineForge backtest calls.
Definition at line 32 of file dataset.hpp.
|
inlinenoexcept |
Returns whether the dataset contains no bars.
Definition at line 36 of file dataset.hpp.
|
static |
Loads timestamp,open,high,low,close,volume columns from a CSV file.
Header matching is ASCII case-insensitive, blank data lines are ignored, and quoted CSV fields are supported. The result contains at least one bar.
| std::runtime_error | when the file cannot be read or its CSV data is invalid. |
| std::invalid_argument | when parsed bars violate Dataset invariants. |
|
inlinenoexcept |
Returns the number of bars.
Definition at line 34 of file dataset.hpp.