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

Function test_dendrogram_plot

crates/openquant/tests/hrp.rs:76–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

74
75#[test]
76fn test_dendrogram_plot() {
77 let (prices, names) = load_prices_and_names();
78 let mut hrp = HierarchicalRiskParity::new();
79 hrp.allocate(&names, Some(&prices), None, None, None, true).unwrap();
80 let dendrogram = hrp.plot_clusters(&names).unwrap();
81 assert!(!dendrogram.icoord.is_empty());
82 assert!(!dendrogram.dcoord.is_empty());
83 assert!(!dendrogram.ivl.is_empty());
84 assert!(!dendrogram.leaves.is_empty());
85 assert!(!dendrogram.color_list.is_empty());
86}
87
88#[test]
89fn test_quasi_diagonalization() {

Callers

nothing calls this directly

Calls 3

plot_clustersMethod · 0.80
load_prices_and_namesFunction · 0.70
allocateMethod · 0.45

Tested by

no test coverage detected