38enum class Feature : std::uint8_t {
84 [[nodiscard]] std::string
table()
const;
95 std::span<const double> values,
96 std::string_view name,
FeatureTable: book features and forward mid moves, one row per qualifying market-data event,...
Definition feature_table.hpp:22
SignalEval evaluate_feature(const FeatureTable &t, Feature f, const EvalConfig &cfg={})
evaluate_signal() over feature_values(t, f).
Feature
A built-in column, so the common signals need no array from the caller.
Definition signal_eval.hpp:40
@ Spread
(best ask - best bid) / mid, in basis points
@ Imbalance
(bid qty - ask qty) / (bid qty + ask qty) at the touch, in [-1, 1]
@ MicropriceEdge
(microprice - mid) / mid, in basis points
SignalEval evaluate_signal(const FeatureTable &t, std::span< const double > values, std::string_view name, const EvalConfig &cfg={})
values must hold one signal value per row of t, in row order.
std::string_view to_string(Feature f) noexcept
std::vector< double > feature_values(const FeatureTable &t, Feature f)
The feature of every row, in row order, in the units above.
std::string horizon_label(std::int64_t ns)
"100ms", "1s", "1m": the shortest exact unit, the spelling MarkoutHorizon::label() uses.
Definition signal_eval.hpp:89
std::uint32_t buckets
equal-count buckets of the signal; 10 is a decile table
Definition signal_eval.hpp:90
std::uint32_t blocks
contiguous equal-sized blocks the IC is recomputed over
Definition signal_eval.hpp:91
Definition feature_table.hpp:63
Definition signal_eval.hpp:61
std::vector< double > block_ic
The same coefficient per contiguous equal-sized block of the measured rows.
Definition signal_eval.hpp:68
double block_ic_stdev
population standard deviation over the blocks
Definition signal_eval.hpp:70
std::uint64_t excluded_no_mid
Definition signal_eval.hpp:65
std::uint64_t n
rows that had a forward mid at this horizon
Definition signal_eval.hpp:63
std::uint64_t excluded_past_end
Definition signal_eval.hpp:64
std::string label() const
Definition signal_eval.hpp:76
double block_sign_agreement
share of blocks whose IC has the sign of ic
Definition signal_eval.hpp:73
double block_ic_max
Definition signal_eval.hpp:72
std::vector< SignalBucket > buckets
in ascending signal order
Definition signal_eval.hpp:74
std::int64_t horizon_ns
Definition signal_eval.hpp:62
double ic
Spearman, signal against forward mid move; NaN when n < 2.
Definition signal_eval.hpp:66
double block_ic_min
Definition signal_eval.hpp:71
double block_ic_mean
Definition signal_eval.hpp:69
Definition signal_eval.hpp:50
double half_spread_bps
(mid - best bid) / mid; (buy_bps + sell_bps) / 2
Definition signal_eval.hpp:58
double forward_bps
mean (forward mid - mid) / mid, basis points
Definition signal_eval.hpp:55
std::uint64_t n
Definition signal_eval.hpp:53
double sell_bps
resting ask filled at the touch, marked at the horizon
Definition signal_eval.hpp:57
double mean_signal
Definition signal_eval.hpp:54
double hi
Definition signal_eval.hpp:52
double buy_bps
resting bid filled at the touch, marked at the horizon
Definition signal_eval.hpp:56
double lo
signal range of the bucket, inclusive
Definition signal_eval.hpp:51
Definition signal_eval.hpp:79
std::vector< HorizonEval > horizons
Definition signal_eval.hpp:83
std::uint64_t rows
rows of the table the signal was measured on
Definition signal_eval.hpp:81
std::uint32_t blocks
blocks the sample was split into
Definition signal_eval.hpp:82
std::string table() const
Per horizon: the coverage and IC line, then the bucket table.
std::string signal
Definition signal_eval.hpp:80