pub struct RiskConfig {
pub max_position_size: f64,
pub max_daily_loss: f64,
pub max_drawdown: f64,
pub max_leverage: f64,
pub default_stop_loss: f64,
pub default_take_profit: f64,
pub max_sector_concentration: f64,
pub enable_circuit_breakers: bool,
pub circuit_breaker_cooldown_secs: u64,
}Expand description
Risk management configuration
Fields§
§max_position_size: f64Maximum position size as percentage of portfolio (0.0-1.0)
max_daily_loss: f64Maximum daily loss as percentage of portfolio (0.0-1.0)
max_drawdown: f64Maximum drawdown as percentage (0.0-1.0)
max_leverage: f64Maximum leverage allowed
default_stop_loss: f64Stop loss percentage (0.0-1.0)
default_take_profit: f64Take profit percentage (0.0-1.0)
max_sector_concentration: f64Maximum sector concentration (0.0-1.0)
enable_circuit_breakers: boolEnable circuit breakers
circuit_breaker_cooldown_secs: u64Circuit breaker cool-down period in seconds
Trait Implementations§
Source§impl Clone for RiskConfig
impl Clone for RiskConfig
Source§fn clone(&self) -> RiskConfig
fn clone(&self) -> RiskConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RiskConfig
impl Debug for RiskConfig
Source§impl Default for RiskConfig
impl Default for RiskConfig
Source§impl<'de> Deserialize<'de> for RiskConfig
impl<'de> Deserialize<'de> for RiskConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for RiskConfig
impl Serialize for RiskConfig
Source§impl Validate for RiskConfig
impl Validate for RiskConfig
Source§impl<'v_a> ValidateArgs<'v_a> for RiskConfig
impl<'v_a> ValidateArgs<'v_a> for RiskConfig
Auto Trait Implementations§
impl Freeze for RiskConfig
impl RefUnwindSafe for RiskConfig
impl Send for RiskConfig
impl Sync for RiskConfig
impl Unpin for RiskConfig
impl UnwindSafe for RiskConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more