pub struct ComplexMorlet {
pub omega0: f64,
pub bandwidth: f64,
}Expand description
Enhanced Complex Morlet Wavelet for Financial Analysis
The complex Morlet wavelet provides excellent time-frequency localization and is particularly useful for analyzing non-stationary financial time series.
Mathematical form: ψ(t) = π^(-1/4) * exp(iω₀t) * exp(-t²/2)
§Parameters
omega0: Central frequency parameter (typically 5-6 for good localization)bandwidth: Controls time-frequency trade-off
§Financial Properties
- Preserves phase information for trend direction analysis
- Optimal for detecting frequency modulations in price data
- Excellent for identifying regime changes through instantaneous frequency
Fields§
§omega0: f64Central frequency parameter (ω₀)
bandwidth: f64Bandwidth parameter for time-frequency localization
Implementations§
Source§impl ComplexMorlet
impl ComplexMorlet
Sourcepub fn for_finance() -> Self
pub fn for_finance() -> Self
Create Complex Morlet with optimal parameters for financial analysis
Uses ω₀ = 6.0 and bandwidth = 1.0 for good time-frequency localization suitable for most financial time series analysis.
Sourcepub fn for_hft() -> Self
pub fn for_hft() -> Self
Create Complex Morlet optimized for high-frequency trading analysis
Uses higher ω₀ = 8.0 for better frequency resolution to capture rapid price movements in HFT data.
Sourcepub fn for_regime_detection() -> Self
pub fn for_regime_detection() -> Self
Create Complex Morlet optimized for regime detection
Uses lower ω₀ = 4.0 for better time localization to detect sudden regime changes.
Sourcepub fn admissibility_constant(&self) -> f64
pub fn admissibility_constant(&self) -> f64
Get the admissibility constant for reconstruction
Sourcepub fn instantaneous_frequency(&self, scale: f64, sampling_freq: f64) -> f64
pub fn instantaneous_frequency(&self, scale: f64, sampling_freq: f64) -> f64
Compute instantaneous frequency at a given time and scale
Trait Implementations§
Source§impl Clone for ComplexMorlet
impl Clone for ComplexMorlet
Source§fn clone(&self) -> ComplexMorlet
fn clone(&self) -> ComplexMorlet
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl ContinuousWavelet for ComplexMorlet
impl ContinuousWavelet for ComplexMorlet
Source§fn wavelet_function(&self, t: f64, scale: f64) -> Complex<f64>
fn wavelet_function(&self, t: f64, scale: f64) -> Complex<f64>
Source§fn center_frequency(&self) -> f64
fn center_frequency(&self) -> f64
Source§fn is_complex(&self) -> bool
fn is_complex(&self) -> bool
Source§impl Debug for ComplexMorlet
impl Debug for ComplexMorlet
Auto Trait Implementations§
impl Freeze for ComplexMorlet
impl RefUnwindSafe for ComplexMorlet
impl Send for ComplexMorlet
impl Sync for ComplexMorlet
impl Unpin for ComplexMorlet
impl UnwindSafe for ComplexMorlet
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 more