Expand description
Shared raw-signal validation.
RawSignal is owned by this crate, so its semantic validation belongs here
too. Before this module existed the checks were duplicated: qs-signal-parser
held the full set behind a crate-private function and qs-backtest-server
re-implemented a narrower subset with a different error type. Neither was
reachable by other consumers, and the two could drift.
The engine remains the hard backstop for the invariants it owns (a partial
close ratio outside (0, 1] is rejected at apply time regardless of what
reaches it). This module exists so a caller can reject a bad signal early,
with a useful reason, on every entry path rather than only on the parser path.
§Message stability
The Display text of RawSignalValidationError is reproduced verbatim in
committed parser outcome goldens through ParseFailure::InvalidSignal.
Changing a message rewrites those goldens, so treat these strings as part of
the observable contract and not as free-form diagnostics.
Enums§
- RawSignal
Validation Error - A raw signal that violates the common signal contract.
Functions§
- validate_
raw_ signal - Validate one raw signal against the common signal contract.
- validate_
raw_ signals - Validate a batch, returning the first violation in slice order.