ilia
|
34aebb1c2e
|
PR4: Phase 2 Analytics Foundation
Complete analytics module with returns, benchmarks, and performance metrics.
New Modules:
- src/pote/analytics/returns.py: Return calculator for trades
- src/pote/analytics/benchmarks.py: Benchmark comparison & alpha
- src/pote/analytics/metrics.py: Performance aggregations
Scripts:
- scripts/analyze_official.py: Analyze specific official
- scripts/calculate_all_returns.py: System-wide analysis
Tests:
- tests/test_analytics.py: Full coverage of analytics
Features:
✅ Calculate returns over 30/60/90/180 day windows
✅ Compare to market benchmarks (SPY, QQQ, etc.)
✅ Calculate abnormal returns (alpha)
✅ Aggregate stats by official, sector
✅ Top performer rankings
✅ Disclosure timing analysis
✅ Command-line analysis tools
~1,210 lines of new code, all tested
|
2025-12-15 11:33:21 -05:00 |
|