pub struct BacktestConfig {
pub cost_model: CostModel,
pub timestamp_col: String,
pub symbol_col: Option<String>,
pub close_col: String,
pub signal_col: String,
pub entry_filter_col: Option<String>,
pub size_multiplier_col: Option<String>,
pub execution_model: ExecutionModel,
pub execution_delay: ExecutionDelay,
pub stop_config: StopConfig,
pub position_sizer: Option<InitialRiskPositionSizer>,
}Expand description
Configuration for a backtest run.
Fields§
§cost_model: CostModel§timestamp_col: StringColumn names (customizable for long-format flexibility).
symbol_col: Option<String>§close_col: String§signal_col: StringSignal column: f64 or bool/int. >0 long, <0 short, 0 flat (units for sizing).
For rich PA + features/regime in batch DF path: pre-compute an ‘exposure’ col
(e.g. via Polars exprs on ta.features + PA struct fields) and/or use the
streaming path (run_streaming_simulation + Next impl emitting StrategySignal
with metadata for pole_height etc). Struct signal_col auto-parses
{exposure, long, pole_height, …} fields (quantwave-cr6v.11).
entry_filter_col: Option<String>Optional boolean col: dynamic entry filter (AND with signal). For regime labels/probs or feature thresholds (ta.features outputs). Batch path uses false forces exposure 0 (batch + streaming parity in quantwave-cr6v.3).
size_multiplier_col: Option<String>Optional f64 col: position size modulator (multiplies signal exposure). E.g. pole_height normalized or regime_prob. Enables ‘sized by pole’.
execution_model: ExecutionModel§execution_delay: ExecutionDelaySignal-to-fill timing (quantwave-cr6v.8). Default SameBar preserves T+0 behavior.
stop_config: StopConfigOptional stop-loss / take-profit / trailing (quantwave-cr6v.9).
position_sizer: Option<InitialRiskPositionSizer>If Some, the engine will apply risk-budgeted sizing using fraction_at_risk / pole_height_atr from StrategySignal.metadata (or PAEvent converted) on top of raw exposure.
Trait Implementations§
Source§impl Clone for BacktestConfig
impl Clone for BacktestConfig
Source§fn clone(&self) -> BacktestConfig
fn clone(&self) -> BacktestConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for BacktestConfig
impl Debug for BacktestConfig
Source§impl Default for BacktestConfig
impl Default for BacktestConfig
Source§impl<'de> Deserialize<'de> for BacktestConfig
impl<'de> Deserialize<'de> for BacktestConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for BacktestConfig
impl RefUnwindSafe for BacktestConfig
impl Send for BacktestConfig
impl Sync for BacktestConfig
impl Unpin for BacktestConfig
impl UnsafeUnpin for BacktestConfig
impl UnwindSafe for BacktestConfig
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
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> 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>
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>
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>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
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
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.