pub struct AccountState {
pub total_position_value: f64,
pub position_by_symbol: HashMap<String, f64>,
pub daily_realized_loss: f64,
pub daily_starting_equity: f64,
pub windowed_loss: f64,
}Expand description
Snapshot of current account state used for risk evaluation.
Fields§
§total_position_value: f64Total position value across all symbols (in USD).
position_by_symbol: HashMap<String, f64>Per-symbol position values (in USD).
daily_realized_loss: f64Realized loss for the current day (positive value = loss).
daily_starting_equity: f64Starting equity for the day (for percentage calculation).
windowed_loss: f64Losses within the circuit breaker window (positive = loss).
Trait Implementations§
Source§impl Clone for AccountState
impl Clone for AccountState
Source§fn clone(&self) -> AccountState
fn clone(&self) -> AccountState
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 AccountState
impl Debug for AccountState
Auto Trait Implementations§
impl Freeze for AccountState
impl RefUnwindSafe for AccountState
impl Send for AccountState
impl Sync for AccountState
impl Unpin for AccountState
impl UnsafeUnpin for AccountState
impl UnwindSafe for AccountState
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