feat(PORT-001A): add collateral entry basis settings
This commit is contained in:
@@ -272,13 +272,30 @@ DATA-001 (Price Feed)
|
||||
|
||||
**Dependencies:** stable deployed app on VPS
|
||||
|
||||
### PORT-001A: Collateral Entry Basis in Settings [P1, M] **[depends: PORT-001]**
|
||||
**As a** portfolio manager, **I want** to store my collateral entry basis **so that** the dashboard can derive position size consistently from either cost basis or weight.
|
||||
|
||||
**Acceptance Criteria:**
|
||||
- Settings supports entering either:
|
||||
- total collateral start value **and** entry price, or
|
||||
- gold weight directly
|
||||
- Updating one mode calculates the other representation automatically
|
||||
- Persist both the chosen input mode and the derived values needed by the app
|
||||
- Validation prevents impossible or contradictory values (zero/negative price, value, or weight)
|
||||
- UI makes the relationship explicit: `weight = start_value / entry_price`
|
||||
- Browser-visible test covers switching modes and saving derived values
|
||||
|
||||
**Technical Notes:**
|
||||
- Extend `PortfolioConfig` / settings persistence with entry-basis fields
|
||||
- Keep overview and other consumers compatible with existing portfolio settings
|
||||
- Prefer a single canonical stored representation plus derived display fields to avoid drift
|
||||
|
||||
**Dependencies:** PORT-001
|
||||
|
||||
## Implementation Priority Queue
|
||||
|
||||
1. **DATA-002A** - Fix options UX/performance regression
|
||||
2. **DATA-001A** - Remove misleading mock overview price
|
||||
3. **OPS-001** - Add Caddy route once app behavior is stable
|
||||
4. **DATA-003** - Risk metrics
|
||||
5. **PORT-002** - Risk management safety
|
||||
6. **EXEC-001** - Core user workflow
|
||||
7. **EXEC-002** - Execution capability
|
||||
8. Remaining features
|
||||
1. **PORT-001A** - Add collateral entry basis and derived weight/value handling in settings
|
||||
2. **PORT-002** - Risk management safety
|
||||
3. **EXEC-001** - Core user workflow
|
||||
4. **EXEC-002** - Execution capability
|
||||
5. Remaining features
|
||||
|
||||
Reference in New Issue
Block a user