MCPcopy Create free account
hub / github.com/Open-Quant/openquant / rolling_min

Function rolling_min

crates/openquant/src/microstructural_features.rs:69–83  ·  view source on GitHub ↗
(arr: &[f64], window: usize)

Source from the content-addressed store, hash-verified

67//! assert!((vwap(&[1000.0, 2000.0], &[10.0, 10.0])? - 150.0).abs() < 1e-12);
68//!
69//! // A perfectly periodic message: maximal Shannon entropy, low entropy by every other measure.
70//! assert_eq!(encode_tick_rule_array(&[1, 1, -1, 0])?, "aabc");
71//! assert_eq!(get_shannon_entropy("abababab"), 1.0);
72//! assert_eq!(get_plug_in_entropy("abababab", 2)?, 0.5);
73//! assert_eq!(get_lempel_ziv_entropy("abababab"), 0.5);
74//! # Ok(())
75//! # }
76//! ```
77
78use crate::util::input_error::same_length;
79use crate::util::stats::{self, quantile_sorted, QuantileMethod};
80use crate::util::InputError;
81use chrono::NaiveDateTime;
82use statrs::distribution::{ContinuousCDF, Normal};
83
84/// Errors returned by the encoding functions and by [`MicrostructuralFeaturesGenerator`].
85#[derive(Debug, Clone, PartialEq, thiserror::Error)]
86pub enum MicrostructuralError {

Callers 1

_get_gammaFunction · 0.85

Calls 1

lenMethod · 0.80

Tested by

no test coverage detected