robinhood-options-mobile

Autonomous Agentic Risk Copilot

Overview

The Autonomous Agentic Risk Copilot (RiskCopilotService) provides continuous portfolio surveillance across three core danger vectors:

  1. Overnight Gap Risk: Assesses after-hours and weekend price vulnerability on broad indices, high-beta single stocks, leveraged ETFs (e.g., TQQQ, SOXL), and short option contracts.
  2. Earnings Hazard Warnings: Cross-references held positions against the upcoming earnings calendar and quantitative IV crush models, warning of 40%–70% extrinsic value collapse on long options and explosive gamma tail jumps on short options.
  3. Suggested Delta Hedges: Quantifies directional delta exposure ($ move per 1% underlying shift) and computes precise share hedges and option protective structures (protective puts, covered collars, delta rebalancing) through deep integration with DeltaNeutralService.

The engine generates an actionable Safety Score (0–100), an overall Risk Severity (normal, elevated, high, critical), and a prioritized Mitigation Action Checklist with one-tap deep-linking directly into relevant trading tools.


Features & Analytical Capabilities

1. Overnight Gap Risk Engine

2. Earnings Hazard Warning System

3. Suggested Delta Hedges Engine

4. Prioritized Mitigation Action Checklist


Domain Architecture

lib/model/risk_copilot_model.dart
├── RiskCopilotSeverity (normal, elevated, high, critical)
├── EarningsHazardType (ivCrush, gammaTailRisk, earningsGap)
├── GapRiskAssessment
├── EarningsHazardAssessment
├── DeltaHedgeAssessment
├── RiskCopilotMitigationAction
└── RiskCopilotReport (JSON serialization, metrics, safety score)

Key Interfaces

class RiskCopilotReport {
  final DateTime generatedAt;
  final RiskCopilotSeverity overallSeverity;
  final double overallScore; // 0 - 100
  final String statusHeadline;
  final String summary;
  final double totalOvernightGapExposure;
  final double portfolioNetDelta;
  final List<GapRiskAssessment> gapRisks;
  final List<EarningsHazardAssessment> earningsHazards;
  final List<DeltaHedgeAssessment> deltaHedges;
  final List<RiskCopilotMitigationAction> mitigationActions;
}

UI Components & Navigation

  1. AgenticRiskCopilotCard (lib/widgets/portfolio/agentic_risk_copilot_card.dart):
    • Progressive-disclosure analytics card embedded directly on the Portfolio > Risk section page (RiskSectionPage).
    • Displays live Safety Score (with color-coded gauge), critical hazard badges, top mitigation actions, and an expandable preview.
    • Includes a “View Full Copilot Report” CTA navigating to RiskCopilotWidget.
  2. RiskCopilotWidget (lib/widgets/risk_copilot_widget.dart):
    • Comprehensive full-screen copilot dashboard.
    • Header summary banner with safety score gauge, risk badge, and executive summary.
    • Key metric pills: Overnight Gap Risk, Net Delta, and Imminent Earnings countdown.
    • Interactive checklist of prioritized mitigation actions with direct action buttons.
    • Three tab views:
      • Overnight Gap: Position notional, beta, estimated gap %, and dollar exposure breakdown.
      • Earnings Hazards: Implied moves, crush probabilities, and position warnings.
      • Delta Hedges: Net delta, dollar move per 1%, share hedge suggestions, and option hedge recommendations.
  3. Action Center Integration (PortfolioAlertService):
    • Evaluates copilot report and generates actionable alerts with PortfolioAlertTarget.riskCopilot.
    • Critical alerts (risk-copilot-critical-gap, risk-copilot-earnings-iv-crush) trigger high-visibility alerts with direct navigation into the Risk Copilot view.
    • Normal portfolios suppress noise to maintain high signal-to-noise ratio.

Verification & Testing