pub struct BtOptions {Show 13 fields
pub signal_col: String,
pub timestamp_col: String,
pub close_col: String,
pub symbol_col: Option<String>,
pub entry_filter_col: Option<String>,
pub size_multiplier_col: Option<String>,
pub commission_bps: f64,
pub slippage_bps: f64,
pub initial_cash: f64,
pub execution_delay: ExecutionDelay,
pub stop_loss_pct: Option<f64>,
pub take_profit_pct: Option<f64>,
pub trailing_stop_pct: Option<f64>,
}Expand description
Column names + cost knobs for a vectorized backtest run.
Fields§
§signal_col: String§timestamp_col: String§close_col: String§symbol_col: Option<String>§entry_filter_col: Option<String>§size_multiplier_col: Option<String>§commission_bps: f64§slippage_bps: f64§initial_cash: f64§execution_delay: ExecutionDelay§stop_loss_pct: Option<f64>§take_profit_pct: Option<f64>§trailing_stop_pct: Option<f64>Implementations§
Source§impl BtOptions
impl BtOptions
pub fn signal(signal_col: impl Into<String>) -> Self
pub fn into_config(self) -> BacktestConfig
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BtOptions
impl RefUnwindSafe for BtOptions
impl Send for BtOptions
impl Sync for BtOptions
impl Unpin for BtOptions
impl UnsafeUnpin for BtOptions
impl UnwindSafe for BtOptions
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§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 moreSource§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).Source§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.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.