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

Function test_get_av_uniqueness

crates/openquant/tests/sampling.rs:46–54  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44
45#[test]
46fn test_get_av_uniqueness() {
47 let (price_bars, t1) = setup_labels();
48 let av = get_av_uniqueness_from_triple_barrier(&t1, price_bars.len());
49 assert_eq!(av.len(), t1.len());
50 assert!((av[0] - 0.66).abs() < 1e-2);
51 assert!((av[2] - 0.83).abs() < 1e-2);
52 assert!((av[5] - 0.44).abs() < 1e-2);
53 assert!((av.last().unwrap() - 1.0).abs() < 1e-2);
54}
55
56#[test]
57fn test_seq_bootstrap_and_ind_matrix() {

Callers

nothing calls this directly

Calls 3

setup_labelsFunction · 0.85
lenMethod · 0.80

Tested by

no test coverage detected