TradingAgents/tests/unit/api
Andrew Kaszubski 6642047eaa feat(portfolio): add Portfolio State for holdings and mark-to-market - Issue #29 (68 tests)
Implements comprehensive portfolio state management:
- Holding dataclass with long/short support and P&L calculations
- CashBalance for multi-currency cash management
- PortfolioState class with:
  - Real-time mark-to-market valuation
  - Multi-currency support with exchange rate conversion
  - Thread-safe state updates
  - Position tracking with average cost calculation
  - Portfolio snapshots for historical tracking
- PriceProvider and ExchangeRateProvider protocols
- Serialization/deserialization support

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 21:37:17 +11:00
..
TEST_PORTFOLIO_SUMMARY.md feat(portfolio): add Portfolio State for holdings and mark-to-market - Issue #29 (68 tests) 2025-12-26 21:37:17 +11:00
TEST_SETTINGS_SUMMARY.md feat(portfolio): add Portfolio State for holdings and mark-to-market - Issue #29 (68 tests) 2025-12-26 21:37:17 +11:00
TEST_TRADE_SUMMARY.md feat(portfolio): add Portfolio State for holdings and mark-to-market - Issue #29 (68 tests) 2025-12-26 21:37:17 +11:00
conftest.py feat(db): add Settings model with risk profiles and alert preferences (#5) - Implements RiskProfile enum, risk parameters, JSON alert_preferences, one-to-one User relationship, CheckConstraints, cascade delete, 43 tests 2025-12-26 14:16:42 +11:00
test_api_key_service.py feat(portfolio): add Portfolio State for holdings and mark-to-market - Issue #29 (68 tests) 2025-12-26 21:37:17 +11:00
test_portfolio_model.py feat(db): add Portfolio model with LIVE/PAPER/BACKTEST types - Fixes #4 2025-12-26 13:46:39 +11:00
test_settings_model.py feat(db): add Settings model with risk profiles and alert preferences (#5) - Implements RiskProfile enum, risk parameters, JSON alert_preferences, one-to-one User relationship, CheckConstraints, cascade delete, 43 tests 2025-12-26 14:16:42 +11:00
test_trade_model.py feat(db): add Trade model with CGT tracking and Australian FY support (#6) - TradeSide/TradeStatus/TradeOrderType enums, 50% discount for >12mo holdings, multi-currency FX, 87 tests 2025-12-26 14:46:06 +11:00
test_validators.py feat(portfolio): add Portfolio State for holdings and mark-to-market - Issue #29 (68 tests) 2025-12-26 21:37:17 +11:00