{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://boat.local/quant60/schemas/target.schema.json", "title": "Quant60 target-position record", "description": "A portfolio decision produced from signals. It is not proof of an order or fill.", "type": "object", "additionalProperties": false, "required": [ "schema_version", "run_id", "decision_id", "as_of", "symbol", "target_weight", "target_quantity", "config_hash" ], "properties": { "schema_version": { "const": "1.0" }, "run_id": { "type": "string", "minLength": 1 }, "decision_id": { "type": "string", "minLength": 1 }, "as_of": { "type": "string", "format": "date-time" }, "symbol": { "$ref": "#/$defs/canonical_symbol" }, "target_weight": { "type": "number", "minimum": 0, "maximum": 1 }, "target_quantity": { "type": "integer", "minimum": 0 }, "lot_size": { "type": "integer", "minimum": 1, "default": 100 }, "signal_id": { "type": [ "string", "null" ] }, "constraint_state": { "type": "string", "enum": [ "FEASIBLE", "REPAIRED", "RISK_REDUCTION_ONLY", "NO_TRADE" ] }, "config_hash": { "type": "string", "minLength": 1 }, "metadata": { "type": "object" } }, "$defs": { "canonical_symbol": { "type": "string", "pattern": "^[0-9]{6}\\.(XSHG|XSHE|XBSE)$" } } }