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

Function clean_and_align_rows

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

Source from the content-addressed store, hash-verified

42
43#[test]
44fn clean_and_align_rows() {
45 let rows = sample_rows();
46 let (clean, report) = clean_ohlcv_rows(&rows, true);
47 assert_eq!(clean.len(), 2);
48 assert_eq!(report.rows_removed_by_deduplication, 1);
49 assert_eq!(report.duplicate_key_count, 0);
50
51 let aligned = align_calendar_rows(&clean, 60).expect("align");
52 assert_eq!(aligned.len(), 2);
53 assert!(!aligned[0].is_missing_bar);
54 assert!(!aligned[1].is_missing_bar);
55}

Callers

nothing calls this directly

Calls 3

sample_rowsFunction · 0.85
clean_ohlcv_rowsFunction · 0.85
align_calendar_rowsFunction · 0.85

Tested by

no test coverage detected