pub struct GeneratorConfig {
pub starting_price: Decimal,
pub min_price: Decimal,
pub max_price: Decimal,
pub trend_direction: TrendDirection,
pub trend_strength: Decimal,
pub volatility: Decimal,
pub time_interval: TimeInterval,
pub num_points: usize,
pub seed: Option<u64>,
pub base_volume: u64,
pub volume_volatility: f64,
}
Expand description
Configuration for market data generation
Fields§
§starting_price: Decimal
Starting price for generation
min_price: Decimal
Minimum price boundary
max_price: Decimal
Maximum price boundary
trend_direction: TrendDirection
Trend direction
trend_strength: Decimal
Trend strength as percentage per period (e.g., 0.01 = 1% per period)
volatility: Decimal
Volatility (standard deviation of price changes)
time_interval: TimeInterval
Time interval for each data point
num_points: usize
Number of data points to generate
seed: Option<u64>
Random seed for reproducibility
base_volume: u64
Base volume for generation
volume_volatility: f64
Volume volatility (standard deviation)
Implementations§
Source§impl GeneratorConfig
impl GeneratorConfig
Sourcepub fn builder() -> ConfigBuilder
pub fn builder() -> ConfigBuilder
Creates a builder for fluent configuration
Sourcepub fn apply_smart_defaults(&mut self)
pub fn apply_smart_defaults(&mut self)
Smart defaults: adjusts configuration based on provided values This ensures reasonable defaults when only partial config is provided
Sourcepub fn validate(&self) -> Result<(), ConfigError>
pub fn validate(&self) -> Result<(), ConfigError>
Validates the configuration
Source§impl GeneratorConfig
Preset configurations for common scenarios
impl GeneratorConfig
Preset configurations for common scenarios
Sourcepub fn bull_market() -> Self
pub fn bull_market() -> Self
Creates a configuration for a trending bull market
Sourcepub fn bear_market() -> Self
pub fn bear_market() -> Self
Creates a configuration for a trending bear market
Trait Implementations§
Source§impl Clone for GeneratorConfig
impl Clone for GeneratorConfig
Source§fn clone(&self) -> GeneratorConfig
fn clone(&self) -> GeneratorConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GeneratorConfig
impl Debug for GeneratorConfig
Source§impl Default for GeneratorConfig
impl Default for GeneratorConfig
Source§impl<'de> Deserialize<'de> for GeneratorConfigwhere
GeneratorConfig: Default,
impl<'de> Deserialize<'de> for GeneratorConfigwhere
GeneratorConfig: Default,
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GeneratorConfig
impl RefUnwindSafe for GeneratorConfig
impl Send for GeneratorConfig
impl Sync for GeneratorConfig
impl Unpin for GeneratorConfig
impl UnwindSafe for GeneratorConfig
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