{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "/ai/portfolio-theory-review.schema.json",
  "title": "10Y STOCK VALUE portfolio theory review",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "protocol",
    "schema_version",
    "as_of",
    "claim_status",
    "current_bets",
    "factor_concentrations",
    "candidate_sectors",
    "reallocation_experiments",
    "primary_papers",
    "gates",
    "limitations",
    "not_investment_advice"
  ],
  "properties": {
    "protocol": {
      "const": "portfolio_theory_review_v1"
    },
    "schema_version": {
      "const": 1
    },
    "as_of": {
      "type": "string",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "claim_status": {
      "enum": [
        "calculated",
        "indicative_only",
        "not_computable"
      ]
    },
    "current_bets": {
      "type": "array",
      "maxItems": 30,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "label",
          "weight_pct",
          "evidence",
          "conditions"
        ],
        "properties": {
          "label": {
            "type": "string",
            "maxLength": 200
          },
          "weight_pct": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 20
          },
          "conditions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 20
          }
        }
      }
    },
    "factor_concentrations": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "interest_rate",
        "inflation",
        "real_growth",
        "equity_risk_premium",
        "credit_spread",
        "home_currency",
        "commodity_price",
        "industry_demand",
        "operating_margin",
        "volatility"
      ],
      "properties": {
        "interest_rate": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "exposure",
            "adverse_direction",
            "share_of_adverse_effect",
            "explanation"
          ],
          "properties": {
            "exposure": {
              "type": "number"
            },
            "adverse_direction": {
              "enum": [
                "higher",
                "lower",
                "mixed",
                "neutral"
              ]
            },
            "share_of_adverse_effect": {
              "type": [
                "number",
                "null"
              ]
            },
            "explanation": {
              "type": "string",
              "maxLength": 500
            }
          }
        },
        "inflation": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "exposure",
            "adverse_direction",
            "share_of_adverse_effect",
            "explanation"
          ],
          "properties": {
            "exposure": {
              "type": "number"
            },
            "adverse_direction": {
              "enum": [
                "higher",
                "lower",
                "mixed",
                "neutral"
              ]
            },
            "share_of_adverse_effect": {
              "type": [
                "number",
                "null"
              ]
            },
            "explanation": {
              "type": "string",
              "maxLength": 500
            }
          }
        },
        "real_growth": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "exposure",
            "adverse_direction",
            "share_of_adverse_effect",
            "explanation"
          ],
          "properties": {
            "exposure": {
              "type": "number"
            },
            "adverse_direction": {
              "enum": [
                "higher",
                "lower",
                "mixed",
                "neutral"
              ]
            },
            "share_of_adverse_effect": {
              "type": [
                "number",
                "null"
              ]
            },
            "explanation": {
              "type": "string",
              "maxLength": 500
            }
          }
        },
        "equity_risk_premium": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "exposure",
            "adverse_direction",
            "share_of_adverse_effect",
            "explanation"
          ],
          "properties": {
            "exposure": {
              "type": "number"
            },
            "adverse_direction": {
              "enum": [
                "higher",
                "lower",
                "mixed",
                "neutral"
              ]
            },
            "share_of_adverse_effect": {
              "type": [
                "number",
                "null"
              ]
            },
            "explanation": {
              "type": "string",
              "maxLength": 500
            }
          }
        },
        "credit_spread": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "exposure",
            "adverse_direction",
            "share_of_adverse_effect",
            "explanation"
          ],
          "properties": {
            "exposure": {
              "type": "number"
            },
            "adverse_direction": {
              "enum": [
                "higher",
                "lower",
                "mixed",
                "neutral"
              ]
            },
            "share_of_adverse_effect": {
              "type": [
                "number",
                "null"
              ]
            },
            "explanation": {
              "type": "string",
              "maxLength": 500
            }
          }
        },
        "home_currency": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "exposure",
            "adverse_direction",
            "share_of_adverse_effect",
            "explanation"
          ],
          "properties": {
            "exposure": {
              "type": "number"
            },
            "adverse_direction": {
              "enum": [
                "higher",
                "lower",
                "mixed",
                "neutral"
              ]
            },
            "share_of_adverse_effect": {
              "type": [
                "number",
                "null"
              ]
            },
            "explanation": {
              "type": "string",
              "maxLength": 500
            }
          }
        },
        "commodity_price": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "exposure",
            "adverse_direction",
            "share_of_adverse_effect",
            "explanation"
          ],
          "properties": {
            "exposure": {
              "type": "number"
            },
            "adverse_direction": {
              "enum": [
                "higher",
                "lower",
                "mixed",
                "neutral"
              ]
            },
            "share_of_adverse_effect": {
              "type": [
                "number",
                "null"
              ]
            },
            "explanation": {
              "type": "string",
              "maxLength": 500
            }
          }
        },
        "industry_demand": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "exposure",
            "adverse_direction",
            "share_of_adverse_effect",
            "explanation"
          ],
          "properties": {
            "exposure": {
              "type": "number"
            },
            "adverse_direction": {
              "enum": [
                "higher",
                "lower",
                "mixed",
                "neutral"
              ]
            },
            "share_of_adverse_effect": {
              "type": [
                "number",
                "null"
              ]
            },
            "explanation": {
              "type": "string",
              "maxLength": 500
            }
          }
        },
        "operating_margin": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "exposure",
            "adverse_direction",
            "share_of_adverse_effect",
            "explanation"
          ],
          "properties": {
            "exposure": {
              "type": "number"
            },
            "adverse_direction": {
              "enum": [
                "higher",
                "lower",
                "mixed",
                "neutral"
              ]
            },
            "share_of_adverse_effect": {
              "type": [
                "number",
                "null"
              ]
            },
            "explanation": {
              "type": "string",
              "maxLength": 500
            }
          }
        },
        "volatility": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "exposure",
            "adverse_direction",
            "share_of_adverse_effect",
            "explanation"
          ],
          "properties": {
            "exposure": {
              "type": "number"
            },
            "adverse_direction": {
              "enum": [
                "higher",
                "lower",
                "mixed",
                "neutral"
              ]
            },
            "share_of_adverse_effect": {
              "type": [
                "number",
                "null"
              ]
            },
            "explanation": {
              "type": "string",
              "maxLength": 500
            }
          }
        }
      }
    },
    "candidate_sectors": {
      "type": "array",
      "minItems": 3,
      "maxItems": 5,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "sector_id",
          "sector_name",
          "model_id",
          "conditions",
          "what_to_verify",
          "candidates"
        ],
        "properties": {
          "sector_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "sector_name": {
            "type": "string",
            "minLength": 1,
            "maxLength": 160
          },
          "model_id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 120
          },
          "conditions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 20
          },
          "what_to_verify": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 20
          },
          "candidates": {
            "type": "array",
            "minItems": 1,
            "maxItems": 3,
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "name",
                "ticker",
                "exchange",
                "security_id",
                "identity_status",
                "asset_class",
                "model_id",
                "valuation_status",
                "conditions",
                "what_to_verify",
                "caveats"
              ],
              "properties": {
                "name": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 160
                },
                "ticker": {
                  "type": "string",
                  "maxLength": 80
                },
                "exchange": {
                  "type": "string",
                  "maxLength": 120
                },
                "security_id": {
                  "type": "string",
                  "maxLength": 160
                },
                "identity_status": {
                  "enum": [
                    "security_identified",
                    "category_only",
                    "ambiguous"
                  ]
                },
                "asset_class": {
                  "type": "string"
                },
                "model_id": {
                  "type": "string"
                },
                "valuation_status": {
                  "enum": [
                    "calculated",
                    "indicative_only",
                    "not_evaluated",
                    "not_computable"
                  ]
                },
                "theoretical_upside_pct": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "year10_upside_pct": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "conditions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 20
                },
                "what_to_verify": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 20
                },
                "caveats": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "maxItems": 20
                }
              }
            }
          }
        }
      }
    },
    "reallocation_experiments": {
      "type": "array",
      "maxItems": 20,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "assumptions",
          "before",
          "after",
          "changes",
          "not_a_trade_instruction"
        ],
        "properties": {
          "id": {
            "type": "string",
            "maxLength": 120
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 20
          },
          "before": {
            "type": "object"
          },
          "after": {
            "type": "object"
          },
          "changes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "maxItems": 20
          },
          "not_a_trade_instruction": {
            "const": true
          }
        }
      }
    },
    "primary_papers": {
      "type": "array",
      "minItems": 4,
      "maxItems": 4,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "title",
          "authors",
          "year",
          "doi",
          "url",
          "used_here",
          "not_used_here"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "authors": {
            "type": "string"
          },
          "year": {
            "type": "integer",
            "minimum": 1900,
            "maximum": 2100
          },
          "doi": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "pattern": "^https://doi\\.org/"
          },
          "used_here": {
            "type": "string"
          },
          "not_used_here": {
            "type": "string"
          }
        }
      }
    },
    "gates": {
      "type": "array",
      "maxItems": 30,
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "status",
          "reason"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "status": {
            "enum": [
              "pass",
              "warn",
              "fail",
              "not_applicable"
            ]
          },
          "reason": {
            "type": "string"
          }
        }
      }
    },
    "limitations": {
      "type": "array",
      "minItems": 1,
      "items": {
        "type": "string"
      },
      "maxItems": 30
    },
    "not_investment_advice": {
      "const": true
    }
  }
}
