pub struct BacktestReport {
pub schema_version: u32,
pub symbol: String,
pub timeframe: String,
pub metrics: Metrics,
pub trades: Vec<Trade>,
pub equity: Vec<EquityPoint>,
pub fees_paid: f64,
pub initial_capital: f64,
}Expand description
The result of a backtest run.
Fields§
§schema_version: u32Report schema version.
symbol: StringThe instrument the spec was written for, echoed from it.
The engine reads whatever candles it is given and does not check them against this, so it is a label rather than a guarantee – but without it a stored report does not say what it is a report of, which makes a directory of them unreadable.
timeframe: StringThe bar size the spec was written for, echoed from it. A label, like
symbol.
metrics: MetricsSummary metrics.
trades: Vec<Trade>Completed trades.
equity: Vec<EquityPoint>Per-bar equity curve.
fees_paid: f64Total fees paid.
initial_capital: f64Starting capital.
Trait Implementations§
Source§impl Clone for BacktestReport
impl Clone for BacktestReport
Source§fn clone(&self) -> BacktestReport
fn clone(&self) -> BacktestReport
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 BacktestReport
impl Debug for BacktestReport
Source§impl PartialEq for BacktestReport
impl PartialEq for BacktestReport
Source§impl Serialize for BacktestReport
impl Serialize for BacktestReport
impl StructuralPartialEq for BacktestReport
Auto Trait Implementations§
impl Freeze for BacktestReport
impl RefUnwindSafe for BacktestReport
impl Send for BacktestReport
impl Sync for BacktestReport
impl Unpin for BacktestReport
impl UnsafeUnpin for BacktestReport
impl UnwindSafe for BacktestReport
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