pub mod nanobook_risk
pub mod nanobook_risk::checks
pub fn nanobook_risk::checks::check_batch(config: &nanobook_risk::config::RiskConfig, orders: &[(nanobook::types::Symbol, nanobook_broker::types::BrokerSide, u64, i64)], account: &nanobook_broker::types::Account, current_positions: &[(nanobook::types::Symbol, i64)], target_weights: &[(nanobook::types::Symbol, f64)]) -> nanobook_risk::report::RiskReport
pub mod nanobook_risk::config
pub struct nanobook_risk::config::RiskConfig
pub nanobook_risk::config::RiskConfig::allow_short: bool
pub nanobook_risk::config::RiskConfig::max_batch_value_cents: i64
pub nanobook_risk::config::RiskConfig::max_drawdown_pct: f64
pub nanobook_risk::config::RiskConfig::max_leverage: f64
pub nanobook_risk::config::RiskConfig::max_order_value_cents: i64
pub nanobook_risk::config::RiskConfig::max_position_pct: f64
pub nanobook_risk::config::RiskConfig::max_short_pct: f64
pub nanobook_risk::config::RiskConfig::max_trade_usd: f64
pub nanobook_risk::config::RiskConfig::min_trade_usd: f64
impl nanobook_risk::config::RiskConfig
pub fn nanobook_risk::config::RiskConfig::validate(&self) -> core::result::Result<(), alloc::string::String>
impl core::default::Default for nanobook_risk::config::RiskConfig
pub fn nanobook_risk::config::RiskConfig::default() -> Self
pub mod nanobook_risk::error
pub enum nanobook_risk::error::RiskError
pub nanobook_risk::error::RiskError::InvalidConfig(alloc::string::String)
impl core::error::Error for nanobook_risk::error::RiskError
impl core::fmt::Display for nanobook_risk::error::RiskError
pub fn nanobook_risk::error::RiskError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
pub mod nanobook_risk::report
pub enum nanobook_risk::report::RiskStatus
pub nanobook_risk::report::RiskStatus::Fail
pub nanobook_risk::report::RiskStatus::Pass
pub nanobook_risk::report::RiskStatus::Warn
impl core::fmt::Display for nanobook_risk::report::RiskStatus
pub fn nanobook_risk::report::RiskStatus::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
pub struct nanobook_risk::report::RiskCheck
pub nanobook_risk::report::RiskCheck::detail: alloc::string::String
pub nanobook_risk::report::RiskCheck::name: &'static str
pub nanobook_risk::report::RiskCheck::status: nanobook_risk::report::RiskStatus
pub struct nanobook_risk::report::RiskReport
pub nanobook_risk::report::RiskReport::checks: alloc::vec::Vec<nanobook_risk::report::RiskCheck>
impl nanobook_risk::report::RiskReport
pub fn nanobook_risk::report::RiskReport::has_failures(&self) -> bool
pub fn nanobook_risk::report::RiskReport::has_warnings(&self) -> bool
impl core::fmt::Display for nanobook_risk::report::RiskReport
pub fn nanobook_risk::report::RiskReport::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
pub enum nanobook_risk::RiskError
pub nanobook_risk::RiskError::InvalidConfig(alloc::string::String)
impl core::error::Error for nanobook_risk::error::RiskError
impl core::fmt::Display for nanobook_risk::error::RiskError
pub fn nanobook_risk::error::RiskError::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
pub enum nanobook_risk::RiskStatus
pub nanobook_risk::RiskStatus::Fail
pub nanobook_risk::RiskStatus::Pass
pub nanobook_risk::RiskStatus::Warn
impl core::fmt::Display for nanobook_risk::report::RiskStatus
pub fn nanobook_risk::report::RiskStatus::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
pub struct nanobook_risk::RiskCheck
pub nanobook_risk::RiskCheck::detail: alloc::string::String
pub nanobook_risk::RiskCheck::name: &'static str
pub nanobook_risk::RiskCheck::status: nanobook_risk::report::RiskStatus
pub struct nanobook_risk::RiskConfig
pub nanobook_risk::RiskConfig::allow_short: bool
pub nanobook_risk::RiskConfig::max_batch_value_cents: i64
pub nanobook_risk::RiskConfig::max_drawdown_pct: f64
pub nanobook_risk::RiskConfig::max_leverage: f64
pub nanobook_risk::RiskConfig::max_order_value_cents: i64
pub nanobook_risk::RiskConfig::max_position_pct: f64
pub nanobook_risk::RiskConfig::max_short_pct: f64
pub nanobook_risk::RiskConfig::max_trade_usd: f64
pub nanobook_risk::RiskConfig::min_trade_usd: f64
impl nanobook_risk::config::RiskConfig
pub fn nanobook_risk::config::RiskConfig::validate(&self) -> core::result::Result<(), alloc::string::String>
impl core::default::Default for nanobook_risk::config::RiskConfig
pub fn nanobook_risk::config::RiskConfig::default() -> Self
pub struct nanobook_risk::RiskEngine
impl nanobook_risk::RiskEngine
pub fn nanobook_risk::RiskEngine::check_batch(&self, orders: &[(nanobook::types::Symbol, nanobook_broker::types::BrokerSide, u64, i64)], account: &nanobook_broker::types::Account, current_positions: &[(nanobook::types::Symbol, i64)], target_weights: &[(nanobook::types::Symbol, f64)]) -> nanobook_risk::report::RiskReport
pub fn nanobook_risk::RiskEngine::check_order(&self, symbol: &nanobook::types::Symbol, side: nanobook_broker::types::BrokerSide, quantity: u64, price_cents: i64, account: &nanobook_broker::types::Account, current_positions: &[(nanobook::types::Symbol, i64)]) -> nanobook_risk::report::RiskReport
pub fn nanobook_risk::RiskEngine::config(&self) -> &nanobook_risk::config::RiskConfig
pub fn nanobook_risk::RiskEngine::new(config: nanobook_risk::config::RiskConfig) -> core::result::Result<Self, nanobook_risk::error::RiskError>
pub struct nanobook_risk::RiskReport
pub nanobook_risk::RiskReport::checks: alloc::vec::Vec<nanobook_risk::report::RiskCheck>
impl nanobook_risk::report::RiskReport
pub fn nanobook_risk::report::RiskReport::has_failures(&self) -> bool
pub fn nanobook_risk::report::RiskReport::has_warnings(&self) -> bool
impl core::fmt::Display for nanobook_risk::report::RiskReport
pub fn nanobook_risk::report::RiskReport::fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result
