Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Module: risk

Source: risk.rs

QFL risk engine — runtime-enforced trading limits.

Intercepts orders before they reach the exchange connector. Rejects orders that violate configured limits (max position, max notional, max orders/cycle).

Entry point: [RiskEngine::check_order()].

Structs

pub struct RiskLimits

#![allow(unused)]
fn main() {
pub struct RiskLimits {
    pub max_position: f64,
    pub max_order_notional: f64,
    pub max_orders_per_cycle: u32,
};
}

Runtime-enforced risk limits.

pub struct RiskEngine

#![allow(unused)]
fn main() {
pub struct RiskEngine {
    pub limits: RiskLimits,
    pub current_position: f64,
    orders_this_cycle: u32,
};
}

Runtime risk engine.

Enums

pub enum RiskVerdict

#![allow(unused)]
fn main() {
pub enum RiskVerdict {
    Allowed,
    Rejected(String,),
}
}

Result of a risk check.