ComplexMorlet

Struct ComplexMorlet 

Source
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: f64

Central frequency parameter (ω₀)

§bandwidth: f64

Bandwidth parameter for time-frequency localization

Implementations§

Source§

impl ComplexMorlet

Source

pub fn new(omega0: f64, bandwidth: f64) -> Self

Create a new Complex Morlet wavelet

§Arguments
  • omega0 - Central frequency parameter (recommended: 5-6)
  • bandwidth - Bandwidth parameter (recommended: 1.0-2.0)
§Examples
use iron_wave::transform::complex_wavelets::ComplexMorlet;
let wavelet = ComplexMorlet::new(6.0, 1.0);
Source

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.

Source

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.

Source

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.

Source

pub fn admissibility_constant(&self) -> f64

Get the admissibility constant for reconstruction

Source

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

Source§

fn clone(&self) -> ComplexMorlet

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl ContinuousWavelet for ComplexMorlet

Source§

fn wavelet_function(&self, t: f64, scale: f64) -> Complex<f64>

Get the wavelet function value at position t for scale a
Source§

fn center_frequency(&self) -> f64

Get the center frequency of the wavelet
Source§

fn bandwidth(&self) -> f64

Get the bandwidth parameter
Source§

fn is_complex(&self) -> bool

Check if the wavelet is complex-valued
Source§

fn recommended_scales( &self, signal_length: usize, _sampling_freq: f64, ) -> Vec<f64>

Get recommended scale range for a given signal length and sampling frequency
Source§

impl Debug for ComplexMorlet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for ComplexMorlet

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

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
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V