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

Method apply_tick_rule

crates/openquant/src/microstructural_features.rs:676–686  ·  view source on GitHub ↗
(&mut self, price: f64)

Source from the content-addressed store, hash-verified

674 (w..=message.len() - w).collect()
675 };
676 let mut sum = 0.0;
677 let mut num = 0.0;
678 for i in points {
679 let l = match_length(message, i, if window == 0 { i } else { window });
680 let denom = if window == 0 { (i + 1) as f64 } else { (window + 1) as f64 };
681 sum += denom.log2() / l as f64;
682 num += 1.0;
683 }
684 if num == 0.0 {
685 0.0
686 } else {
687 sum / num
688 }
689}

Callers 1

get_features_from_csvMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected