pub struct BacktestResult {Show 15 fields
pub fills: Vec<BacktestFill>,
pub trade_count: usize,
pub metrics: PerformanceMetrics,
pub benchmark: PerformanceBenchmark,
pub equity_curve: Vec<BacktestEquityPoint>,
pub closed_trades: Vec<BacktestClosedTrade>,
pub final_position_qty: String,
pub avg_entry_price: Option<String>,
pub realized_pnl: String,
pub unrealized_pnl: Option<String>,
pub total_fees: String,
pub total_volume: String,
pub net_pnl: String,
pub positions: Vec<BacktestPositionSummary>,
pub exit_reason: Option<String>,
}Expand description
Backtest result summary for JSON output
Fields§
§fills: Vec<BacktestFill>Serialized fill records.
trade_count: usizeNumber of fills.
metrics: PerformanceMetricsCalculated performance metrics.
benchmark: PerformanceBenchmarkBenchmark context.
equity_curve: Vec<BacktestEquityPoint>Equity curve.
closed_trades: Vec<BacktestClosedTrade>Reconstructed closed trades.
final_position_qty: StringLegacy single-instrument final position quantity.
avg_entry_price: Option<String>Legacy single-instrument average entry price.
realized_pnl: StringLegacy single-instrument realized PnL.
unrealized_pnl: Option<String>Legacy single-instrument unrealized PnL.
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.
positions: Vec<BacktestPositionSummary>Position summaries by instrument.
exit_reason: Option<String>Strategy or runner exit reason.
Trait Implementations§
Source§impl Clone for BacktestResult
impl Clone for BacktestResult
Source§fn clone(&self) -> BacktestResult
fn clone(&self) -> BacktestResult
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 BacktestResult
impl Debug for BacktestResult
Auto Trait Implementations§
impl Freeze for BacktestResult
impl RefUnwindSafe for BacktestResult
impl Send for BacktestResult
impl Sync for BacktestResult
impl Unpin for BacktestResult
impl UnsafeUnpin for BacktestResult
impl UnwindSafe for BacktestResult
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