pub struct TradeStats {
pub total_trades: usize,
pub winrate: f64,
pub profit_factor: f64,
pub average_r_multiple: f64,
pub expectancy_r: f64,
pub max_drawdown_r: f64,
}Expand description
Aggregated statistical metrics over a series of evaluations.
Fields§
§total_trades: usize§winrate: f64§profit_factor: f64§average_r_multiple: f64§expectancy_r: f64§max_drawdown_r: f64Implementations§
Source§impl TradeStats
impl TradeStats
Sourcepub fn compute(records: &[SignalEvaluationRecord]) -> Self
pub fn compute(records: &[SignalEvaluationRecord]) -> Self
Computes realized statistics after normalizing outcome/R inconsistencies: wins are positive, losses are negative, break-even records are zero, and expired records retain their finite realized R value. Non-finite R values are treated as zero.
Trait Implementations§
Source§impl Clone for TradeStats
impl Clone for TradeStats
Source§fn clone(&self) -> TradeStats
fn clone(&self) -> TradeStats
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for TradeStats
Source§impl Debug for TradeStats
impl Debug for TradeStats
Source§impl<'de> Deserialize<'de> for TradeStats
impl<'de> Deserialize<'de> for TradeStats
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 PartialEq for TradeStats
impl PartialEq for TradeStats
Source§impl Serialize for TradeStats
impl Serialize for TradeStats
impl StructuralPartialEq for TradeStats
Auto Trait Implementations§
impl Freeze for TradeStats
impl RefUnwindSafe for TradeStats
impl Send for TradeStats
impl Sync for TradeStats
impl Unpin for TradeStats
impl UnsafeUnpin for TradeStats
impl UnwindSafe for TradeStats
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