pub struct PerformanceMetrics {Show 14 fields
pub period_return_pct: Option<f64>,
pub apr_pct: Option<f64>,
pub sharpe: Option<f64>,
pub max_drawdown_pct: Option<f64>,
pub max_drawdown_usdc: String,
pub win_rate_pct: Option<f64>,
pub closed_trade_count: usize,
pub winning_trade_count: usize,
pub losing_trade_count: usize,
pub fill_count: usize,
pub total_fees: String,
pub total_volume: String,
pub net_pnl: String,
pub fee_drag_pct: Option<f64>,
}Expand description
Calculated performance metrics.
Fields§
§period_return_pct: Option<f64>Return over the measured period.
apr_pct: Option<f64>Annualized percentage return.
sharpe: Option<f64>Simplified Sharpe ratio from equity returns.
max_drawdown_pct: Option<f64>Maximum drawdown as a percentage.
max_drawdown_usdc: StringMaximum drawdown in USDC as a decimal string.
win_rate_pct: Option<f64>Percentage of closed trades with positive net PnL.
closed_trade_count: usizeNumber of reconstructed closed trades.
winning_trade_count: usizeNumber of winning closed trades.
losing_trade_count: usizeNumber of losing closed trades.
fill_count: usizeNumber of fills included.
total_fees: StringTotal fees as a decimal string.
total_volume: StringTotal traded volume as a decimal string.
net_pnl: StringNet PnL as a decimal string.
fee_drag_pct: Option<f64>Fees divided by total volume.
Trait Implementations§
Source§impl Clone for PerformanceMetrics
impl Clone for PerformanceMetrics
Source§fn clone(&self) -> PerformanceMetrics
fn clone(&self) -> PerformanceMetrics
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 moreSource§impl Debug for PerformanceMetrics
impl Debug for PerformanceMetrics
Source§impl<'de> Deserialize<'de> for PerformanceMetrics
impl<'de> Deserialize<'de> for PerformanceMetrics
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
Auto Trait Implementations§
impl Freeze for PerformanceMetrics
impl RefUnwindSafe for PerformanceMetrics
impl Send for PerformanceMetrics
impl Sync for PerformanceMetrics
impl Unpin for PerformanceMetrics
impl UnsafeUnpin for PerformanceMetrics
impl UnwindSafe for PerformanceMetrics
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