Skip to main content

yuzu_research/
lib.rs

1//! Multi-run backtest research over `yuzu-core`.
2//!
3//! `yuzu-core` runs one backtest; the *research primitives* (factor IC/ICIR,
4//! event study, forward/daily returns) live in `yuzu-core::research`. This crate
5//! is the layer above: it **composes** those into multi-run analyses over a
6//! synced data-layout tree — parameter **sweeps**, **grids**, **walk-forward**
7//! selection, and **lookahead-bias** detection — plus the data-loading glue
8//! that turns a `prices/` tree into an `EvalContext`.
9//!
10//! It sits between the data/engine crates and the front ends: `pomelo-*` /
11//! `yuzu-core` → `yuzu-research` → `yuzu-cli` (or a backend research service).
12//! Everything returns serializable report structs; no CLI, no argument parsing.
13//!
14//! One module per analysis (plus the shared [`ctx`] loader); the public API is
15//! flattened by the re-exports below.
16
17mod ctx;
18mod grid;
19mod lookahead;
20mod research;
21mod sweep;
22mod walkforward;
23
24pub use grid::{expand_grid, GridSpec};
25pub use lookahead::{
26    run_lookahead, run_lookahead_profile, LookaheadLeg, LookaheadProfile, LookaheadProfilePoint,
27    LookaheadReport, PROFILE_SHIFTS,
28};
29pub use research::{run_event, run_factor};
30pub use sweep::{run_single, run_sweep, SortKey, SweepEntry};
31pub use walkforward::{
32    max_lookback, run_walkforward, WalkForwardParams, WalkForwardReport, WalkForwardWindow,
33};