FastMM documentation
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::research Namespace Reference

Classes

struct  EvalConfig
 
struct  FeatureConfig
 
struct  FeatureRows
 
struct  FeatureTable
 
struct  HorizonCoverage
 Per horizon, how many rows got a forward mid and why the rest did not. More...
 
struct  HorizonEval
 
struct  SignalBucket
 
struct  SignalEval
 

Enumerations

enum class  Feature : std::uint8_t { Imbalance = 0 , MicropriceEdge = 1 , Spread = 2 }
 A built-in column, so the common signals need no array from the caller. More...
 

Functions

std::string horizon_label (std::int64_t ns)
 "100ms", "1s", "1m": the shortest exact unit, the spelling MarkoutHorizon::label() uses.
 
std::vector< Duration > default_horizons ()
 kDefaultHorizonsNs as Durations.
 
FeatureTable extract_features (MdSource &source, const FeatureConfig &cfg={})
 Reads source from its current position to the end.
 
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.
 
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.
 
SignalEval evaluate_feature (const FeatureTable &t, Feature f, const EvalConfig &cfg={})
 evaluate_signal() over feature_values(t, f).
 

Variables

constexpr std::int64_t kDefaultHorizonsNs []
 Horizons measured by default, in nanoseconds of event time: 100 ms, 1 s, 10 s, 1 minute.
 

Enumeration Type Documentation

◆ Feature

enum class fastmm::research::Feature : std::uint8_t
strong

A built-in column, so the common signals need no array from the caller.

Enumerator
Imbalance 

(bid qty - ask qty) / (bid qty + ask qty) at the touch, in [-1, 1]

MicropriceEdge 

(microprice - mid) / mid, in basis points

Spread 

(best ask - best bid) / mid, in basis points

Function Documentation

◆ horizon_label()

std::string fastmm::research::horizon_label ( std::int64_t  ns)

"100ms", "1s", "1m": the shortest exact unit, the spelling MarkoutHorizon::label() uses.

◆ default_horizons()

std::vector< Duration > fastmm::research::default_horizons ( )

kDefaultHorizonsNs as Durations.

◆ extract_features()

FeatureTable fastmm::research::extract_features ( MdSource &  source,
const FeatureConfig &  cfg = {} 
)

Reads source from its current position to the end.

Throws std::invalid_argument when instruments is 0 or imbalance_levels is 0.

◆ to_string()

std::string_view fastmm::research::to_string ( Feature  f)
noexcept

◆ feature_values()

std::vector< double > fastmm::research::feature_values ( const FeatureTable &  t,
Feature  f 
)

The feature of every row, in row order, in the units above.

◆ evaluate_signal()

SignalEval fastmm::research::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.

Throws std::invalid_argument on a length mismatch or a bucket/block count of 0.

◆ evaluate_feature()

SignalEval fastmm::research::evaluate_feature ( const FeatureTable &  t,
Feature  f,
const EvalConfig &  cfg = {} 
)

evaluate_signal() over feature_values(t, f).

Variable Documentation

◆ kDefaultHorizonsNs

constexpr std::int64_t fastmm::research::kDefaultHorizonsNs[]
inlineconstexpr
Initial value:
= {
100'000'000LL, 1'000'000'000LL, 10'000'000'000LL, 60'000'000'000LL}

Horizons measured by default, in nanoseconds of event time: 100 ms, 1 s, 10 s, 1 minute.