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

Function test_chow_test

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

Source from the content-addressed store, hash-verified

44
45#[test]
46fn test_chow_test() {
47 let min_length = 10usize;
48 let log_prices = log_prices();
49 let stats = get_chow_type_stat(&log_prices, min_length).expect("chow stats");
50
51 assert_eq!(log_prices.len() - min_length * 2, stats.len());
52 assert!((max(&stats) - 0.179).abs() < 0.001);
53 assert!((mean(&stats) + 0.653).abs() < 0.001);
54 assert!((stats[3] + 0.6649).abs() < 0.001);
55}
56
57#[test]
58fn test_chu_stinchcombe_white_test() {

Callers

nothing calls this directly

Calls 2

log_pricesFunction · 0.85
get_chow_type_statFunction · 0.85

Tested by

no test coverage detected