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>
|
| 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).
|
| |
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).
◆ 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()
The rows' orders, then their fills.
◆ compute_metrics