37 [[nodiscard]]
constexpr bool reads_totals() const noexcept {
42static_assert(std::is_trivially_copyable_v<RiskLimits> &&
sizeof(RiskLimits) == 96);
49 static constexpr std::int64_t
kUnlimited = std::numeric_limits<std::int64_t>::max();
Fixed<Tag>: int64 fixed point with a global 1e-8 scale (ADR-0001).
Definition strategy.hpp:16
Fixed< struct QtyTag > Qty
Definition fixed_point.hpp:333
static constexpr Fixed max() noexcept
Definition fixed_point.hpp:165
constexpr bool is_positive() const noexcept
Definition fixed_point.hpp:302
Qty buy_qty
Largest buy / sell passing max_position (position plus open orders on that side), rounded down to the...
Definition risk_limits.hpp:58
Qty balance_buy_qty
Largest buy / sell at the book's mid the account's balance on the venue covers ([risk] check_balance,...
Definition risk_limits.hpp:82
Notional net_sell_notional
Definition risk_limits.hpp:69
Notional exposure_sell_notional
Definition risk_limits.hpp:76
Notional max_order_notional
per order (max_order_notional)
Definition risk_limits.hpp:55
Notional exposure_buy_notional
The same two caps as the notional of one order on this instrument, in its settlement currency (the en...
Definition risk_limits.hpp:75
Qty balance_sell_qty
Definition risk_limits.hpp:83
Notional loss_budget
max_loss plus the net PnL it is measured against; the kill switch trips at zero or below.
Definition risk_limits.hpp:78
Qty underlying_buy_qty
Largest buy / sell of this instrument passing [risk.underlying] max_net (the underlying's net plus it...
Definition risk_limits.hpp:63
Notional net_buy_notional
Definition risk_limits.hpp:68
Qty max_order_qty
per order (max_order_qty)
Definition risk_limits.hpp:54
static constexpr std::int64_t kUnlimited
Definition risk_limits.hpp:51
Notional gross_notional
Exposure an order that does not reduce its position may add: max_gross_notional minus the gross expos...
Definition risk_limits.hpp:67
Qty underlying_sell_qty
Definition risk_limits.hpp:64
Qty sell_qty
Definition risk_limits.hpp:59
std::int64_t order_tokens
orders the rate limiter admits now (orders_per_sec)
Definition risk_limits.hpp:52
std::int64_t open_orders
more open orders on the instrument (max_open_orders)
Definition risk_limits.hpp:53
Notional max_loss
trip when net pnl <= -max_loss; 0 = disabled
Definition risk_limits.hpp:29
std::uint32_t burst
bucket capacity (defaults to orders_per_sec)
Definition risk_limits.hpp:31
Qty max_order_qty
0 = unlimited
Definition risk_limits.hpp:18
Notional max_net_notional
Definition risk_limits.hpp:28
std::int64_t price_collar_bps
vs mid; 0 = disabled
Definition risk_limits.hpp:22
Notional max_order_notional
0 = unlimited
Definition risk_limits.hpp:19
Qty max_position
absolute, predicted (position + same-side open); 0 = unlimited
Definition risk_limits.hpp:20
Notional max_gross_notional
Portfolio exposure at the last marks, over every instrument; 0 = unlimited.
Definition risk_limits.hpp:27
std::uint32_t max_feed_lag_ms
Feed-lag gate (core/venue_health.hpp): while a venue's market data arrives more than this much later ...
Definition risk_limits.hpp:36
bool stp
self-trade prevention against our own resting orders
Definition risk_limits.hpp:32
std::int64_t fat_finger_bps
vs last trade; 0 = disabled
Definition risk_limits.hpp:23
Duration stale_md
reject if book older than this; 0 = disabled
Definition risk_limits.hpp:24
constexpr bool reads_totals() const noexcept
A limit that reads the portfolio totals ([accounting] converts them).
Definition risk_limits.hpp:39
std::uint32_t orders_per_sec
token bucket rate; 0 = unlimited
Definition risk_limits.hpp:30
std::uint32_t max_open_orders
per instrument; 0 = unlimited
Definition risk_limits.hpp:21