quantwave_core/regimes/mod.rs
1//! Regime Detection and Market State Tools
2//!
3//! This module provides algorithms for identifying market regimes, such as volatility clustering,
4//! hidden Markov models (HMM), and changepoint detection.
5
6pub mod volatility_clustering;
7pub mod hmm;
8pub mod gmm;
9pub mod pelt;
10pub mod analytics;
11pub mod ms_garch;
12pub mod ensemble;
13pub mod india;
14pub mod tar;
15pub mod hsmm;
16pub mod hmm_gas;
17pub mod multi_asset;
18
19use serde::{Deserialize, Serialize};
20
21/// Represents common market regime states.
22#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, Serialize, Deserialize)]
23pub enum MarketRegime {
24 /// A period of low volatility and generally upward price movement.
25 Bull,
26 /// A period of high volatility or downward price movement.
27 Bear,
28 /// A transitional or unstable period.
29 Crisis,
30 /// A steady state with normal characteristics.
31 Steady,
32 /// Custom state for user-defined clusters.
33 Cluster(u8),
34}
35
36impl Default for MarketRegime {
37 fn default() -> Self {
38 Self::Steady
39 }
40}