robinhood-options-mobile

RiskGuard

Overview

RiskGuard is RealizeAlpha’s advanced risk management engine designed to protect capital by enforcing portfolio-level safety rules. Originally developed for the Agentic Trading system, RiskGuard now extends its protection to manual trading, providing a safety net against impulsive or high-risk decisions.

Manual Trading Protection

RiskGuard integrates directly into the manual trading workflows for Stocks, Options, and Crypto. Before an order is previewed, the system validates the proposed trade against a set of risk rules defined in the backend.

Workflow

  1. Validation: When a user attempts to preview an order, the app calls the validateTrade Cloud Function.
  2. Risk Assessment: The backend evaluates the trade against current portfolio state, checking for:
    • Concentration Risk: Preventing over-exposure to a single asset.
    • Sector Risk: Limiting exposure to a specific market sector.
    • Drawdown Protection: Restricting trading during significant portfolio drawdowns.
    • Volatility Checks: Warning against trading in extreme volatility conditions.
  3. User Feedback:
    • Safe: If the trade passes all checks, the order preview proceeds normally.
    • Risk Detected: If a risk is identified, a Warning Dialog appears, detailing the specific risk (e.g., “Portfolio concentration for AAPL exceeds 20%”).

Override Capability

RiskGuard for manual trading is designed to be advisory, not blocking.

Persistent Awareness

If a user chooses to override a RiskGuard warning:

Analytics & Auditing

To improve risk models and track user safety:

Automated Trading Protection

For the Agentic Trading system, RiskGuard acts as a hard gatekeeper.

Architecture

RiskGuard logic is centralized in the Firebase Cloud Functions (functions/src/riskguard-agent.ts), ensuring consistent rule application across all trading interfaces (Mobile App, Web, Automated Agents).

Dynamic Position Sizing

RiskGuard includes a Dynamic Position Sizing feature that automatically calculates the optimal trade size based on risk parameters.