pub struct HmmIndicator {
pub config: HMMConfig,
}Expand description
Batch Indicator adapter for HMMRegimeDetector.
Replays candles through the streaming HMM detector and emits per-bar
hmm_conf (0–1) and hmm_regime_id:
- 0 = Uncertain
- 1 = MeanReverting
- 2 = Volatile
- 3 = Trending(Bullish)
- 4 = Trending(Bearish)
Fields§
§config: HMMConfigImplementations§
Source§impl HmmIndicator
impl HmmIndicator
pub fn new(config: HMMConfig) -> Self
pub fn with_defaults() -> Self
Trait Implementations§
Source§impl Clone for HmmIndicator
impl Clone for HmmIndicator
Source§fn clone(&self) -> HmmIndicator
fn clone(&self) -> HmmIndicator
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 moreSource§impl Debug for HmmIndicator
impl Debug for HmmIndicator
Source§impl Indicator for HmmIndicator
impl Indicator for HmmIndicator
Source§fn required_len(&self) -> usize
fn required_len(&self) -> usize
Minimum candles before meaningful output.
The HMM requires min_observations returns, which means
min_observations + 1 close prices (one extra to form the first return).
Source§fn required_columns(&self) -> &[&'static str]
fn required_columns(&self) -> &[&'static str]
Which OHLCV fields this indicator reads. Read more
Source§fn calculate(
&self,
candles: &[Candle],
) -> Result<IndicatorOutput, IndicatorError>
fn calculate( &self, candles: &[Candle], ) -> Result<IndicatorOutput, IndicatorError>
Compute the indicator over a full candle slice (batch mode). Read more
Auto Trait Implementations§
impl Freeze for HmmIndicator
impl RefUnwindSafe for HmmIndicator
impl Send for HmmIndicator
impl Sync for HmmIndicator
impl Unpin for HmmIndicator
impl UnsafeUnpin for HmmIndicator
impl UnwindSafe for HmmIndicator
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