pub struct BacktestDataConfig { /* private fields */ }Expand description
Represents the data configuration for one specific backtest run.
Implementations§
Source§impl BacktestDataConfig
impl BacktestDataConfig
Sourcepub fn builder() -> BacktestDataConfigBuilder
pub fn builder() -> BacktestDataConfigBuilder
Create an instance of BacktestDataConfig using the builder syntax
Source§impl BacktestDataConfig
impl BacktestDataConfig
Sourcepub fn validate(&self) -> ConfigResult<()>
pub fn validate(&self) -> ConfigResult<()>
Validates the data 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 const fn data_type(&self) -> NautilusDataType
pub fn catalog_path(&self) -> &str
pub fn catalog_fs_protocol(&self) -> Option<&str>
pub fn catalog_fs_storage_options(&self) -> Option<&AHashMap<String, String>>
pub fn catalog_fs_rust_storage_options( &self, ) -> Option<&AHashMap<String, String>>
pub fn instrument_id(&self) -> Option<InstrumentId>
pub fn instrument_ids(&self) -> Option<&[InstrumentId]>
pub fn start_time(&self) -> Option<UnixNanos>
pub fn end_time(&self) -> Option<UnixNanos>
pub fn filter_expr(&self) -> Option<&str>
pub fn client_id(&self) -> Option<ClientId>
pub fn metadata(&self) -> Option<&AHashMap<String, String>>
pub fn bar_spec(&self) -> Option<BarSpecification>
pub fn bar_types(&self) -> Option<&[String]>
pub fn optimize_file_loading(&self) -> bool
Sourcepub fn query_identifiers(&self) -> Option<Vec<String>>
pub fn query_identifiers(&self) -> Option<Vec<String>>
Constructs identifier strings for catalog queries.
Follows the same logic as Python’s BacktestDataConfig.query:
- For bars: prefer
bar_types, else construct from instrument(s) +bar_spec+ “-EXTERNAL” - For other types: use
instrument_idorinstrument_ids
Sourcepub fn get_instrument_ids(&self) -> Result<Vec<InstrumentId>>
pub fn get_instrument_ids(&self) -> Result<Vec<InstrumentId>>
Returns all instrument IDs referenced by this config.
For bar_types, extracts the instrument ID from each bar type string.
§Errors
Returns an error if any bar type string cannot be parsed.
Trait Implementations§
Source§impl Clone for BacktestDataConfig
impl Clone for BacktestDataConfig
Source§fn clone(&self) -> BacktestDataConfig
fn clone(&self) -> BacktestDataConfig
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 Freeze for BacktestDataConfig
impl RefUnwindSafe for BacktestDataConfig
impl Send for BacktestDataConfig
impl Sync for BacktestDataConfig
impl Unpin for BacktestDataConfig
impl UnsafeUnpin for BacktestDataConfig
impl UnwindSafe for BacktestDataConfig
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
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