yuzu-data 0.1.0

Native I/O layer: reads gzip CSV price and fundamental files into yuzu-core panels.
Documentation

citrusinvest engine

license rust

The open-source Rust backtest + strategy engine behind citrusinvest — the yuzu backtest core plus the lemon strategy DSL. Pure, I/O-free math: (strategy spec JSON, data panels) -> Report. It compiles to both native (batch backtests via Rayon) and WASM (browser/Worker).

Top-level entry (in the yuzu-core crate):

yuzu_core::run_backtest(spec_json, ctx, price_key, cfg) -> Result<Report, EngineError>
// ctx: &EvalContext (numeric panels keyed by series name + a symbol→industry map)

Architecture, DSL vocabulary, NAV model, metric conventions, and the Report JSON contract live in docs/backtest-engine.md.

Build

cargo build --workspace

WASM

The two wasm crates build to a repo-local dist/ by default:

bash scripts/build-yuzu-wasm.sh    # -> dist/yuzu   (yuzu-core backtest boundary)
bash scripts/build-lemon-wasm.sh   # -> dist/lemon  (lemon parse/format)

Override the output directory with OUT:

OUT=/path/to/pkg bash scripts/build-yuzu-wasm.sh

(Requires wasm-pack.)

Test

cargo test

Coverage

# one-time: rustup component add llvm-tools-preview && cargo install cargo-llvm-cov
cargo llvm-cov --summary-only

The cargo llvm-cov run also executes the test suite, so it doubles as the test step.

Contributing

See CONTRIBUTING.md.

License

MIT — see LICENSE.