{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://example.local/schemas/feature_record.schema.json",
  "title": "FeatureRecord",
  "type": "object",
  "required": [
    "event_instance_id",
    "source_filing_id",
    "symbol",
    "reaction_date",
    "entry_convention",
    "feature_version",
    "schema_version",
    "as_of_ts",
    "event_type",
    "event_direction",
    "confidence_overall"
  ],
  "properties": {
    "event_instance_id": {"type": "string"},
    "source_filing_id": {"type": "string"},
    "symbol": {"type": "string"},
    "reaction_date": {"type": "string", "format": "date"},
    "entry_convention": {
      "type": "string",
      "enum": ["next_open_after_reaction_close", "dayplus1_close"]
    },
    "feature_version": {"type": "string"},
    "schema_version": {"type": "string"},
    "as_of_ts": {"type": "string", "format": "date-time"},
    "available_ts": {"type": ["string", "null"], "format": "date-time"},
    "event_type": {"type": "string"},
    "event_direction": {"type": "string"},
    "guidance_direction": {"type": ["string", "null"]},
    "quality_assessment": {"type": ["string", "null"]},
    "oneoff_suspicion": {"type": ["string", "null"]},
    "confidence_overall": {"type": "number", "minimum": 0, "maximum": 1},
    "reaction_day_return_pct": {"type": ["number", "null"]},
    "reaction_volume_ratio_20d": {"type": ["number", "null"]},
    "reaction_close_location": {"type": ["number", "null"], "minimum": 0, "maximum": 1},
    "demand_strength_score": {"type": ["number", "null"]},
    "pricing_power_score": {"type": ["number", "null"]},
    "margin_strength_score": {"type": ["number", "null"]},
    "tone_score": {"type": ["number", "null"]},
    "wiki_pageview_zscore_1d": {"type": ["number", "null"]},
    "youtube_influence_score_24h": {"type": ["number", "null"]},
    "finra_short_volume_ratio": {"type": ["number", "null"]},
    "feature_sources": {
      "type": "array",
      "items": {"type": "string"}
    },
    "warnings": {
      "type": "array",
      "items": {"type": "string"}
    }
  },
  "additionalProperties": true
}
