{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "schema://formula/CLA_REGIME_EXIT_CONDITION_V1",
  "title": "CLA_REGIME_EXIT_CONDITION_V1",
  "type": "object",
  "properties": {
    "formula_id": {
      "const": "CLA_REGIME_EXIT_CONDITION_V1"
    },
    "owner": {
      "type": "string"
    },
    "status": {
      "type": "string"
    },
    "inputs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "outputs": {
      "type": "array",
      "items": {
        "type": "string"
      }
    }
  },
  "required": [
    "formula_id",
    "owner",
    "status",
    "inputs",
    "outputs"
  ],
  "x_formula_inputs": [
    "ticker",
    "rs_verdict",
    "brt_verdict",
    "frg_5d_sh",
    "volume",
    "avg_volume_5d",
    "market_regime"
  ],
  "x_formula_outputs": [
    {
      "field": "cla_exit_status",
      "unit": "enum [CLA_ACTIVE,CLA_EXIT_WARNING,CLA_EXIT_CONFIRMED]"
    },
    {
      "field": "cla_exit_signals_triggered",
      "unit": "list"
    },
    {
      "field": "cla_exit_total_weight",
      "unit": "int"
    }
  ]
}
