pub struct BacktestResult {Show 21 fields
pub total_return: f64,
pub annualized_return: f64,
pub volatility: f64,
pub sharpe_ratio: f64,
pub sortino_ratio: f64,
pub max_drawdown: f64,
pub total_trades: usize,
pub final_equity: f64,
pub mean_inventory: f64,
pub max_inventory: f64,
pub min_inventory: f64,
pub adverse_selection_bps: f64,
pub realized_edge_bps: f64,
pub volatility_path: Option<Vec<f64>>,
pub inventory_variance: f64,
pub pnl_spread: f64,
pub pnl_dir: f64,
pub fill_buy_count: usize,
pub fill_sell_count: usize,
pub mean_hold_time: f64,
pub terminal_liquidation_cost: f64,
}Fields§
§total_return: f64§annualized_return: f64§volatility: f64§sharpe_ratio: f64§sortino_ratio: f64§max_drawdown: f64§total_trades: usize§final_equity: f64§mean_inventory: f64§max_inventory: f64§min_inventory: f64§adverse_selection_bps: f64§realized_edge_bps: f64§volatility_path: Option<Vec<f64>>§inventory_variance: f64Var(q) = (1/T) sum (q_t - q_bar)^2
pnl_spread: f64PnL_spread = sum |P_i - S_{t_i}| in price units
pnl_dir: f64PnL_dir = sum q_{t-1} * (S_t - S_{t-1}) in price units
fill_buy_count: usizeNumber of buy fills
fill_sell_count: usizeNumber of sell fills
mean_hold_time: f64Mean steps with non-zero inventory per hold episode
terminal_liquidation_cost: f64Terminal liquidation cost: |final_q| * half_spread (0 if not applied)
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§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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