()
| 9 | } |
| 10 | |
| 11 | fn load_prices() -> Vec<f64> { |
| 12 | let path = std::path::Path::new(env!("CARGO_MANIFEST_DIR")) |
| 13 | .join("../../tests/fixtures/microstructural_features/tick_data.csv"); |
| 14 | let mut rdr = ReaderBuilder::new().has_headers(true).from_path(path).unwrap(); |
| 15 | let mut prices = Vec::new(); |
| 16 | for rec in rdr.deserialize::<TickRow>() { |
| 17 | prices.push(rec.unwrap().price); |
| 18 | } |
| 19 | prices |
| 20 | } |
| 21 | |
| 22 | #[test] |
| 23 | fn test_ewma() { |