{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/pruviq-com/json-schema/pruviq-com-daily-ranking-response-schema.json",
  "title": "DailyRankingResponse",
  "x-generated": "2026-11-22",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/pruviq-com-openapi.json#/components/schemas/DailyRankingResponse",
  "properties": {
    "schema_version": {
      "type": "string",
      "title": "Schema Version"
    },
    "date": {
      "type": "string",
      "format": "date",
      "title": "Date"
    },
    "generated_at": {
      "anyOf": [
        {
          "type": "string",
          "format": "date-time"
        },
        {
          "type": "null"
        }
      ],
      "title": "Generated At"
    },
    "period": {
      "type": "string",
      "title": "Period"
    },
    "group": {
      "type": "string",
      "title": "Group"
    },
    "top3": {
      "items": {
        "$ref": "#/$defs/RankingRow"
      },
      "type": "array",
      "title": "Top3",
      "description": "The 3 highest configurations by PF (then win rate) across ALL research statuses — the PF-ordered research record, including killed, shelved and unrated configurations. Not the headline: see headline_slots."
    },
    "worst3": {
      "items": {
        "$ref": "#/$defs/RankingRow"
      },
      "type": "array",
      "title": "Worst3"
    },
    "weekly_best3": {
      "items": {
        "$ref": "#/$defs/RankingRow"
      },
      "type": "array",
      "title": "Weekly Best3"
    },
    "citation": {
      "$ref": "#/$defs/RankingCitation"
    },
    "how_to_reverify": {
      "$ref": "#/$defs/RankingReverification"
    },
    "research_status_definitions": {
      "additionalProperties": {
        "$ref": "#/$defs/ResearchDefinition"
      },
      "type": "object",
      "title": "Research Status Definitions"
    },
    "criteria_url": {
      "type": "string",
      "title": "Criteria Url"
    },
    "rc_scope": {
      "type": "string",
      "title": "Rc Scope"
    },
    "headline_has_verified": {
      "type": "boolean",
      "title": "Headline Has Verified",
      "description": "True if a configuration whose research label is verified (rule C, configuration scope) is in top3. Rule: criteria headline."
    },
    "verified_in_ranking": {
      "items": {
        "$ref": "#/$defs/VerifiedInRanking"
      },
      "type": "array",
      "title": "Verified In Ranking",
      "description": "Every verified configuration in this ranked population, with its rank and shown PF."
    },
    "headline_note": {
      "anyOf": [
        {
          "$ref": "#/$defs/LocalizedText"
        },
        {
          "type": "null"
        }
      ],
      "description": "Computed, never fixed. See headline_note_kind and criteria headline."
    },
    "headline_slots": {
      "items": {
        "$ref": "#/$defs/HeadlineSlot"
      },
      "type": "array",
      "maxItems": 3,
      "minItems": 3,
      "title": "Headline Slots",
      "description": "The headline (Q-B102, owner decision 2026-10-08 option ②): exactly 3 slots filled only with configurations labelled verified (rule C, configuration scope), in ranking order among the configurations that pass ranking eligibility; each verified slot carries its rank in the full ranking. Remaining slots are explicit empties: kind no_verified with localized text; all 3 are kind unknown when the group is not a published universe. Killed, shelved and unrated configurations never fill a slot. Rule: criteria headline_slots."
    },
    "headline_summary": {
      "anyOf": [
        {
          "$ref": "#/$defs/HeadlineSummary"
        },
        {
          "type": "null"
        }
      ],
      "description": "Q-H1637 (owner 2026-10-25): what led this window and on what sample, computed from the same ranked population. Rule: criteria headline_summary."
    },
    "headline_note_kind": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "verified_below",
            "verified_ranked_lower",
            "no_verified_in_group",
            "unknown"
          ]
        },
        {
          "type": "null"
        }
      ],
      "title": "Headline Note Kind",
      "description": "verified_below = top3 has no verified configuration, verified ones are ranked below and all have PF < 1; verified_ranked_lower = top3 has none, verified ones are ranked below and not all have PF < 1 (ranks and shown PF only, no comparison); no_verified_in_group = top3 has none and this group's ranking has none; unknown = the group is not a published universe (legacy file / unmapped title) so labels cannot be judged — no sentence; null = no sentence (a verified configuration is in top3, or nothing is ranked for this period/group — empty top3; headline_has_verified is then false too)."
    }
  },
  "additionalProperties": true,
  "type": "object",
  "required": [
    "schema_version",
    "date",
    "generated_at",
    "period",
    "group",
    "top3",
    "worst3",
    "weekly_best3",
    "citation",
    "how_to_reverify",
    "research_status_definitions",
    "criteria_url",
    "rc_scope",
    "headline_has_verified",
    "verified_in_ranking",
    "headline_note",
    "headline_slots",
    "headline_note_kind"
  ],
  "$defs": {
    "HeadlineSlot": {
      "properties": {
        "slot": {
          "type": "integer",
          "title": "Slot",
          "description": "Position in the headline, 1..3 (not the ranking rank)."
        },
        "kind": {
          "type": "string",
          "enum": [
            "verified",
            "no_verified",
            "unknown"
          ],
          "title": "Kind",
          "description": "verified = row holds a configuration labelled verified (rule C, configuration scope); no_verified = no further verified configuration passed this ranking's eligibility; unknown = the group is not a published universe, labels cannot be judged."
        },
        "rank": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rank",
          "description": "Rank of the configuration in the full eligible ranking (same as row.rank); null for empty slots."
        },
        "row": {
          "anyOf": [
            {
              "$ref": "#/$defs/RankingRow"
            },
            {
              "type": "null"
            }
          ],
          "description": "Same row shape as top3 rows; null for empty slots."
        },
        "text": {
          "anyOf": [
            {
              "$ref": "#/$defs/LocalizedText"
            },
            {
              "type": "null"
            }
          ],
          "description": "Localized sentence for an empty slot (criteria headline_slots.empty_text: no_verified when no verified slot precedes it, no_verified_further after one; unknown for kind unknown); null for verified slots."
        }
      },
      "type": "object",
      "required": [
        "slot",
        "kind",
        "rank",
        "row",
        "text"
      ],
      "title": "HeadlineSlot"
    },
    "HeadlineSummary": {
      "properties": {
        "period": {
          "type": "string",
          "title": "Period"
        },
        "configurations": {
          "type": "integer",
          "title": "Configurations",
          "description": "Eligible ranked configurations in this window (same population as the ranking)."
        },
        "verified_matched": {
          "type": "integer",
          "title": "Verified Matched",
          "description": "Ranked configurations whose research label is verified (rule C, configuration scope)."
        },
        "leader": {
          "anyOf": [
            {
              "$ref": "#/$defs/SummaryLeader"
            },
            {
              "type": "null"
            }
          ],
          "description": "Rank #1 by PF (then win rate) in this window, any research status."
        },
        "direction_top": {
          "additionalProperties": {
            "type": "integer"
          },
          "type": "object",
          "title": "Direction Top",
          "description": "Direction counts among the top min(10, configurations) rows."
        },
        "top_n": {
          "type": "integer",
          "title": "Top N"
        },
        "profitable": {
          "type": "integer",
          "title": "Profitable"
        },
        "wr_50plus": {
          "type": "integer",
          "title": "Wr 50Plus"
        },
        "previous_available": {
          "type": "boolean",
          "title": "Previous Available",
          "description": "True when the previous day's ranking for the same period and group was read."
        },
        "leader_previous_rank": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Leader Previous Rank",
          "description": "The leader's rank in the previous day's ranking; null if not ranked there or no previous day."
        },
        "text": {
          "additionalProperties": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "type": "object",
          "title": "Text",
          "description": "Localized lines (en, ko) — the same lines the daily post prints."
        }
      },
      "type": "object",
      "required": [
        "period",
        "configurations",
        "verified_matched",
        "leader",
        "direction_top",
        "top_n",
        "profitable",
        "wr_50plus",
        "previous_available",
        "leader_previous_rank",
        "text"
      ],
      "title": "HeadlineSummary"
    },
    "LocalizedText": {
      "properties": {
        "en": {
          "type": "string",
          "title": "En"
        },
        "ko": {
          "type": "string",
          "title": "Ko"
        }
      },
      "type": "object",
      "required": [
        "en",
        "ko"
      ],
      "title": "LocalizedText"
    },
    "OtherPeriod": {
      "properties": {
        "period": {
          "type": "string",
          "title": "Period"
        },
        "ranked": {
          "type": "boolean",
          "title": "Ranked",
          "description": "False = absent from that period's eligible population (missing, below minimum_trades, WF exclusion)."
        },
        "rank": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Rank"
        },
        "total": {
          "type": "integer",
          "title": "Total",
          "description": "Eligible configurations in that period and group."
        },
        "profit_factor": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Profit Factor"
        },
        "pf_capped": {
          "anyOf": [
            {
              "type": "boolean"
            },
            {
              "type": "null"
            }
          ],
          "title": "Pf Capped"
        },
        "win_rate": {
          "anyOf": [
            {
              "type": "number"
            },
            {
              "type": "null"
            }
          ],
          "title": "Win Rate"
        },
        "total_trades": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Total Trades"
        }
      },
      "type": "object",
      "required": [
        "period",
        "ranked",
        "rank",
        "total",
        "profit_factor",
        "pf_capped",
        "win_rate",
        "total_trades"
      ],
      "title": "OtherPeriod"
    },
    "RankingCitation": {
      "properties": {
        "url": {
          "type": "string",
          "title": "Url"
        },
        "generated_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Generated At"
        },
        "criteria_version": {
          "type": "string",
          "title": "Criteria Version"
        },
        "research_source_digest": {
          "type": "string",
          "title": "Research Source Digest"
        },
        "note": {
          "type": "string",
          "title": "Note"
        }
      },
      "type": "object",
      "required": [
        "url",
        "generated_at",
        "criteria_version",
        "research_source_digest",
        "note"
      ],
      "title": "RankingCitation"
    },
    "RankingReverification": {
      "properties": {
        "url": {
          "type": "string",
          "title": "Url"
        },
        "command": {
          "type": "string",
          "title": "Command"
        },
        "criteria_url": {
          "type": "string",
          "title": "Criteria Url"
        },
        "scope": {
          "type": "string",
          "title": "Scope"
        }
      },
      "type": "object",
      "required": [
        "url",
        "command",
        "criteria_url",
        "scope"
      ],
      "title": "RankingReverification"
    },
    "RankingRow": {
      "properties": {
        "rank": {
          "type": "integer",
          "title": "Rank"
        },
        "configuration_id": {
          "type": "string",
          "title": "Configuration Id"
        },
        "configuration_identity_version": {
          "type": "string",
          "title": "Configuration Identity Version"
        },
        "strategy": {
          "type": "string",
          "title": "Strategy"
        },
        "direction": {
          "type": "string",
          "title": "Direction"
        },
        "name_en": {
          "type": "string",
          "title": "Name En"
        },
        "name_ko": {
          "type": "string",
          "title": "Name Ko"
        },
        "win_rate": {
          "type": "number",
          "title": "Win Rate"
        },
        "profit_factor": {
          "type": "number",
          "title": "Profit Factor"
        },
        "pf_capped": {
          "type": "boolean",
          "title": "Pf Capped",
          "description": "True = profit_factor is a lower bound, not a measurement (daily: reached pf_clip; weekly: any contributing day exceeded pf_clip before averaging). Rule: criteria pf_caps."
        },
        "pf_clip": {
          "type": "number",
          "title": "Pf Clip",
          "description": "The cap applied to this row's profit_factor: 99.99 for daily rows (display), 20.0 per day for weekly means."
        },
        "total_trades": {
          "type": "integer",
          "title": "Total Trades"
        },
        "timeframe": {
          "type": "string",
          "title": "Timeframe"
        },
        "low_sample": {
          "type": "boolean",
          "title": "Low Sample"
        },
        "research_status": {
          "type": "string",
          "enum": [
            "verified",
            "conditional",
            "live",
            "testing",
            "killed",
            "shelved",
            "unrated"
          ],
          "title": "Research Status"
        },
        "status_scope": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "configuration",
                "record"
              ]
            },
            {
              "type": "null"
            }
          ],
          "title": "Status Scope",
          "description": "What research_status describes: configuration = measured for this exact configuration; record = the whole strategy record (retirement); null = unrated. Rule: criteria research_label."
        },
        "research_record": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Research Record",
          "description": "Research record the row resolved to (may carry a status that does not apply to this configuration)."
        },
        "reason_url": {
          "type": "string",
          "title": "Reason Url"
        },
        "criteria_version": {
          "type": "string",
          "title": "Criteria Version"
        },
        "measured_at": {
          "anyOf": [
            {
              "type": "string",
              "format": "date-time"
            },
            {
              "type": "null"
            }
          ],
          "title": "Measured At",
          "description": "Timestamp from the retained ranking generation record, not an exact simulation completion time; null if only a date was retained."
        },
        "sample": {
          "$ref": "#/$defs/RankingSample"
        },
        "rc": {
          "type": "integer",
          "enum": [
            0,
            1,
            2
          ],
          "title": "Rc",
          "description": "Existing research lifecycle projection. Not a verdict on this ranking configuration; see rc_scope."
        },
        "other_periods": {
          "anyOf": [
            {
              "items": {
                "$ref": "#/$defs/OtherPeriod"
              },
              "type": "array"
            },
            {
              "type": "null"
            }
          ],
          "title": "Other Periods",
          "description": "Q-H1637 r2: the same configuration in the other periods of the same day file and group (criteria window_text.rule); null when not computed."
        }
      },
      "additionalProperties": true,
      "type": "object",
      "required": [
        "rank",
        "configuration_id",
        "configuration_identity_version",
        "strategy",
        "direction",
        "name_en",
        "name_ko",
        "win_rate",
        "profit_factor",
        "pf_capped",
        "pf_clip",
        "total_trades",
        "timeframe",
        "low_sample",
        "research_status",
        "status_scope",
        "research_record",
        "reason_url",
        "criteria_version",
        "measured_at",
        "sample",
        "rc"
      ],
      "title": "RankingRow"
    },
    "RankingSample": {
      "properties": {
        "coins": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Coins",
          "description": "Source-retained coins_used aggregation universe count. May include failed/skipped coins; not a count of successful simulations. Null when not retained."
        },
        "coins_scope": {
          "type": "string",
          "enum": [
            "aggregation_universe",
            "not_retained"
          ],
          "title": "Coins Scope"
        },
        "requested_coins": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Requested Coins",
          "description": "Requested universe limit; distinct from the retained aggregation count."
        },
        "timeframe": {
          "type": "string",
          "title": "Timeframe"
        },
        "period": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Period",
          "description": "Retained period bucket; null for unlabelled legacy rows."
        },
        "start_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "Start Date",
          "description": "Recorded input start date, not inferred from publication time."
        },
        "end_date": {
          "anyOf": [
            {
              "type": "string",
              "format": "date"
            },
            {
              "type": "null"
            }
          ],
          "title": "End Date",
          "description": "Recorded input end date."
        },
        "aggregation": {
          "type": "string",
          "enum": [
            "single_window",
            "weekly_mean"
          ],
          "title": "Aggregation",
          "default": "single_window"
        }
      },
      "type": "object",
      "required": [
        "coins",
        "coins_scope",
        "requested_coins",
        "timeframe",
        "period"
      ],
      "title": "RankingSample"
    },
    "ResearchDefinition": {
      "properties": {
        "rc": {
          "type": "integer",
          "enum": [
            0,
            1,
            2
          ],
          "title": "Rc"
        },
        "label": {
          "$ref": "#/$defs/LocalizedText"
        },
        "reason": {
          "$ref": "#/$defs/LocalizedText"
        }
      },
      "type": "object",
      "required": [
        "rc",
        "label",
        "reason"
      ],
      "title": "ResearchDefinition"
    },
    "SummaryLeader": {
      "properties": {
        "configuration_id": {
          "type": "string",
          "title": "Configuration Id"
        },
        "name_en": {
          "type": "string",
          "title": "Name En"
        },
        "name_ko": {
          "type": "string",
          "title": "Name Ko"
        },
        "timeframe": {
          "type": "string",
          "title": "Timeframe"
        },
        "direction": {
          "type": "string",
          "title": "Direction"
        },
        "profit_factor": {
          "type": "number",
          "title": "Profit Factor"
        },
        "pf_capped": {
          "type": "boolean",
          "title": "Pf Capped"
        },
        "total_trades": {
          "type": "integer",
          "title": "Total Trades"
        },
        "low_sample": {
          "type": "boolean",
          "title": "Low Sample"
        },
        "research_status": {
          "type": "string",
          "title": "Research Status"
        },
        "status_date": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Status Date"
        }
      },
      "type": "object",
      "required": [
        "configuration_id",
        "name_en",
        "name_ko",
        "timeframe",
        "direction",
        "profit_factor",
        "pf_capped",
        "total_trades",
        "low_sample",
        "research_status",
        "status_date"
      ],
      "title": "SummaryLeader"
    },
    "VerifiedInRanking": {
      "properties": {
        "configuration_id": {
          "type": "string",
          "title": "Configuration Id"
        },
        "rank": {
          "type": "integer",
          "title": "Rank"
        },
        "profit_factor": {
          "type": "number",
          "title": "Profit Factor"
        },
        "pf_capped": {
          "type": "boolean",
          "title": "Pf Capped"
        }
      },
      "type": "object",
      "required": [
        "configuration_id",
        "rank",
        "profit_factor",
        "pf_capped"
      ],
      "title": "VerifiedInRanking"
    }
  }
}