FastMM documentation
FastMM C++ API 0.14.0
Public headers, tier 1 and tier 2
Loading...
Searching...
No Matches
fastmm::bt::OrderStats Class Reference

The order half of the metrics, kept as a run goes: the counts of new orders, cancels and replaces, the virtual tick-to-order latency, and each new order's first fill for the fill quality's quotes filled and time to fill (a replace chain's fills count for the new order that began it, at the earliest of them). More...

#include <fastmm/backtest/metrics.hpp>

Public Member Functions

void on_order (std::uint8_t kind, std::uint64_t id, std::uint64_t orig, std::int64_t venue_ts, std::int64_t trigger_ts)
 An order message sent: kind is kOrderKindNew, Cancel or Replace, orig the order a replace replaces, venue_ts its arrival at the venue (0: lost), trigger_ts the T0 of the event that caused it (0: unknown).
 
void on_fill (std::uint64_t id, std::int64_t ts)
 
void on_end (std::uint64_t id)
 The order can no longer fill (rejected, cancelled, replaced, expired or filled).
 

Static Public Member Functions

static OrderStats of (const OrderRows &orders, const FillRows &fills)
 The rows' orders, then their fills.
 

Friends

Metrics compute_metrics (const EquityRows &, const FillRows &, OrderStats &, const MetricsInputs &)
 

Detailed Description

The order half of the metrics, kept as a run goes: the counts of new orders, cancels and replaces, the virtual tick-to-order latency, and each new order's first fill for the fill quality's quotes filled and time to fill (a replace chain's fills count for the new order that began it, at the earliest of them).

It holds only the chains that can still fill, so a run need not keep its order rows (BacktestConfig::keep_orders).

Member Function Documentation

◆ on_order()

void fastmm::bt::OrderStats::on_order ( std::uint8_t  kind,
std::uint64_t  id,
std::uint64_t  orig,
std::int64_t  venue_ts,
std::int64_t  trigger_ts 
)

An order message sent: kind is kOrderKindNew, Cancel or Replace, orig the order a replace replaces, venue_ts its arrival at the venue (0: lost), trigger_ts the T0 of the event that caused it (0: unknown).

◆ on_fill()

void fastmm::bt::OrderStats::on_fill ( std::uint64_t  id,
std::int64_t  ts 
)

◆ on_end()

void fastmm::bt::OrderStats::on_end ( std::uint64_t  id)

The order can no longer fill (rejected, cancelled, replaced, expired or filled).

◆ of()

static OrderStats fastmm::bt::OrderStats::of ( const OrderRows &  orders,
const FillRows &  fills 
)
static

The rows' orders, then their fills.

Friends And Related Symbol Documentation

◆ compute_metrics

Metrics compute_metrics ( const EquityRows &  ,
const FillRows &  ,
OrderStats &  ,
const MetricsInputs &   
)
friend