pub struct BacktestVenueConfig { /* private fields */ }Expand description
Represents a venue configuration for one specific backtest engine.
Implementations§
Source§impl BacktestVenueConfig
impl BacktestVenueConfig
Sourcepub fn builder() -> BacktestVenueConfigBuilder
pub fn builder() -> BacktestVenueConfigBuilder
Create an instance of BacktestVenueConfig using the builder syntax
Source§impl BacktestVenueConfig
impl BacktestVenueConfig
Sourcepub fn validate(&self) -> ConfigResult<()>
pub fn validate(&self) -> ConfigResult<()>
Validates the venue configuration, collecting every field violation.
§Errors
Returns a ConfigError (a ConfigError::Multiple when more than one field is
invalid) if any field fails validation.
pub fn name(&self) -> Ustr
pub fn oms_type(&self) -> OmsType
pub fn account_type(&self) -> AccountType
pub fn book_type(&self) -> BookType
pub fn starting_balances(&self) -> &[String]
pub fn routing(&self) -> bool
pub fn frozen_account(&self) -> bool
pub fn reject_stop_orders(&self) -> bool
pub fn support_gtd_orders(&self) -> bool
pub fn support_contingent_orders(&self) -> bool
pub fn use_position_ids(&self) -> bool
pub fn use_random_ids(&self) -> bool
pub fn use_reduce_only(&self) -> bool
pub fn bar_execution(&self) -> bool
pub fn bar_adaptive_high_low_ordering(&self) -> bool
pub fn trade_execution(&self) -> bool
pub fn use_market_order_acks(&self) -> bool
pub fn liquidity_consumption(&self) -> bool
pub fn allow_cash_borrowing(&self) -> bool
pub fn queue_position(&self) -> bool
pub fn oto_trigger_mode(&self) -> OtoTriggerMode
pub fn base_currency(&self) -> Option<Currency>
pub fn default_leverage(&self) -> Option<Decimal>
pub fn leverages(&self) -> Option<&AHashMap<InstrumentId, Decimal>>
pub fn margin_model(&self) -> Option<&MarginModelAny>
pub fn modules(&self) -> &[SimulationModuleAny]
pub fn fill_model(&self) -> Option<&FillModelAny>
pub fn latency_model(&self) -> Option<&LatencyModelAny>
pub fn fee_model(&self) -> Option<&FeeModelAny>
pub fn price_protection_points(&self) -> u32
pub fn liquidation_enabled(&self) -> bool
pub fn liquidation_trigger_ratio(&self) -> f64
pub fn liquidation_cancel_open_orders(&self) -> bool
Trait Implementations§
Source§impl Clone for BacktestVenueConfig
impl Clone for BacktestVenueConfig
Source§fn clone(&self) -> BacktestVenueConfig
fn clone(&self) -> BacktestVenueConfig
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 moreAuto Trait Implementations§
impl !RefUnwindSafe for BacktestVenueConfig
impl !Sync for BacktestVenueConfig
impl Freeze for BacktestVenueConfig
impl Send for BacktestVenueConfig
impl Unpin for BacktestVenueConfig
impl UnsafeUnpin for BacktestVenueConfig
impl UnwindSafe for BacktestVenueConfig
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
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