> ## 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.

# Evaluate Policy Route



## OpenAPI

````yaml /api/openapi.json post /api/internal/regime/v2/policy/evaluate
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/internal/regime/v2/policy/evaluate:
    post:
      tags:
        - regime-vnext-internal
      summary: Evaluate Policy Route
      operationId: evaluate_policy_route_api_internal_regime_v2_policy_evaluate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PolicyEvaluationRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PolicyRecommendationSet'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    PolicyEvaluationRequest:
      properties:
        snapshot:
          $ref: '#/components/schemas/RegimeSnapshotV2'
        evidence_table:
          $ref: '#/components/schemas/RegimeEvidenceTable'
        policy_version:
          type: string
          title: Policy Version
        gate_config:
          $ref: '#/components/schemas/EvidenceGateConfig'
        policy_config:
          anyOf:
            - $ref: '#/components/schemas/PolicyConfig'
            - type: 'null'
      additionalProperties: false
      type: object
      required:
        - snapshot
        - evidence_table
        - policy_version
      title: PolicyEvaluationRequest
    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
    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
    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
    EvidenceGateConfig:
      properties:
        min_trade_count:
          type: integer
          title: Min Trade Count
          default: 30
        min_regime_sample_count:
          type: integer
          title: Min Regime Sample Count
          default: 10
        min_cost_adjusted_expectancy:
          type: number
          title: Min Cost Adjusted Expectancy
          default: 0
        min_ci_lower:
          type: number
          title: Min Ci Lower
          default: 0
        max_tail_loss_abs:
          type: number
          title: Max Tail Loss Abs
          default: 0.08
        max_drawdown_abs:
          type: number
          title: Max Drawdown Abs
          default: 0.2
        max_walk_forward_degradation:
          type: number
          title: Max Walk Forward Degradation
          default: 0.5
        max_subperiod_degradation:
          type: number
          title: Max Subperiod Degradation
          default: 0.5
      additionalProperties: false
      type: object
      title: EvidenceGateConfig
    PolicyConfig:
      properties:
        policy_version:
          type: string
          title: Policy Version
        config_version:
          type: string
          title: Config Version
        cost_model_id:
          type: string
          title: Cost Model Id
        gate_config:
          $ref: '#/components/schemas/EvidenceGateConfig'
        strategy_families:
          items:
            $ref: '#/components/schemas/StrategyFamilyMetadata'
          type: array
          title: Strategy Families
      additionalProperties: false
      type: object
      required:
        - policy_version
        - config_version
        - cost_model_id
      title: PolicyConfig
    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
    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
    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
    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.
    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
    StrategyFamilyMetadata:
      properties:
        strategy_family:
          $ref: '#/components/schemas/StrategyFamily'
        supported_horizons:
          items:
            $ref: '#/components/schemas/HorizonProfile'
          type: array
          title: Supported Horizons
        risk_constraints:
          items:
            type: string
          type: array
          title: Risk Constraints
        compatible_asset_scopes:
          items:
            type: string
            enum:
              - market_index
              - symbol
              - universe
              - portfolio
          type: array
          title: Compatible Asset Scopes
        required_evidence_fields:
          items:
            type: string
          type: array
          title: Required Evidence Fields
      additionalProperties: false
      type: object
      required:
        - strategy_family
        - supported_horizons
      title: StrategyFamilyMetadata
    StrategyFamily:
      type: string
      enum:
        - mean_reversion
        - breakout
        - trend_following
        - volatility_selling
        - hedging
        - cross_sectional_relative_strength
      title: StrategyFamily
    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
    EvidenceStatus:
      type: string
      enum:
        - insufficient
        - exploratory
        - validated
        - rejected
      title: EvidenceStatus

````