pub struct StrategyReport {
pub config: StrategyConfigReport,
pub performance_all: PerformanceMetrics,
pub performance_long: PerformanceMetrics,
pub performance_short: PerformanceMetrics,
pub closed_trades: Vec<ClosedTradeReport>,
pub open_trades: Vec<OpenTradeReport>,
pub equity_curve: Vec<f64>,
pub drawdown_curve: Vec<f64>,
pub buy_hold_curve: Vec<f64>,
pub daily_returns: Vec<DailyReturnReport>,
pub trading_range: Option<TradingRangeReport>,
}Expand description
Complete strategy backtest report.
Contains three dimensions of performance metrics (All / Long / Short), per-trade lists, equity curve, drawdown curve, and daily returns.
Fields§
§config: StrategyConfigReportStrategy configuration snapshot.
performance_all: PerformanceMetricsPerformance metrics for all trades.
performance_long: PerformanceMetricsPerformance metrics for long trades only.
performance_short: PerformanceMetricsPerformance metrics for short trades only.
closed_trades: Vec<ClosedTradeReport>Closed trades ordered by exit time.
open_trades: Vec<OpenTradeReport>Currently open trades.
equity_curve: Vec<f64>Per-bar equity value (index 0 = first bar).
equity = initial_capital + net_profit + open_profit
drawdown_curve: Vec<f64>Per-bar drawdown value (peak_equity_at_fill - equity, >= 0).
buy_hold_curve: Vec<f64>Per-bar buy-and-hold equity (initial_capital * open / first_open).
daily_returns: Vec<DailyReturnReport>Daily returns used for Sharpe / Sortino calculation.
trading_range: Option<TradingRangeReport>Time range of the first entry to the last exit.
Trait Implementations§
Source§impl Clone for StrategyReport
impl Clone for StrategyReport
Source§fn clone(&self) -> StrategyReport
fn clone(&self) -> StrategyReport
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 StrategyReport
impl Debug for StrategyReport
Auto Trait Implementations§
impl Freeze for StrategyReport
impl RefUnwindSafe for StrategyReport
impl Send for StrategyReport
impl Sync for StrategyReport
impl Unpin for StrategyReport
impl UnwindSafe for StrategyReport
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,
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§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.