stock-bot/docs/development/backlog/tasks/S05.md

4.2 KiB

S05 — Add a small composable multi-signal regime example

Parent epic: E4. Priority/severity: P2 / Medium. Relative complexity: M. Recommended specialization: Quant strategy research.

Scheduling source of truth: manifest entry S05. No task is authorized until the plan is approved. Dependencies and decision references below describe the design; the manifest controls current readiness.

Evidence and root cause

Intended behavior and implementation scope

Adapt the existing mean-reversion idea as a second TS strategy/example and compose trend/momentum scores plus a simple fixed/training-only volatility regime using reviewed calculations. Ordinary functions, no universal signal/regime framework. Code/decision tests can land before R08; conclusions about performance require R08 validation.

Exclusions

No unrelated refactor, new service or broker activation.

Likely files and ownership

  • apps/stock/orchestrator/src/strategies/builtin/
  • apps/stock/orchestrator/src/strategies/StrategyRegistry.ts
  • libs/calculations/

Write locks: example-strategy. One agent owns this change. Lock names do not override actual overlapping files.

Dependencies and blockers

Implementation requires S02, F08 integrated.

No additional economic-policy approval is needed for this narrowly scoped task.

Feature activation/release gates: R08. These do not block implementing or integrating this component against its own tests.

Parallel eligibility: only with disjoint actual files and reserved write locks; read FIRST-WAVE.md for the initial exact ownership boundaries.

Acceptance criteria

  • Two strategy instances sharing an asset maintain independent state/basis and route fills correctly.
  • Exit is not blocked by entry-only volume filters; thresholds and owner budgets are explicit.
  • Regime/no-regime ablation inputs and cost-sensitivity recipe are reproducible; no alpha claim before validation release gate.

Mandatory tests

  • signal_composition_units, regime_boundary_availability, multi_strategy_ownership, no_regime_ablation_reproducibility.

Apply the relevant quality gates; submit exact commands, outcomes and skipped checks. Named cases above are required regression scenarios, not claims that those tests already exist.

Regression risks and rollback

Compatibility or lifecycle regression; preserve frozen inputs, old results and existing failure tests. Keep migrations additive and previous results readable. Do not add a switch that restores a correctness defect. Versioned cutover/migration is required only when persisted contracts or active engines change; never silently fall back to old economics.

Handoff

Report scope changes (if any), fixture expectations, API/schema changes, measurements, remaining limitations and commit/PR references once authorized. Request independent review; only the integration/planning owner may mark the manifest done.