> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sequency.sh/llms.txt
> Use this file to discover all available pages before exploring further.

# Explain Regime Route



## OpenAPI

````yaml /api/openapi.json post /api/regime/v2/explain
openapi: 3.1.0
info:
  title: Sequency Graph API
  description: >

    # Sequency Graph-Native Trading API


    Graph-native API for trading intelligence, built on FalkorDB.


    ## Features


    - **Screener**: Filter stocks using graph-native queries with relationship
    expansion

    - **Stock Detail**: Complete stock context with all relationships

    - **Confluence Scoring**: Setup quality assessment with weighted components

    - **Strategy Matching**: Find matching options strategies via graph
    traversal

    - **Market Context**: Current market-wide context for trading decisions


    ## Data Sources


    All data is sourced from the FalkorDB knowledge graph, populated by:

    - Pattern detector (Go) - Technical indicators, patterns

    - Graph sync service - Levels, volume profiles, news, day classification
  version: 1.0.0
servers: []
security: []
paths:
  /api/regime/v2/explain:
    post:
      tags:
        - regime-vnext
      summary: Explain Regime Route
      operationId: explain_regime_route_api_regime_v2_explain_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegimeExplanationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegimeExplanationResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    RegimeExplanationRequest:
      properties:
        snapshot:
          $ref: '#/components/schemas/RegimeSnapshotV2'
        policy:
          $ref: '#/components/schemas/PolicyRecommendationSet'
        evidence_table:
          anyOf:
            - $ref: '#/components/schemas/RegimeEvidenceTable'
            - type: 'null'
        prior_snapshot:
          anyOf:
            - $ref: '#/components/schemas/RegimeSnapshotV2'
            - type: 'null'
        audience:
          type: string
          enum:
            - trader
            - research
            - risk
          title: Audience
          default: trader
      additionalProperties: false
      type: object
      required:
        - snapshot
        - policy
      title: RegimeExplanationRequest
    RegimeExplanationResponse:
      properties:
        explanation_id:
          type: string
          title: Explanation Id
        generated_at:
          type: string
          format: date-time
          title: Generated At
        snapshot_id:
          type: string
          title: Snapshot Id
        policy_decision_id:
          type: string
          title: Policy Decision Id
        current_regime_summary:
          type: string
          title: Current Regime Summary
        strategy_family_summaries:
          items:
            type: string
          type: array
          title: Strategy Family Summaries
        evidence_summary:
          items:
            $ref: '#/components/schemas/AgentEvidenceSummary'
          type: array
          title: Evidence Summary
        caveats:
          items:
            type: string
          type: array
          title: Caveats
        unavailable_data_notices:
          items:
            type: string
          type: array
          title: Unavailable Data Notices
        prior_regime_comparison:
          anyOf:
            - type: string
            - type: 'null'
          title: Prior Regime Comparison
        backtest_provenance_summary:
          anyOf:
            - type: string
            - type: 'null'
          title: Backtest Provenance Summary
        policy_payload:
          $ref: '#/components/schemas/PolicyRecommendationSet'
      additionalProperties: false
      type: object
      required:
        - explanation_id
        - generated_at
        - snapshot_id
        - policy_decision_id
        - current_regime_summary
        - policy_payload
      title: RegimeExplanationResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    RegimeSnapshotV2:
      properties:
        snapshot_id:
          type: string
          title: Snapshot Id
        logic_version:
          type: string
          title: Logic Version
        feature_version:
          type: string
          title: Feature Version
        variant:
          type: string
          title: Variant
          default: corrected
        as_of:
          type: string
          format: date-time
          title: As Of
        effective_for_session:
          type: string
          format: date
          title: Effective For Session
        asset_scope:
          $ref: '#/components/schemas/AssetScope'
        horizon_profile:
          $ref: '#/components/schemas/HorizonProfile'
        feature_binding:
          $ref: '#/components/schemas/FeatureBinding'
        risk_state:
          $ref: '#/components/schemas/RiskState'
        volatility_change:
          $ref: '#/components/schemas/VolatilityChange'
        directional_pressure:
          $ref: '#/components/schemas/DirectionalPressure'
        breadth_state:
          $ref: '#/components/schemas/BreadthState'
        correlation_state:
          $ref: '#/components/schemas/CorrelationState'
        intraday_structure:
          $ref: '#/components/schemas/IntradayStructure'
        unavailable_inputs:
          items:
            type: string
          type: array
          title: Unavailable Inputs
        risk_classifier_version:
          type: string
          title: Risk Classifier Version
          default: risk-v2.0
        risk_inputs_complete:
          type: boolean
          title: Risk Inputs Complete
          default: false
        provenance:
          items:
            $ref: '#/components/schemas/ProvenanceRef'
          type: array
          title: Provenance
        legacy_shadow_grid:
          anyOf:
            - $ref: '#/components/schemas/LegacyShadowGrid'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - snapshot_id
        - logic_version
        - feature_version
        - as_of
        - effective_for_session
        - asset_scope
        - horizon_profile
        - feature_binding
        - risk_state
        - volatility_change
        - directional_pressure
        - breadth_state
        - correlation_state
        - intraday_structure
      title: RegimeSnapshotV2
    PolicyRecommendationSet:
      properties:
        decision_id:
          type: string
          title: Decision Id
        generated_at:
          type: string
          format: date-time
          title: Generated At
        snapshot_id:
          type: string
          title: Snapshot Id
        evidence_id:
          type: string
          title: Evidence Id
        asset_scope:
          $ref: '#/components/schemas/AssetScope'
        horizon_profile:
          $ref: '#/components/schemas/HorizonProfile'
        policy_version:
          type: string
          title: Policy Version
        policy_config_version:
          type: string
          title: Policy Config Version
        cost_model_id:
          type: string
          title: Cost Model Id
        logic_version:
          type: string
          title: Logic Version
        feature_version:
          type: string
          title: Feature Version
        valid_until:
          type: string
          format: date-time
          title: Valid Until
        recommendations:
          items:
            $ref: '#/components/schemas/SuitabilityScore'
          type: array
          title: Recommendations
        guardrails:
          items:
            type: string
          type: array
          title: Guardrails
        caveats:
          items:
            type: string
          type: array
          title: Caveats
      additionalProperties: false
      type: object
      required:
        - decision_id
        - generated_at
        - snapshot_id
        - evidence_id
        - asset_scope
        - horizon_profile
        - policy_version
        - policy_config_version
        - cost_model_id
        - logic_version
        - feature_version
        - valid_until
        - recommendations
      title: PolicyRecommendationSet
    RegimeEvidenceTable:
      properties:
        evidence_id:
          type: string
          title: Evidence Id
        generated_at:
          type: string
          format: date-time
          title: Generated At
        logic_version:
          type: string
          title: Logic Version
        feature_version:
          type: string
          title: Feature Version
        variant:
          type: string
          title: Variant
        horizon_profile:
          $ref: '#/components/schemas/HorizonProfile'
        asset_scope:
          $ref: '#/components/schemas/AssetScope'
        cost_model:
          $ref: '#/components/schemas/CostModel'
        approved:
          type: boolean
          title: Approved
          default: false
        approved_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Approved At
        source_query_windows:
          items:
            $ref: '#/components/schemas/SourceQueryWindow'
          type: array
          title: Source Query Windows
        as_of_floor:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: As Of Floor
        as_of_ceiling:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: As Of Ceiling
        stats:
          items:
            $ref: '#/components/schemas/ConditionalStrategyStats'
          type: array
          title: Stats
        manifest_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Manifest Id
        provenance:
          items:
            $ref: '#/components/schemas/ProvenanceRef'
          type: array
          title: Provenance
      additionalProperties: false
      type: object
      required:
        - evidence_id
        - generated_at
        - logic_version
        - feature_version
        - variant
        - horizon_profile
        - asset_scope
        - cost_model
      title: RegimeEvidenceTable
    AgentEvidenceSummary:
      properties:
        strategy_family:
          $ref: '#/components/schemas/StrategyFamily'
        evidence_status:
          anyOf:
            - $ref: '#/components/schemas/EvidenceStatus'
            - type: 'null'
        trade_count:
          type: integer
          title: Trade Count
          default: 0
        regime_sample_count:
          type: integer
          title: Regime Sample Count
          default: 0
        cost_adjusted_expectancy:
          anyOf:
            - type: number
            - type: 'null'
          title: Cost Adjusted Expectancy
        cost_model:
          anyOf:
            - $ref: '#/components/schemas/CostModel'
            - type: 'null'
        caveats:
          items:
            type: string
          type: array
          title: Caveats
      additionalProperties: false
      type: object
      required:
        - strategy_family
      title: AgentEvidenceSummary
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
    AssetScope:
      properties:
        kind:
          type: string
          enum:
            - market_index
            - symbol
            - universe
            - portfolio
          title: Kind
          default: market_index
        primary_asset:
          type: string
          title: Primary Asset
          default: SPY
        universe:
          items:
            type: string
          type: array
          maxItems: 500
          title: Universe
      additionalProperties: false
      type: object
      title: AssetScope
    HorizonProfile:
      type: string
      enum:
        - macro
        - swing
        - intraday
      title: HorizonProfile
    FeatureBinding:
      type: string
      enum:
        - prior_session
        - prior_bar
      title: FeatureBinding
    RiskState:
      type: string
      enum:
        - calm
        - normal
        - elevated
        - stress
        - unavailable
      title: RiskState
    VolatilityChange:
      type: string
      enum:
        - compressing
        - stable
        - expanding
        - unavailable
      title: VolatilityChange
    DirectionalPressure:
      type: string
      enum:
        - upside_extended
        - downside_extended
        - balanced
        - persistent_trend
      title: DirectionalPressure
    BreadthState:
      type: string
      enum:
        - broad
        - narrow
        - deteriorating
        - recovering
        - unavailable
      title: BreadthState
    CorrelationState:
      type: string
      enum:
        - diversified
        - correlated
        - turbulent
        - unavailable
      title: CorrelationState
    IntradayStructure:
      type: string
      enum:
        - range_bound
        - trend_day
        - opening_drive
        - failed_auction
        - high_noise
        - unavailable
      title: IntradayStructure
    ProvenanceRef:
      properties:
        source:
          type: string
          title: Source
        source_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Source Id
        artifact_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Artifact Id
        as_of:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: As Of
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
      additionalProperties: false
      type: object
      required:
        - source
      title: ProvenanceRef
    LegacyShadowGrid:
      properties:
        direction:
          anyOf:
            - type: string
            - type: 'null'
          title: Direction
        volatility:
          anyOf:
            - type: string
            - type: 'null'
          title: Volatility
        grid_cell:
          anyOf:
            - type: string
            - type: 'null'
          title: Grid Cell
        logic_version:
          anyOf:
            - type: string
            - type: 'null'
          title: Logic Version
        variant:
          anyOf:
            - type: string
            - type: 'null'
          title: Variant
      additionalProperties: false
      type: object
      title: LegacyShadowGrid
      description: Legacy 2x3 grid retained for diagnostics, never direct vNext policy.
    SuitabilityScore:
      properties:
        strategy_family:
          $ref: '#/components/schemas/StrategyFamily'
        horizon_profile:
          $ref: '#/components/schemas/HorizonProfile'
        suitability:
          $ref: '#/components/schemas/Suitability'
        score:
          type: integer
          maximum: 100
          minimum: 0
          title: Score
        confidence:
          type: integer
          maximum: 100
          minimum: 0
          title: Confidence
        risk_multiplier_hint:
          type: number
          maximum: 2
          minimum: 0
          title: Risk Multiplier Hint
        reason_codes:
          items:
            type: string
          type: array
          title: Reason Codes
        evidence_ref:
          anyOf:
            - $ref: '#/components/schemas/app__models__regime_vnext__EvidenceRef'
            - type: 'null'
        blocked_reasons:
          items:
            type: string
          type: array
          title: Blocked Reasons
        valid_until:
          type: string
          format: date-time
          title: Valid Until
        policy_version:
          type: string
          title: Policy Version
      additionalProperties: false
      type: object
      required:
        - strategy_family
        - horizon_profile
        - suitability
        - score
        - confidence
        - risk_multiplier_hint
        - valid_until
        - policy_version
      title: SuitabilityScore
    CostModel:
      properties:
        model_id:
          type: string
          title: Model Id
          default: default
        commission_bps:
          type: number
          minimum: 0
          title: Commission Bps
          default: 0
        slippage_bps:
          type: number
          minimum: 0
          title: Slippage Bps
          default: 0
        spread_bps:
          type: number
          minimum: 0
          title: Spread Bps
          default: 0
      additionalProperties: false
      type: object
      title: CostModel
    SourceQueryWindow:
      properties:
        source:
          type: string
          title: Source
        start:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Start
        end:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: End
        horizon_binding:
          anyOf:
            - $ref: '#/components/schemas/FeatureBinding'
            - type: 'null'
        notes:
          anyOf:
            - type: string
            - type: 'null'
          title: Notes
      additionalProperties: false
      type: object
      required:
        - source
      title: SourceQueryWindow
    ConditionalStrategyStats:
      properties:
        strategy_family:
          $ref: '#/components/schemas/StrategyFamily'
        horizon_profile:
          $ref: '#/components/schemas/HorizonProfile'
        axis_filter:
          additionalProperties:
            type: string
          type: object
          title: Axis Filter
        probability_of_profit:
          type: number
          maximum: 1
          minimum: 0
          title: Probability Of Profit
        expected_return:
          type: number
          title: Expected Return
        expected_r:
          type: number
          title: Expected R
        median_return:
          type: number
          title: Median Return
        tail_loss:
          type: number
          title: Tail Loss
        max_drawdown:
          type: number
          title: Max Drawdown
        sharpe:
          type: number
          title: Sharpe
        trade_count:
          type: integer
          minimum: 0
          title: Trade Count
        regime_sample_count:
          type: integer
          minimum: 0
          title: Regime Sample Count
        cost_adjusted_expectancy:
          type: number
          title: Cost Adjusted Expectancy
        ci_lower:
          type: number
          title: Ci Lower
        ci_upper:
          type: number
          title: Ci Upper
        bootstrap_stability:
          type: number
          maximum: 1
          minimum: 0
          title: Bootstrap Stability
        walk_forward_degradation:
          type: number
          minimum: 0
          title: Walk Forward Degradation
        subperiod_degradation:
          type: number
          minimum: 0
          title: Subperiod Degradation
        evidence_status:
          $ref: '#/components/schemas/EvidenceStatus'
        cost_model:
          $ref: '#/components/schemas/CostModel'
        evidence_ref:
          $ref: '#/components/schemas/app__models__regime_vnext__EvidenceRef'
        notes:
          items:
            type: string
          type: array
          title: Notes
      additionalProperties: false
      type: object
      required:
        - strategy_family
        - horizon_profile
        - probability_of_profit
        - expected_return
        - expected_r
        - median_return
        - tail_loss
        - max_drawdown
        - sharpe
        - trade_count
        - regime_sample_count
        - cost_adjusted_expectancy
        - ci_lower
        - ci_upper
        - bootstrap_stability
        - walk_forward_degradation
        - subperiod_degradation
        - evidence_status
        - cost_model
        - evidence_ref
      title: ConditionalStrategyStats
    StrategyFamily:
      type: string
      enum:
        - mean_reversion
        - breakout
        - trend_following
        - volatility_selling
        - hedging
        - cross_sectional_relative_strength
      title: StrategyFamily
    EvidenceStatus:
      type: string
      enum:
        - insufficient
        - exploratory
        - validated
        - rejected
      title: EvidenceStatus
    Suitability:
      type: string
      enum:
        - avoid
        - neutral
        - favorable
        - preferred
      title: Suitability
    app__models__regime_vnext__EvidenceRef:
      properties:
        evidence_id:
          type: string
          title: Evidence Id
        row_id:
          type: string
          title: Row Id
        artifact_uri:
          anyOf:
            - type: string
            - type: 'null'
          title: Artifact Uri
      additionalProperties: false
      type: object
      required:
        - evidence_id
        - row_id
      title: EvidenceRef

````