From 68cb2aa51adc09d55131b7626264108fabdd29c5 Mon Sep 17 00:00:00 2001 From: Bu5hm4nn Date: Tue, 24 Mar 2026 19:01:55 +0100 Subject: [PATCH] docs: update workflow and backtest UI backlog --- AGENTS.md | 6 ++++ docs/ROADMAP.md | 73 +++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 73 insertions(+), 6 deletions(-) diff --git a/AGENTS.md b/AGENTS.md index 629c2e3..347d056 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -40,6 +40,12 @@ - Do not merge worktree changes back based only on compile/test results. - Review first, then integrate. +9. **Review the backlog after each sprint.** + - After each completed sprint or merged feature slice, review `docs/ROADMAP.md`. + - Add any new backlog items uncovered during implementation, testing, review, or deployment. + - Reorder priorities and update dependencies based on new knowledge. + - Capture follow-up work explicitly instead of relying on memory or chat context. + ## Project Learnings ### NiceGUI layout constraint diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index e3d8ee9..06190f4 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -352,13 +352,74 @@ DATA-001 (Price Feed) **Dependencies:** BT-001 +### BT-001A: Backtest Scenario Runner UI [P1, M] **[depends: BT-001, EXEC-001A, PORT-001]** +**As a** portfolio manager, **I want** a thin backtest page where I can run a synthetic scenario and inspect the result **so that** the BT-001 engine is available through the product UI instead of only tests/services. + +**Acceptance Criteria:** +- Add a backtest page with a simple scenario form for: + - symbol + - start date + - end date + - template selection + - underlying units + - entry spot + - loan amount + - margin call LTV +- Running the form executes the existing BT-001 synthetic backtest service +- Results show at least: + - start value + - end unhedged value + - end hedged net value + - total hedge cost + - max LTV unhedged / hedged + - margin-call outcome +- Results include a visible daily path chart/table comparing unhedged vs hedged values +- Invalid scenarios surface user-visible validation errors instead of server errors +- Browser test verifies the page can run one deterministic scenario end-to-end + +**Technical Notes:** +- Keep this slice read-only and in-process; no run persistence required yet +- Reuse existing BT-001 models/services rather than adding a second execution path +- Prefer a single page that renders metrics first and a compact path visualization second +- Do not block on historical option snapshot providers; synthetic pricing is sufficient for the first UI slice + +**Dependencies:** BT-001, EXEC-001A, PORT-001 + +### BT-003A: Event Comparison UI Read Path [P1, M] **[depends: BT-003, BT-001A]** +**As a** portfolio manager, **I want** to select a named selloff event and compare template outcomes in the UI **so that** event-comparison results are visible without invoking services manually. + +**Acceptance Criteria:** +- Add an event comparison page or section that lets the user select: + - event preset + - one or more strategy templates + - initial portfolio inputs +- Running the comparison executes the existing BT-003 comparison service +- UI displays ranked strategy results with at least: + - rank + - template name + - survived margin call + - max hedged LTV + - hedge cost + - final equity +- UI shows the selected event window metadata and the scenario dates actually used +- UI shows at least one simple visual comparison of hedged vs unhedged path behavior +- Empty template selection and invalid inputs surface user-visible validation states +- Browser test verifies one seeded event preset comparison renders ranked results + +**Technical Notes:** +- Start with existing seeded event presets from `config/event_presets.json` +- Keep this slice read-only; no saved reports/downloads required yet +- Reuse `EventComparisonService` and avoid duplicating ranking logic in the UI layer +- Keep the output intentionally thin: ranked table first, deeper charts/details later + +**Dependencies:** BT-003, BT-001A + ## Implementation Priority Queue -1. **EXEC-001A** - Define named strategy templates as the foundation for backtesting -2. **BT-001** - Ship synthetic historical backtesting over GLD history +1. **BT-001A** - Put the synthetic backtest engine behind a thin product UI/read path +2. **BT-003A** - Expose event preset comparisons in the UI 3. **PORT-003** - Historical LTV visibility and export groundwork 4. **BT-002** - Upgrade backtests to real daily options snapshots -5. **BT-003** - Event comparison reporting -6. **EXEC-001** - Core user workflow -7. **EXEC-002** - Execution capability -8. Remaining features +5. **EXEC-001** - Core user workflow +6. **EXEC-002** - Execution capability +7. Remaining features