Commit Graph

4 Commits

Author SHA1 Message Date
Andrew Kaszubski a17fc1f029 feat(agents): add Position Sizing Manager with Kelly and risk parity - Fixes #16
Implements Position Sizing Manager for optimal position sizing calculations.
The manager supports multiple sizing methodologies to accommodate different
trading styles and risk tolerances.

Sizing Methods:
- Kelly Criterion (full, half, quarter) for edge-based optimal sizing
- ATR-based sizing for volatility-adjusted position sizing
- Risk Parity allocation for balanced portfolio risk
- Volatility targeting for consistent risk contribution
- Fixed fractional for controlled percentage risk

Key Features:
- Multiple sizing method comparison for best fit selection
- Risk level presets (conservative, moderate, aggressive)
- Position constraints and drawdown limits
- Stop loss level recommendations based on ATR
- Win/loss ratio analysis for Kelly calculations

Tools:
- calculate_kelly_position_size: Edge-based optimal sizing
- calculate_atr_position_size: Volatility-adjusted position sizing
- calculate_risk_parity_allocation: Multi-asset balanced risk allocation
- calculate_volatility_target_size: Target volatility-based sizing
- get_position_sizing_recommendation: Comprehensive multi-method comparison

Enums:
- SizingMethod: 8 different sizing approaches
- RiskLevel: Conservative, moderate, aggressive presets

Tests: 52 unit tests covering Kelly calculations, ATR sizing, risk parity
weights, volatility targeting, constraints, and integration workflows.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 17:39:20 +11:00
Andrew Kaszubski b0140a82b3 feat(agents): add Correlation Analyst for cross-asset analysis - Fixes #15
Implements Correlation Analyst agent for cross-asset correlation analysis
and sector rotation detection. The agent analyzes inter-market relationships
to identify diversification opportunities and sector leadership changes.

Features:
- Cross-asset correlation analysis (stocks vs bonds, gold, oil, dollar)
- Sector rotation analysis across all 11 S&P 500 sectors
- Rolling correlation trend tracking with breakdown detection
- Relative strength calculation for sector leadership
- Economic cycle phase identification (early/mid/late cycle, recession)
- Cycle-based sector recommendations

Tools:
- get_cross_asset_correlation_analysis: Multi-asset correlation with regime interpretation
- get_sector_rotation_analysis: Sector rankings, leadership, rotation signals
- get_correlation_matrix: Pairwise correlation matrix for portfolio construction
- get_rolling_correlation_trend: Time-series correlation dynamics

Enums:
- CorrelationStrength: 9-level classification from very strong negative to very strong positive
- SectorPhase: Economic cycle phases for rotation timing
- SectorLeadership: Leading, lagging, improving, weakening classifications

Tests: 59 unit tests covering correlation calculations, classification logic,
sector rotation, breakdown detection, and integration scenarios.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 17:30:53 +11:00
Andrew Kaszubski bdff87a571 feat(agents): add Macro Analyst with FRED interpretation - Fixes #14
Implements Macro Analyst agent for economic regime detection and FRED data
interpretation. The agent analyzes macroeconomic indicators to identify
market regimes and provide investment implications.

Features:
- Economic regime detection (expansion, contraction, goldilocks, stagflation)
- Yield curve analysis (normal, inverted, flat, steep)
- Monetary policy stance classification (hawkish, dovish, neutral, emergency)
- Inflation regime tracking (deflation, low, target, elevated, high)
- Recession probability calculation based on yield curve inversions
- Real rate analysis for policy restrictiveness

Tools:
- get_economic_regime_analysis: GDP, unemployment, inflation regime detection
- get_yield_curve_analysis: 2Y-10Y spread analysis with recession probability
- get_monetary_policy_analysis: Fed policy stance interpretation
- get_inflation_regime_analysis: CPI/PCE trajectory and asset implications

Tests: 57 unit tests covering all classification logic, edge cases, and
integration scenarios.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 17:23:30 +11:00
Andrew Kaszubski 8522b4bd53 feat(agents): add Momentum Analyst with multi-TF analysis - Fixes #13
Implements specialized Momentum Analyst agent with:
- Multi-timeframe ROC (Rate of Change) analysis across periods
- ADX (Average Directional Index) trend strength measurement
- RSI momentum divergence detection for reversal signals
- create_momentum_analyst factory for LangChain integration

Tests: 47 unit tests covering ROC, ADX, RSI, divergence detection

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-26 17:12:01 +11:00