---
name: alpha-decay
description: Detect and analyze strategy alpha decay signals
argument-hint: "[--strategy id|--all|--threshold pct|--period days]"
---

# Alpha Decay Detection

Detect and analyze alpha decay in trading strategies using statistical methods.

## Usage

- `/alpha-decay` - Check all active strategies
- `/alpha-decay --strategy momentum-001` - Analyze specific strategy
- `/alpha-decay --threshold 0.3` - Custom decay threshold
- `/alpha-decay --period 90` - Analysis period in days
- `/alpha-decay --detailed` - Show detailed decay metrics

## Decay Indicators

| Indicator | Description | Warning Level |
|-----------|-------------|---------------|
| Sharpe Decay | Rolling Sharpe ratio decline | > 30% decline |
| IC Decay | Information coefficient drop | IC < 0.02 |
| Hit Rate | Win rate degradation | < 45% |
| Capacity | Returns vs AUM correlation | r < -0.3 |
| Regime | Regime change detection | Confidence > 0.8 |

## Related Files

- `scripts/risk_management/strategy_analytics.py` - AlphaDecayDetector class
- `scripts/risk_management/alpha_research.py` - Signal evaluation
- `services/risk/risk_manager.py` - Strategy monitoring

## Instructions

When this skill is invoked:

1. Parse arguments:
   - No args: Scan all active strategies
   - `--strategy <id>`: Single strategy analysis
   - `--threshold`: Custom decay threshold (default 0.3)
   - `--period`: Lookback period in days (default 60)

2. Load strategy data:
   - Fetch returns from database/API
   - Get strategy metadata and targets
   - Load benchmark/factor returns

3. Run decay detection:
   ```python
   from risk_management.strategy_analytics import AlphaDecayDetector

   detector = AlphaDecayDetector(
       decay_threshold=0.3,
       confidence_level=0.95,
       lookback_window=60
   )
   signals = detector.detect_decay(returns)
   ```

4. Display decay report:
   ```
   Alpha Decay Analysis
   ═══════════════════════════════════════════════════════════

   Strategy: momentum-001
   Period: Last 60 days
   Status: ⚠️  WARNING - Decay signals detected

   DECAY SIGNALS
   ─────────────────────────────────────────────────────────
   Signal          Severity    Confidence    Description
   ─────────────────────────────────────────────────────────
   Sharpe Decay    0.65        87%          Sharpe dropped 42%
   IC Decay        0.45        72%          IC now 0.015 (was 0.04)
   Hit Rate        0.30        65%          Win rate 43% (target 52%)

   METRICS COMPARISON
   ─────────────────────────────────────────────────────────
   Metric          Current     Historical    Change
   ─────────────────────────────────────────────────────────
   Sharpe Ratio    0.85        1.45          -41%
   IC Mean         0.015       0.042         -64%
   Hit Rate        43%         52%           -17%
   Avg Return      0.02%       0.08%         -75%

   RECOMMENDATIONS
   ─────────────────────────────────────────────────────────
   1. Review regime indicators - potential regime change
   2. Check for crowding in signal factors
   3. Validate data inputs for drift
   4. Consider reducing position sizing by 50%
   ```

5. For `--detailed`:
   - Rolling IC time series
   - Distribution shift analysis
   - Factor exposure changes
   - Correlation regime changes

6. Severity thresholds:
   - ACTIVE: No decay (severity < 0.3)
   - WARNING: Moderate decay (0.3 <= severity < 0.6)
   - CRITICAL: Severe decay (severity >= 0.6)
