pub struct RealTimeCorrelation { /* private fields */ }Expand description
Real-time correlation kernel.
Maintains streaming correlation matrices using Welford’s online algorithm. Supports both Pearson and exponentially weighted correlations. Designed for Ring mode operation with sub-millisecond updates.
Implementations§
Source§impl RealTimeCorrelation
impl RealTimeCorrelation
Sourcepub fn with_config(config: CorrelationConfig) -> Self
pub fn with_config(config: CorrelationConfig) -> Self
Create with custom configuration.
Sourcepub fn initialize(&self, asset_ids: &[u64])
pub fn initialize(&self, asset_ids: &[u64])
Initialize with a set of asset IDs.
Sourcepub fn update(&self, update: &CorrelationUpdate) -> CorrelationUpdateResult
pub fn update(&self, update: &CorrelationUpdate) -> CorrelationUpdateResult
Process a single update and return correlation changes.
Sourcepub fn update_batch(
&self,
updates: &[CorrelationUpdate],
) -> Vec<CorrelationUpdateResult>
pub fn update_batch( &self, updates: &[CorrelationUpdate], ) -> Vec<CorrelationUpdateResult>
Process a batch of updates.
Sourcepub fn get_correlation(&self, asset_i: u64, asset_j: u64) -> Option<f64>
pub fn get_correlation(&self, asset_i: u64, asset_j: u64) -> Option<f64>
Get current correlation between two assets.
Sourcepub fn get_matrix(&self) -> CorrelationMatrixResult
pub fn get_matrix(&self) -> CorrelationMatrixResult
Get full correlation matrix.
Sourcepub fn get_row(&self, asset_id: u64) -> Option<Vec<(u64, f64)>>
pub fn get_row(&self, asset_id: u64) -> Option<Vec<(u64, f64)>>
Get correlation row for a specific asset.
Sourcepub fn compute_from_returns(returns: &[Vec<f64>]) -> CorrelationMatrixResult
pub fn compute_from_returns(returns: &[Vec<f64>]) -> CorrelationMatrixResult
Batch compute correlation matrix from historical data.
Trait Implementations§
Source§impl Clone for RealTimeCorrelation
impl Clone for RealTimeCorrelation
Source§impl Debug for RealTimeCorrelation
impl Debug for RealTimeCorrelation
Source§impl Default for RealTimeCorrelation
impl Default for RealTimeCorrelation
Source§impl GpuKernel for RealTimeCorrelation
impl GpuKernel for RealTimeCorrelation
Source§fn metadata(&self) -> &KernelMetadata
fn metadata(&self) -> &KernelMetadata
Returns the kernel metadata.
Source§fn requires_gpu_native(&self) -> bool
fn requires_gpu_native(&self) -> bool
Returns true if this kernel requires GPU-native execution.
Auto Trait Implementations§
impl !Freeze for RealTimeCorrelation
impl RefUnwindSafe for RealTimeCorrelation
impl Send for RealTimeCorrelation
impl Sync for RealTimeCorrelation
impl Unpin for RealTimeCorrelation
impl UnwindSafe for RealTimeCorrelation
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.