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

# Sector rotation scoring

> Aggregates the latest conviction scores by sector.

For each sector: average conviction, dominant direction, symbol count,
and change from the previous session. Sorted by absolute change
(most rotation first).

Sector mapping sourced from company_profile (PostgreSQL).
Conviction data from score_history (ClickHouse).



## OpenAPI

````yaml /api/openapi.json get /api/graph/v1/market/sector-rotation
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/graph/v1/market/sector-rotation:
    get:
      tags:
        - Market Live
      summary: Sector rotation scoring
      description: |-
        Aggregates the latest conviction scores by sector.

        For each sector: average conviction, dominant direction, symbol count,
        and change from the previous session. Sorted by absolute change
        (most rotation first).

        Sector mapping sourced from company_profile (PostgreSQL).
        Conviction data from score_history (ClickHouse).
      operationId: get_sector_rotation_api_graph_v1_market_sector_rotation_get
      responses:
        '200':
          description: Sector rotation data
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SectorRotationResponse'
        '504':
          description: Query timeout
components:
  schemas:
    SectorRotationResponse:
      properties:
        sectors:
          items:
            $ref: '#/components/schemas/SectorRotationEntry'
          type: array
          title: Sectors
        as_of:
          type: string
          format: date-time
          title: As Of
        methodology:
          type: string
          title: Methodology
          default: >-
            Conviction scores range 0-100 (50 = neutral). Above 50 = bullish,
            below 50 = bearish. Change is session-over-session. Persistence
            counts consecutive sessions of same-direction change.
      type: object
      required:
        - sectors
        - as_of
      title: SectorRotationResponse
      description: Sector rotation data sorted by absolute change.
    SectorRotationEntry:
      properties:
        sector:
          type: string
          title: Sector
        avg_conviction:
          anyOf:
            - type: number
            - type: 'null'
          title: Avg Conviction
        dominant_direction:
          type: string
          title: Dominant Direction
          default: neutral
        symbol_count:
          type: integer
          title: Symbol Count
          default: 0
        prev_avg_conviction:
          anyOf:
            - type: number
            - type: 'null'
          title: Prev Avg Conviction
        change:
          anyOf:
            - type: number
            - type: 'null'
          title: Change
        relative_strength:
          anyOf:
            - type: number
            - type: 'null'
          title: Relative Strength
        persistence_days:
          anyOf:
            - type: integer
            - type: 'null'
          title: Persistence Days
        breadth_pct:
          anyOf:
            - type: number
            - type: 'null'
          title: Breadth Pct
        leaders:
          items:
            $ref: '#/components/schemas/SectorLeader'
          type: array
          title: Leaders
          default: []
        laggards:
          items:
            $ref: '#/components/schemas/SectorLeader'
          type: array
          title: Laggards
          default: []
        historical_context:
          items:
            $ref: '#/components/schemas/HistoricalContext'
          type: array
          title: Historical Context
          default: []
      type: object
      required:
        - sector
      title: SectorRotationEntry
      description: One sector's scoring summary.
    SectorLeader:
      properties:
        symbol:
          type: string
          title: Symbol
        signal:
          type: string
          title: Signal
        composite_score:
          anyOf:
            - type: number
            - type: 'null'
          title: Composite Score
      type: object
      required:
        - symbol
        - signal
      title: SectorLeader
      description: A sector's top leader or laggard from peer diffusion scoring.
    HistoricalContext:
      properties:
        condition_key:
          type: string
          title: Condition Key
        display_text:
          type: string
          title: Display Text
        sample_size:
          type: integer
          title: Sample Size
        hit_rate:
          type: number
          title: Hit Rate
        avg_return:
          type: number
          title: Avg Return
        confidence_tier:
          type: string
          title: Confidence Tier
        horizon:
          type: string
          title: Horizon
      type: object
      required:
        - condition_key
        - display_text
        - sample_size
        - hit_rate
        - avg_return
        - confidence_tier
        - horizon
      title: HistoricalContext
      description: Pre-computed conditional stat for a dashboard signal.

````