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

#include <fastmm/core/risk_limits.hpp>

Public Member Functions

constexpr bool reads_totals () const noexcept
 A limit that reads the portfolio totals ([accounting] converts them).
 

Public Attributes

Qty max_order_qty {}
 0 = unlimited
 
Notional max_order_notional {}
 0 = unlimited
 
Qty max_position {}
 absolute, predicted (position + same-side open); 0 = unlimited
 
std::uint32_t max_open_orders = 0
 per instrument; 0 = unlimited
 
std::int64_t price_collar_bps = 0
 vs mid; 0 = disabled
 
std::int64_t fat_finger_bps = 0
 vs last trade; 0 = disabled
 
Duration stale_md {}
 reject if book older than this; 0 = disabled
 
Notional max_gross_notional {}
 Portfolio exposure at the last marks, over every instrument; 0 = unlimited.
 
Notional max_net_notional {}
 
Notional max_loss {}
 trip when net pnl <= -max_loss; 0 = disabled
 
std::uint32_t orders_per_sec = 0
 token bucket rate; 0 = unlimited
 
std::uint32_t burst = 0
 bucket capacity (defaults to orders_per_sec)
 
bool stp = true
 self-trade prevention against our own resting orders
 
std::uint32_t max_feed_lag_ms = 0
 Feed-lag gate (core/venue_health.hpp): while a venue's market data arrives more than this much later than its baseline, its quotes are pulled and orders that could rest there without reducing the position are refused (FeedLag); 0 = off.
 

Member Function Documentation

◆ reads_totals()

constexpr bool fastmm::RiskLimits::reads_totals ( ) const
inlineconstexprnoexcept

A limit that reads the portfolio totals ([accounting] converts them).

Member Data Documentation

◆ max_order_qty

Qty fastmm::RiskLimits::max_order_qty {}

0 = unlimited

◆ max_order_notional

Notional fastmm::RiskLimits::max_order_notional {}

0 = unlimited

◆ max_position

Qty fastmm::RiskLimits::max_position {}

absolute, predicted (position + same-side open); 0 = unlimited

◆ max_open_orders

std::uint32_t fastmm::RiskLimits::max_open_orders = 0

per instrument; 0 = unlimited

◆ price_collar_bps

std::int64_t fastmm::RiskLimits::price_collar_bps = 0

vs mid; 0 = disabled

◆ fat_finger_bps

std::int64_t fastmm::RiskLimits::fat_finger_bps = 0

vs last trade; 0 = disabled

◆ stale_md

Duration fastmm::RiskLimits::stale_md {}

reject if book older than this; 0 = disabled

◆ max_gross_notional

Notional fastmm::RiskLimits::max_gross_notional {}

Portfolio exposure at the last marks, over every instrument; 0 = unlimited.

Gross is the sum of |position|, net the signed sum: a hedged pair is small in net and large in gross.

◆ max_net_notional

Notional fastmm::RiskLimits::max_net_notional {}

◆ max_loss

Notional fastmm::RiskLimits::max_loss {}

trip when net pnl <= -max_loss; 0 = disabled

◆ orders_per_sec

std::uint32_t fastmm::RiskLimits::orders_per_sec = 0

token bucket rate; 0 = unlimited

◆ burst

std::uint32_t fastmm::RiskLimits::burst = 0

bucket capacity (defaults to orders_per_sec)

◆ stp

bool fastmm::RiskLimits::stp = true

self-trade prevention against our own resting orders

◆ max_feed_lag_ms

std::uint32_t fastmm::RiskLimits::max_feed_lag_ms = 0

Feed-lag gate (core/venue_health.hpp): while a venue's market data arrives more than this much later than its baseline, its quotes are pulled and orders that could rest there without reducing the position are refused (FeedLag); 0 = off.