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

Function dates

crates/openquant/tests/bet_sizing.rs:7–11  ·  view source on GitHub ↗
(n: usize, start: &str, days: i64)

Source from the content-addressed store, hash-verified

5use std::path::Path;
6
7fn dates(n: usize, start: &str, days: i64) -> Vec<NaiveDateTime> {
8 let base =
9 chrono::NaiveDate::parse_from_str(start, "%Y-%m-%d").unwrap().and_hms_opt(0, 0, 0).unwrap();
10 (0..n).map(|i| base + Duration::days(i as i64 * days)).collect()
11}
12
13fn load_prob_dynamic_budget_fixture() -> Value {
14 let fixture_path = Path::new(env!("CARGO_MANIFEST_DIR"))

Calls

no outgoing calls

Tested by

no test coverage detected