pub struct BacktestEngineConfig {Show 21 fields
pub environment: Environment,
pub trader_id: TraderId,
pub load_state: bool,
pub save_state: 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 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 trading strategy state should be loaded from the database on start.
save_state: boolIf trading strategy state should be saved to the database on stop.
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.
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.
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
pub fn new( environment: Environment, trader_id: TraderId, load_state: Option<bool>, save_state: Option<bool>, bypass_logging: Option<bool>, run_analysis: Option<bool>, timeout_connection: Option<u64>, timeout_reconciliation: Option<u64>, timeout_portfolio: Option<u64>, timeout_disconnection: Option<u64>, delay_post_stop: Option<u64>, timeout_shutdown: Option<u64>, logging: Option<LoggerConfig>, instance_id: Option<UUID4>, cache: Option<CacheConfig>, msgbus: Option<MessageBusConfig>, data_engine: Option<DataEngineConfig>, risk_engine: Option<RiskEngineConfig>, exec_engine: Option<ExecutionEngineConfig>, portfolio: Option<PortfolioConfig>, streaming: Option<StreamingConfig>, ) -> Self
Trait Implementations§
Source§impl Clone for BacktestEngineConfig
impl Clone for BacktestEngineConfig
Source§fn clone(&self) -> BacktestEngineConfig
fn clone(&self) -> BacktestEngineConfig
1.0.0 · 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<'a, 'py> FromPyObject<'a, 'py> for BacktestEngineConfigwhere
Self: Clone,
impl<'a, 'py> FromPyObject<'a, 'py> for BacktestEngineConfigwhere
Self: Clone,
Source§impl<'py> IntoPyObject<'py> for BacktestEngineConfig
impl<'py> IntoPyObject<'py> for BacktestEngineConfig
Source§type Target = BacktestEngineConfig
type Target = BacktestEngineConfig
Source§type Output = Bound<'py, <BacktestEngineConfig as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <BacktestEngineConfig as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
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 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>
Source§impl PyClass for BacktestEngineConfig
impl PyClass for BacktestEngineConfig
Source§impl PyClassImpl for BacktestEngineConfig
impl PyClassImpl for BacktestEngineConfig
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// Configuration for ``BacktestEngine`` instances.
const RAW_DOC: &'static CStr = /// Configuration for ``BacktestEngine`` instances.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type Layout = <<BacktestEngineConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<BacktestEngineConfig>
type Layout = <<BacktestEngineConfig as PyClassImpl>::BaseNativeType as PyClassBaseType>::Layout<BacktestEngineConfig>
Source§type ThreadChecker = NoopThreadChecker
type ThreadChecker = NoopThreadChecker
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
Source§fn dict_offset() -> Option<PyObjectOffset>
fn dict_offset() -> Option<PyObjectOffset>
Source§fn weaklist_offset() -> Option<PyObjectOffset>
fn weaklist_offset() -> Option<PyObjectOffset>
Source§impl PyClassNewTextSignature for BacktestEngineConfig
impl PyClassNewTextSignature for BacktestEngineConfig
const TEXT_SIGNATURE: &'static str = "(trader_id=None, load_state=None, save_state=None, bypass_logging=None, run_analysis=None, timeout_connection=None, timeout_reconciliation=None, timeout_portfolio=None, timeout_disconnection=None, delay_post_stop=None, timeout_shutdown=None, logging=None, instance_id=None)"
Source§impl PyMethods<BacktestEngineConfig> for PyClassImplCollector<BacktestEngineConfig>
impl PyMethods<BacktestEngineConfig> for PyClassImplCollector<BacktestEngineConfig>
fn py_methods(self) -> &'static PyClassItems
Source§impl PyTypeInfo for BacktestEngineConfig
impl PyTypeInfo for BacktestEngineConfig
Source§const NAME: &str = <Self as ::pyo3::PyClass>::NAME
const NAME: &str = <Self as ::pyo3::PyClass>::NAME
::type_object(py).name() to get the correct runtime valueSource§const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
const MODULE: Option<&str> = <Self as ::pyo3::impl_::pyclass::PyClassImpl>::MODULE
::type_object(py).module() to get the correct runtime valueSource§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Source§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
impl DerefToPyAny for BacktestEngineConfig
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§
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,
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<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
Source§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.