31 lines
1.4 KiB
YAML
31 lines
1.4 KiB
YAML
id: DISPLAY-001
|
|
title: Underlying Mode Switching
|
|
status: backlog
|
|
priority: P0
|
|
size: M
|
|
depends_on:
|
|
- PORTFOLIO-001
|
|
- DATA-004
|
|
tags: [ui, display-mode]
|
|
summary: Allow the entire app to switch between GLD, GC=F, and XAU display modes.
|
|
acceptance_criteria:
|
|
- Settings page has "Display Mode" selector: GLD shares, Gold Ounces, Gold Grams, GC=F contracts
|
|
- In GLD mode: GLD positions show direct values, other positions converted using entry-date GLD backing
|
|
- In Gold mode: All positions converted to equivalent oz/g using entry-date conversions
|
|
- In GC=F mode: GC=F positions show direct values, others converted
|
|
- Overview shows collateral in display mode units
|
|
- Hedge page shows protection in display mode units
|
|
- Backtests show results in display mode units
|
|
- Mode persists per workspace
|
|
notes:
|
|
- Conversion uses GLD_ounces_per_share(entry_date) for historical accuracy
|
|
- GC=F contract size is fixed at 100 oz
|
|
- XAU grams to oz conversion: 31.1035 g/oz
|
|
- Mode switching is a display concern, not a data concern
|
|
- Position data remains in original units
|
|
implementation_hints:
|
|
- Add `display_mode: "GLD" | "XAU_OZ" | "XAU_G" | "GCF"` to `PortfolioConfig`
|
|
- Add `convert_to_display(position, display_mode, reference_date)` in `app/domain/conversions.py`
|
|
- Reuse existing `gld_ounces_per_share(date)` for historical conversion
|
|
- Overview/hedge/backtests use display conversion layer
|
|
- Settings page saves display_mode preference |