|
FastMM C++ API 0.6.0
Public headers, tier 1 and tier 2
|
#include <fastmm/core/engine_config.hpp>
Public Attributes | |
| std::uint64_t | session_id = 0 |
| std::uint64_t | rng_seed = 1 |
| std::uint16_t | session_epoch = 1 |
| std::uint32_t | max_events_per_step = 64 |
| Duration | crossed_grace = milliseconds(100) |
| Duration | latency_publish_interval = seconds(1) |
| Duration | reject_log_interval = seconds(10) |
| Risk rejects are logged at WARN: the first of each reason, then at most one line per reason per interval with the number suppressed in between (0 logs every reject). | |
| Duration | max_param_age {} |
| [strategy] max_param_age_ms: quoting is disabled before the first ParamUpdate and while none was applied for this long (zero: off). | |
| std::string | state_file |
| [strategy] state_file / state_interval_s (strategies/hooks.hpp KeepsState): the engine takes the strategy's state() every state_interval and at the end for whoever runs it to write to state_file (Engine::take_strategy_state; empty: never), and hands initial_state to restore() once, after on_start (empty: nothing to restore). | |
| Duration | state_interval = seconds(300) |
| std::string | initial_state |
| Duration | state_snapshot_interval {} |
| [strategy] state_snapshot_interval_s: with a journal, the strategy's state() and the positions are written to it this often (StrategyStateMsg; zero: never). | |
| Duration | ack_timeout {} |
| [engine] ack_timeout_ms: an order still waiting for its ack this long is force-cancelled, so a lost request cannot hold a pool slot, a max_open_orders slot and max_position exposure for good (zero: off). | |
| Duration | flatten_interval = milliseconds(500) |
Operator flatten (ControlCommand::Flatten, the control socket's flatten): how often the engine looks at the remaining position and sends the next reduce-only slice, how long it keeps trying (zero: until it is flat or the operator stops it) and the slippage allowance a flatten without --max-slippage-bps uses. | |
| Duration | flatten_timeout = seconds(60) |
| std::int64_t | flatten_slippage_bps = 25 |
| std::int64_t | queue_conservatism_bps = 10'000 |
| [engine] queue_conservatism (a backtest: [backtest] queue_conservatism), in bps of 1: how much of a level's shrink ahead of our order the queue estimate (StrategyContext::queue_ahead) credits to cancels ahead of it. | |
| Notional | pnl_carry {} |
| Net PnL carried over from earlier sessions ([risk] max_loss is a budget for the deployment, not per process); fastmm-live reads it from the durable kill state (core/session_state.hpp). | |
| bool | quoting_enabled = true |
| std::uint32_t | await_reconcile = 0 |
| Bit v: venue v's positions are not current until its first reconciliation ends. | |
| int | cpu = -1 |
| SpinMode | spin_mode = SpinMode::Busy |
| RiskLimits | risk |
| QuoteParams | quotes |
| FxPlan | fx |
| [accounting]: the settlement currencies and their FX sources (inactive: nothing converted). | |
| FeeTable | fees |
| Maker/taker rates per instrument (fee_table, config/config.hpp), what StrategyContext::fees reports. | |
| UnderlyingPlan | underlying |
| [risk.underlying]: the underlyings with a net position limit and their instruments (inactive: none). | |
| BalanceConfig | balance |
| [risk] check_balance and the initial margin rates ([[instruments]] initial_margin) the balance check and the estimate use (core/balance_book.hpp). | |
| PerpConfig | perp |
| [accounting] mark, stale_mark_ms, stale_funding_ms: what a derivative's position is valued at and when the venue's mark, index and funding are stale (core/perp_book.hpp). | |
| PoolPlan | pools |
| [venues. | |
| std::uint64_t fastmm::EngineConfig::session_id = 0 |
| std::uint64_t fastmm::EngineConfig::rng_seed = 1 |
| std::uint16_t fastmm::EngineConfig::session_epoch = 1 |
| std::uint32_t fastmm::EngineConfig::max_events_per_step = 64 |
| Duration fastmm::EngineConfig::crossed_grace = milliseconds(100) |
Risk rejects are logged at WARN: the first of each reason, then at most one line per reason per interval with the number suppressed in between (0 logs every reject).
| Duration fastmm::EngineConfig::max_param_age {} |
[strategy] max_param_age_ms: quoting is disabled before the first ParamUpdate and while none was applied for this long (zero: off).
| std::string fastmm::EngineConfig::state_file |
[strategy] state_file / state_interval_s (strategies/hooks.hpp KeepsState): the engine takes the strategy's state() every state_interval and at the end for whoever runs it to write to state_file (Engine::take_strategy_state; empty: never), and hands initial_state to restore() once, after on_start (empty: nothing to restore).
The loader reads the file, not the engine.
| std::string fastmm::EngineConfig::initial_state |
| Duration fastmm::EngineConfig::state_snapshot_interval {} |
[strategy] state_snapshot_interval_s: with a journal, the strategy's state() and the positions are written to it this often (StrategyStateMsg; zero: never).
The bytes handed to restore() are written once at the start whenever there are some.
| Duration fastmm::EngineConfig::ack_timeout {} |
[engine] ack_timeout_ms: an order still waiting for its ack this long is force-cancelled, so a lost request cannot hold a pool slot, a max_open_orders slot and max_position exposure for good (zero: off).
| Duration fastmm::EngineConfig::flatten_interval = milliseconds(500) |
Operator flatten (ControlCommand::Flatten, the control socket's flatten): how often the engine looks at the remaining position and sends the next reduce-only slice, how long it keeps trying (zero: until it is flat or the operator stops it) and the slippage allowance a flatten without --max-slippage-bps uses.
| std::int64_t fastmm::EngineConfig::flatten_slippage_bps = 25 |
| std::int64_t fastmm::EngineConfig::queue_conservatism_bps = 10'000 |
[engine] queue_conservatism (a backtest: [backtest] queue_conservatism), in bps of 1: how much of a level's shrink ahead of our order the queue estimate (StrategyContext::queue_ahead) credits to cancels ahead of it.
10000: none.
| Notional fastmm::EngineConfig::pnl_carry {} |
Net PnL carried over from earlier sessions ([risk] max_loss is a budget for the deployment, not per process); fastmm-live reads it from the durable kill state (core/session_state.hpp).
| bool fastmm::EngineConfig::quoting_enabled = true |
| std::uint32_t fastmm::EngineConfig::await_reconcile = 0 |
Bit v: venue v's positions are not current until its first reconciliation ends.
A live session sets it for the venues that replay executions at connect: until then the position is the store's plus whatever the replay has booked so far, and an order sized, hedged or risk-checked on it could double a hedge or pass a limit. No order is sent and quoting stays off until every such venue has reconciled (journal header await_reconcile, so a replay does the same).
| int fastmm::EngineConfig::cpu = -1 |
| SpinMode fastmm::EngineConfig::spin_mode = SpinMode::Busy |
| RiskLimits fastmm::EngineConfig::risk |
| QuoteParams fastmm::EngineConfig::quotes |
| FxPlan fastmm::EngineConfig::fx |
[accounting]: the settlement currencies and their FX sources (inactive: nothing converted).
| FeeTable fastmm::EngineConfig::fees |
Maker/taker rates per instrument (fee_table, config/config.hpp), what StrategyContext::fees reports.
The simulated venue charges fills with the same table; a live venue reports its own.
| UnderlyingPlan fastmm::EngineConfig::underlying |
[risk.underlying]: the underlyings with a net position limit and their instruments (inactive: none).
| BalanceConfig fastmm::EngineConfig::balance |
[risk] check_balance and the initial margin rates ([[instruments]] initial_margin) the balance check and the estimate use (core/balance_book.hpp).
| PerpConfig fastmm::EngineConfig::perp |
[accounting] mark, stale_mark_ms, stale_funding_ms: what a derivative's position is valued at and when the venue's mark, index and funding are stale (core/perp_book.hpp).
| PoolPlan fastmm::EngineConfig::pools |
[venues.
<x>] pool_of: the accounts behind each venue (core/account_pool.hpp). A new order on an instrument whose venue has members goes to one of them (NewOrderRequest::account, else by balance and remaining order window), and the order keeps it.