{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://boat.local/quant60/schemas/model_bundle.schema.json", "title": "Quant60 deterministic Ridge model bundle", "description": "Frozen train-only feature transforms, Ridge parameters, training cutoff, label semantics, and lineage hashes for deterministic replay.", "type": "object", "additionalProperties": false, "required": [ "schema_version", "artifact_type", "bundle_sha256", "trained_through", "label", "lineage", "preprocessor", "model" ], "properties": { "schema_version": { "const": "1.0" }, "artifact_type": { "const": "quant60-deterministic-ridge-bundle" }, "bundle_sha256": { "$ref": "#/$defs/sha256" }, "trained_through": { "type": "string", "format": "date" }, "label": { "type": "object", "additionalProperties": false, "required": [ "name", "horizon_trading_days" ], "properties": { "name": { "type": "string", "minLength": 1 }, "horizon_trading_days": { "type": "integer", "minimum": 1 } } }, "lineage": { "type": "object", "additionalProperties": false, "required": [ "data_sha256", "source_sha256", "config_sha256" ], "properties": { "data_sha256": { "$ref": "#/$defs/sha256" }, "source_sha256": { "$ref": "#/$defs/sha256" }, "config_sha256": { "$ref": "#/$defs/sha256" } } }, "preprocessor": { "type": "object", "additionalProperties": false, "required": [ "type", "winsor_fraction", "feature_order", "output_feature_order", "transforms" ], "properties": { "type": { "const": "train-only-winsor-impute-standardize" }, "winsor_fraction": { "type": "number", "minimum": 0, "maximum": 0.5 }, "feature_order": { "type": "array", "minItems": 1, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }, "output_feature_order": { "type": "array", "minItems": 2, "uniqueItems": true, "items": { "type": "string", "minLength": 1 } }, "transforms": { "type": "array", "minItems": 1, "items": { "$ref": "#/$defs/feature_transform" } } } }, "model": { "type": "object", "additionalProperties": false, "required": [ "type", "alpha", "fit_intercept", "coefficients", "intercept" ], "properties": { "type": { "const": "deterministic-ridge" }, "alpha": { "type": "number", "minimum": 0 }, "fit_intercept": { "type": "boolean" }, "coefficients": { "type": "array", "minItems": 1, "items": { "type": "number" } }, "intercept": { "type": "number" } } } }, "$defs": { "sha256": { "type": "string", "pattern": "^[0-9a-f]{64}$" }, "feature_transform": { "type": "object", "additionalProperties": false, "required": [ "name", "lower", "upper", "median", "mean", "scale" ], "properties": { "name": { "type": "string", "minLength": 1 }, "lower": { "type": "number" }, "upper": { "type": "number" }, "median": { "type": "number" }, "mean": { "type": "number" }, "scale": { "type": "number", "exclusiveMinimum": 0 } } } } }