pub struct HurstExponent { /* private fields */ }Expand description
Hurst Exponent regime classifier via R/S analysis.
Uses a fixed set of subseries sizes [16, 32, 64] and estimates the Hurst exponent from the log-log slope of average R/S vs subseries size.
Implementations§
Source§impl HurstExponent
impl HurstExponent
Sourcepub fn new(window: usize) -> Result<Self, IndicatorError>
pub fn new(window: usize) -> Result<Self, IndicatorError>
Create a new HurstExponent with the specified lookback window.
The window determines how many recent candles are used for computation.
§Errors
Returns InvalidParameter if window is less than 64 (minimum for
meaningful R/S analysis with subseries sizes up to 64).
Sourcepub fn compute_from_candles(&self, candles: &[Candle]) -> Option<Decimal>
pub fn compute_from_candles(&self, candles: &[Candle]) -> Option<Decimal>
Compute the Hurst exponent from candle closing prices.
Returns None if insufficient data or degenerate price series.
Trait Implementations§
Source§impl Clone for HurstExponent
impl Clone for HurstExponent
Source§fn clone(&self) -> HurstExponent
fn clone(&self) -> HurstExponent
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 moreAuto Trait Implementations§
impl Freeze for HurstExponent
impl RefUnwindSafe for HurstExponent
impl Send for HurstExponent
impl Sync for HurstExponent
impl Unpin for HurstExponent
impl UnsafeUnpin for HurstExponent
impl UnwindSafe for HurstExponent
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