19 Commits

Author SHA1 Message Date
Bu5hm4nn
70b09cbf0b fix(backtest): remove BT-001A exact window restriction now that full data access is available
- Change WindowPolicy from EXACT to BOUNDED for backtest fixture
- Pass data_source to run_read_only_scenario so real data can be used
- Fix injected provider identity preservation in BacktestPageService
- Add type: ignore for BacktestHistoricalProvider protocol assignment
- Revert TypedDict change to avoid cascading type issues in pages/
- Update tests to reflect new BOUNDED policy behavior
2026-03-30 08:57:15 +02:00
Bu5hm4nn
8e1aa4ad26 fix(lint): remove unused imports and reformat with black 2026-03-30 08:42:07 +02:00
Bu5hm4nn
98e3208b5e fix(review): address PR review findings for CORE-003
Critical fixes:
- Add math.isfinite() check to reject NaN/Infinity in _safe_quote_price
- Raise TypeError instead of silent 0.0 fallback in price_feed.py
- Use dict instead of Mapping for external data validation

Type improvements:
- Add PortfolioSnapshot TypedDict for type safety
- Add DisplayMode and EntryBasisMode Literal types
- Add explicit dict[str, Any] annotation in to_dict()
- Remove cast() in favor of type comment validation
2026-03-30 00:39:02 +02:00
Bu5hm4nn
887565be74 fix(types): resolve all mypy type errors (CORE-003)
- Fix return type annotation for get_default_premium_for_product
- Add type narrowing for Weight|Money union using _as_money helper
- Add isinstance checks before float() calls for object types
- Add type guard for Decimal.exponent comparison
- Use _unit_typed and _currency_typed properties for type narrowing
- Cast option_type to OptionType Literal after validation
- Fix provider type hierarchy in backtesting services
- Add types-requests to dev dependencies
- Remove '|| true' from CI type-check job

All 36 mypy errors resolved across 15 files.
2026-03-30 00:05:09 +02:00
Bu5hm4nn
367960772b chore: add CORE-003 roadmap task for mypy type safety
- Remove '|| true' from CI type-check job to enforce strict checking
- Begin type narrowing pattern in units.py with _typed property accessors
- Document all 42 type errors across 15 files in roadmap backlog
- Priority: medium, estimated 4-6 hours to complete

Type errors fall into categories:
- Union types not narrowed after __post_init__ coercion
- float() on object types
- Duplicate method definitions
- Provider interface type mismatches
2026-03-29 23:40:55 +02:00
Bu5hm4nn
dc4ee1f261 feat(CONV-001): add GLD launch date validation, feat(DATA-DB-003): add cache CLI
CONV-001:
- Add GLD_LAUNCH_DATE constant (November 18, 2004)
- Validate reference_date in gld_ounces_per_share()
- Raise ValueError for dates before GLD launch
- Update docstring with valid date range
- Add comprehensive test coverage for edge cases

DATA-DB-003:
- Create scripts/cache_cli.py with three commands:
  - vault-dash cache stats: Show cache statistics
  - vault-dash cache list: List cached entries
  - vault-dash cache clear: Clear all cache files
- Add Makefile targets: cache-stats, cache-list, cache-clear
- Integrate with DatabentoHistoricalPriceSource methods
2026-03-29 12:00:30 +02:00
Bu5hm4nn
63a8482753 feat(DISPLAY-002): GLD mode shows real share prices 2026-03-28 21:59:15 +01:00
Bu5hm4nn
dac0463d55 feat(DISPLAY-002): GLD mode shows real share prices 2026-03-28 21:45:00 +01:00
Bu5hm4nn
20f5086507 feat(DISPLAY-001): add underlying mode switching 2026-03-28 21:44:32 +01:00
Bu5hm4nn
3b98ebae69 feat(DATA-004): add underlying instrument selector 2026-03-28 16:40:18 +01:00
Bu5hm4nn
894d88f72f feat(PRICING-001): add GLD expense ratio decay correction 2026-03-28 09:04:35 +01:00
Bu5hm4nn
87900b01bf fix(CORE-002C): align historical units with workspace weight 2026-03-25 21:37:55 +01:00
Bu5hm4nn
aae67dfd9b fix(workspaces): seed new defaults from live quote 2026-03-25 19:48:58 +01:00
Bu5hm4nn
bfb6c71be3 fix(pricing): correct relative hedge payoff calculations 2026-03-25 19:27:26 +01:00
Bu5hm4nn
829c0b5da2 feat(CORE-002B): roll out hedge quote unit conversion 2026-03-25 15:46:44 +01:00
Bu5hm4nn
f0d7ab5748 feat(CORE-002): add GLD share quote conversion seam 2026-03-25 14:52:48 +01:00
Bu5hm4nn
c7c8654be7 feat(CORE-001C): type historical unit materialization 2026-03-24 22:30:36 +01:00
Bu5hm4nn
7c2729485c feat(CORE-001B): migrate overview and hedge math to unit types 2026-03-24 21:57:40 +01:00
Bu5hm4nn
a69fdf6762 feat(CORE-001A): add decimal unit value foundation 2026-03-24 21:33:17 +01:00