Skip to main content

InterBarFeatures

Struct InterBarFeatures 

Source
pub struct InterBarFeatures {
Show 16 fields pub lookback_trade_count: Option<u32>, pub lookback_ofi: Option<f64>, pub lookback_duration_us: Option<i64>, pub lookback_intensity: Option<f64>, pub lookback_vwap: Option<FixedPoint>, pub lookback_vwap_position: Option<f64>, pub lookback_count_imbalance: Option<f64>, pub lookback_kyle_lambda: Option<f64>, pub lookback_burstiness: Option<f64>, pub lookback_volume_skew: Option<f64>, pub lookback_volume_kurt: Option<f64>, pub lookback_price_range: Option<f64>, pub lookback_garman_klass_vol: Option<f64>, pub lookback_kaufman_er: Option<f64>, pub lookback_hurst: Option<f64>, pub lookback_permutation_entropy: Option<f64>,
}
Expand description

Inter-bar features computed from lookback window

All features use Option<T> to indicate when computation is not possible (e.g., insufficient trades in lookback window).

Fields§

§lookback_trade_count: Option<u32>

Number of trades in lookback window

§lookback_ofi: Option<f64>

Order Flow Imbalance: (buy_vol - sell_vol) / total_vol, range [-1, 1]

§lookback_duration_us: Option<i64>

Duration of lookback window in microseconds

§lookback_intensity: Option<f64>

Trade intensity: trades per second

§lookback_vwap: Option<FixedPoint>

Volume-weighted average price

§lookback_vwap_position: Option<f64>

VWAP position within price range: (vwap - low) / (high - low), range [0, 1]

§lookback_count_imbalance: Option<f64>

Count imbalance: (buy_count - sell_count) / total_count, range [-1, 1]

§lookback_kyle_lambda: Option<f64>

Kyle’s Lambda proxy (normalized): ((last-first)/first) / ((buy-sell)/total)

§lookback_burstiness: Option<f64>

Burstiness (Goh-Barabasi): (sigma_tau - mu_tau) / (sigma_tau + mu_tau), range [-1, 1]

§lookback_volume_skew: Option<f64>

Volume skewness (Fisher-Pearson coefficient)

§lookback_volume_kurt: Option<f64>

Excess kurtosis: E[(V-mu)^4] / sigma^4 - 3

§lookback_price_range: Option<f64>

Price range normalized: (high - low) / first_price

§lookback_garman_klass_vol: Option<f64>

Garman-Klass volatility estimator (Issue #128: promoted from Tier 3)

§lookback_kaufman_er: Option<f64>

Kaufman Efficiency Ratio: |net movement| / sum(|individual movements|), range [0, 1]

§lookback_hurst: Option<f64>

Hurst exponent via DFA, soft-clamped to [0, 1]

§lookback_permutation_entropy: Option<f64>

Permutation entropy (normalized), range [0, 1]

Implementations§

Source§

impl InterBarFeatures

Source

pub fn merge_tier2(&mut self, other: &InterBarFeatures)

Merge Tier 2 features from another InterBarFeatures struct Issue #96 Task #90: #[inline] — per-bar field merge at finalization

Source

pub fn merge_tier3(&mut self, other: &InterBarFeatures)

Merge Tier 3 features from another InterBarFeatures struct Issue #96 Task #90: #[inline] — per-bar field merge at finalization Issue #128: Garman-Klass moved to Tier 2, Tier 3 now 3 features

Trait Implementations§

Source§

impl Clone for InterBarFeatures

Source§

fn clone(&self) -> InterBarFeatures

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 Debug for InterBarFeatures

Source§

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

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

impl Default for InterBarFeatures

Source§

fn default() -> InterBarFeatures

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

impl Copy for InterBarFeatures

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.