pub struct BacktestEngineConfig {Show 23 fields
pub environment: Environment,
pub trader_id: TraderId,
pub load_state: bool,
pub save_state: bool,
pub shutdown_on_error: bool,
pub logging: LoggerConfig,
pub instance_id: Option<UUID4>,
pub timeout_connection: Duration,
pub timeout_reconciliation: Duration,
pub timeout_portfolio: Duration,
pub timeout_disconnection: Duration,
pub delay_post_stop: Duration,
pub timeout_shutdown: Duration,
pub cache: Option<CacheConfig>,
pub msgbus: Option<MessageBusConfig>,
pub data_engine: Option<DataEngineConfig>,
pub risk_engine: Option<RiskEngineConfig>,
pub exec_engine: Option<ExecutionEngineConfig>,
pub portfolio: Option<PortfolioConfig>,
pub controller: Option<ImportableControllerConfig>,
pub streaming: Option<StreamingConfig>,
pub bypass_logging: bool,
pub run_analysis: bool,
}Expand description
Configuration for BacktestEngine instances.
Fields§
§environment: EnvironmentThe kernel environment context.
trader_id: TraderIdThe trader ID for the node.
load_state: boolIf actor and strategy state should be loaded from the database on start.
save_state: boolIf actor and strategy state should be saved to the database on stop.
shutdown_on_error: boolIf the system should request shutdown when an error log is emitted.
Filtered or bypassed error logs still request shutdown.
logging: LoggerConfigThe logging configuration for the kernel.
instance_id: Option<UUID4>The unique instance identifier for the kernel.
timeout_connection: DurationThe timeout for all clients to connect and initialize.
timeout_reconciliation: DurationThe timeout for execution state to reconcile.
timeout_portfolio: DurationThe timeout for portfolio to initialize margins and unrealized pnls.
timeout_disconnection: DurationThe timeout for all engine clients to disconnect.
delay_post_stop: DurationThe delay after stopping the node to await residual events before final shutdown.
timeout_shutdown: DurationThe timeout to await pending tasks cancellation during shutdown.
cache: Option<CacheConfig>The cache configuration.
crate::engine::BacktestEngine always overrides
drop_instruments_on_reset to false on this config so that
successive runs can reuse the same dataset.
msgbus: Option<MessageBusConfig>The message bus configuration.
data_engine: Option<DataEngineConfig>The data engine configuration.
risk_engine: Option<RiskEngineConfig>The risk engine configuration.
exec_engine: Option<ExecutionEngineConfig>The execution engine configuration.
portfolio: Option<PortfolioConfig>The portfolio configuration.
controller: Option<ImportableControllerConfig>The importable controller configuration.
streaming: Option<StreamingConfig>The configuration for streaming to feather files.
bypass_logging: boolIf logging should be bypassed.
run_analysis: boolIf post backtest performance analysis should be run.
Implementations§
Source§impl BacktestEngineConfig
impl BacktestEngineConfig
Sourcepub fn builder() -> BacktestEngineConfigBuilder
pub fn builder() -> BacktestEngineConfigBuilder
Create an instance of BacktestEngineConfig using the builder syntax
Trait Implementations§
Source§impl Clone for BacktestEngineConfig
impl Clone for BacktestEngineConfig
Source§fn clone(&self) -> BacktestEngineConfig
fn clone(&self) -> BacktestEngineConfig
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 BacktestEngineConfig
impl Debug for BacktestEngineConfig
Source§impl Default for BacktestEngineConfig
impl Default for BacktestEngineConfig
Source§impl NautilusKernelConfig for BacktestEngineConfig
impl NautilusKernelConfig for BacktestEngineConfig
Source§fn environment(&self) -> Environment
fn environment(&self) -> Environment
Source§fn load_state(&self) -> bool
fn load_state(&self) -> bool
Source§fn save_state(&self) -> bool
fn save_state(&self) -> bool
Source§fn shutdown_on_error(&self) -> bool
fn shutdown_on_error(&self) -> bool
Source§fn logging(&self) -> LoggerConfig
fn logging(&self) -> LoggerConfig
Source§fn instance_id(&self) -> Option<UUID4>
fn instance_id(&self) -> Option<UUID4>
Source§fn timeout_connection(&self) -> Duration
fn timeout_connection(&self) -> Duration
Source§fn timeout_reconciliation(&self) -> Duration
fn timeout_reconciliation(&self) -> Duration
Source§fn timeout_portfolio(&self) -> Duration
fn timeout_portfolio(&self) -> Duration
Source§fn timeout_disconnection(&self) -> Duration
fn timeout_disconnection(&self) -> Duration
Source§fn delay_post_stop(&self) -> Duration
fn delay_post_stop(&self) -> Duration
Source§fn timeout_shutdown(&self) -> Duration
fn timeout_shutdown(&self) -> Duration
Source§fn cache(&self) -> Option<CacheConfig>
fn cache(&self) -> Option<CacheConfig>
Source§fn msgbus(&self) -> Option<MessageBusConfig>
fn msgbus(&self) -> Option<MessageBusConfig>
Source§fn data_engine(&self) -> Option<DataEngineConfig>
fn data_engine(&self) -> Option<DataEngineConfig>
Source§fn risk_engine(&self) -> Option<RiskEngineConfig>
fn risk_engine(&self) -> Option<RiskEngineConfig>
Source§fn exec_engine(&self) -> Option<ExecutionEngineConfig>
fn exec_engine(&self) -> Option<ExecutionEngineConfig>
Source§fn portfolio(&self) -> Option<PortfolioConfig>
fn portfolio(&self) -> Option<PortfolioConfig>
Source§fn streaming(&self) -> Option<StreamingConfig>
fn streaming(&self) -> Option<StreamingConfig>
Auto Trait Implementations§
impl Freeze for BacktestEngineConfig
impl RefUnwindSafe for BacktestEngineConfig
impl Send for BacktestEngineConfig
impl Sync for BacktestEngineConfig
impl Unpin for BacktestEngineConfig
impl UnsafeUnpin for BacktestEngineConfig
impl UnwindSafe for BacktestEngineConfig
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
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> ⓘ
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 more