26 lines
1.3 KiB
YAML
26 lines
1.3 KiB
YAML
id: PORTFOLIO-001
|
|
title: Position-Level Portfolio Entries
|
|
status: backlog
|
|
priority: P0
|
|
size: M
|
|
depends_on: []
|
|
tags: [portfolio, domain-model]
|
|
summary: Evolve from single-quantity portfolio to multi-position entries with individual entry dates and prices.
|
|
acceptance_criteria:
|
|
- User can add a position entry with underlying type (GLD shares, GC=F contracts, XAU grams/oz)
|
|
- Each position has its own entry_price, entry_date, quantity
|
|
- Portfolio page shows list of positions with individual P&L
|
|
- Portfolio total collateral is sum of all position values in display currency
|
|
- Backward compatible: existing single-entry portfolios migrate to one position entry
|
|
- Settings page has "Add Position" and "Remove Position" controls
|
|
- Position CRUD persists to workspace storage
|
|
notes:
|
|
- This is foundational for mode switching between GLD/GC=F/physical gold
|
|
- Entry_date matters for conversion lookups (GLD backing varies by date)
|
|
- Single-quantity legacy portfolios should auto-migrate to one position
|
|
implementation_hints:
|
|
- Add `Position` dataclass in `app/models/portfolio.py`
|
|
- Add `positions: List[Position]` to `PortfolioConfig` (migrate `gold_ounces`/`entry_price` to first position)
|
|
- Position underlying defaults to "GLD" for backward compat
|
|
- Entry_date defaults to position creation date if not specified
|
|
- Storage costs deferred to PORTFOLIO-002 |