pub struct BacktestResultMsg {Show 35 fields
pub admission_report: Option<ReplayAdmissionReportMsg>,
pub strategy: Option<ConfiguredStrategyOutputMsg>,
pub portfolio: Option<PortfolioOutputMsg>,
pub initial_balance: f64,
pub final_balance: f64,
pub total_pnl: f64,
pub total_trades: usize,
pub winning_trades: usize,
pub losing_trades: usize,
pub win_rate: f64,
pub profit_factor: f64,
pub max_drawdown: f64,
pub max_drawdown_pct: f64,
pub summary: SubsetStatsMsg,
pub per_symbol: HashMap<String, SubsetStatsMsg>,
pub per_group: HashMap<String, SubsetStatsMsg>,
pub long_stats: SubsetStatsMsg,
pub short_stats: SubsetStatsMsg,
pub per_close_reason: Vec<CloseReasonStatsMsg>,
pub streaks: StreakStatsMsg,
pub risk_metrics: RiskMetricsMsg,
pub duration_stats: Option<DurationStatsMsg>,
pub monthly_returns: Vec<MonthlyReturnMsg>,
pub equity_curve: Vec<EquityPoint>,
pub trade_log: Vec<TradeResultMsg>,
pub positions: Vec<PositionSummaryMsg>,
pub total_positions: usize,
pub winning_positions: usize,
pub losing_positions: usize,
pub position_win_rate: f64,
pub future: Option<FutureBacktestResultMsg>,
pub total_commission: f64,
pub total_swap: f64,
pub gross_pnl: Option<f64>,
pub cost_events: Vec<CostEventMsg>,
}Expand description
Serializable mirror of BacktestResult for wire transport.
Fields§
§admission_report: Option<ReplayAdmissionReportMsg>§strategy: Option<ConfiguredStrategyOutputMsg>Strategy document, sources, decisions, and notes when the run executed a configured strategy.
portfolio: Option<PortfolioOutputMsg>Instance and supervisor output when the run executed a portfolio of configured strategies.
initial_balance: f64§final_balance: f64§total_pnl: f64§total_trades: usize§winning_trades: usize§losing_trades: usize§win_rate: f64§profit_factor: f64§max_drawdown: f64§max_drawdown_pct: f64§summary: SubsetStatsMsg§per_symbol: HashMap<String, SubsetStatsMsg>§per_group: HashMap<String, SubsetStatsMsg>§long_stats: SubsetStatsMsg§short_stats: SubsetStatsMsg§per_close_reason: Vec<CloseReasonStatsMsg>§streaks: StreakStatsMsg§risk_metrics: RiskMetricsMsg§duration_stats: Option<DurationStatsMsg>§monthly_returns: Vec<MonthlyReturnMsg>§equity_curve: Vec<EquityPoint>§trade_log: Vec<TradeResultMsg>§positions: Vec<PositionSummaryMsg>§total_positions: usize§winning_positions: usize§losing_positions: usize§position_win_rate: f64§future: Option<FutureBacktestResultMsg>Additive FutureQuoteV1 artifacts.
total_commission: f64Total account-currency commission charged across every entry and exit fill.
total_swap: f64Total account-currency swap charged across every rollover.
gross_pnl: Option<f64>Realized profit and loss before commission and swap, present only when a cost was charged.
cost_events: Vec<CostEventMsg>Commission and swap charges in application order.
Trait Implementations§
Source§impl Clone for BacktestResultMsg
impl Clone for BacktestResultMsg
Source§fn clone(&self) -> BacktestResultMsg
fn clone(&self) -> BacktestResultMsg
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 BacktestResultMsg
impl Debug for BacktestResultMsg
Source§impl<'de> Deserialize<'de> for BacktestResultMsg
impl<'de> Deserialize<'de> for BacktestResultMsg
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<BacktestResultMsg, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<BacktestResultMsg, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for BacktestResultMsg
impl Serialize for BacktestResultMsg
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for BacktestResultMsg
impl RefUnwindSafe for BacktestResultMsg
impl Send for BacktestResultMsg
impl Sync for BacktestResultMsg
impl Unpin for BacktestResultMsg
impl UnsafeUnpin for BacktestResultMsg
impl UnwindSafe for BacktestResultMsg
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more