diff --git a/MODULE_SPEC.yaml b/MODULE_SPEC.yaml new file mode 100644 index 0000000..7d85c2a --- /dev/null +++ b/MODULE_SPEC.yaml @@ -0,0 +1,41 @@ +{ + "schema_version": 1, + "module_id": "quant_engine", + "authority": {"scope": "module_metadata", "subject": "quant_engine", "owner": "quant-engine-owner", "source": "MODULE_SPEC.yaml", "revision": 1, "effective_from": "2026-08-20T00:00:00+08:00"}, + "repository": {"name": "quant_engine", "workspace_id": "researchhub", "type": "research_engine", "maturity": "operational"}, + "bounded_context": { + "domain": "quantitative-research-engine", + "responsibility": "Own reusable quantitative research calculations for factors, indicators, execution simulation, backtesting, portfolio decomposition, risk, and performance metrics.", + "prohibited_responsibilities": [ + "Presenting research calculations, simulations, backtests, or metrics as investment advice or guaranteed performance", + "Submitting live orders, routing trades, managing brokerage accounts, or claiming transaction execution", + "Owning market-data source facts, research-result publication, or platform presentation state", + "Loading provider credentials, brokerage credentials, or production secrets", + "Changing financial model semantics through module metadata" + ] + }, + "capabilities": [ + {"id": "factor-and-indicator-calculation", "summary": "Calculate reusable alpha factors and technical indicators from caller-supplied data.", "status": "operational"}, + {"id": "execution-simulation", "summary": "Simulate costs, slippage, market constraints, fills, NAV, and PnL without live order routing.", "status": "operational"}, + {"id": "portfolio-backtesting", "summary": "Run weight-based backtests and benchmark comparisons.", "status": "operational"}, + {"id": "risk-and-performance-analysis", "summary": "Calculate portfolio decomposition, risk contribution, and performance statistics.", "status": "operational"} + ], + "data": {"owns": [ + {"asset_id": "quantitative-model-implementations", "kind": "model", "classification": "internal"}, + {"asset_id": "simulation-and-metric-results", "kind": "artifact", "classification": "confidential"} + ]}, + "contracts": {"provides": [], "consumes": []}, + "dependencies": [], + "agent_context": { + "default_entrypoints": [ + {"path": "README.md", "purpose": "Current engine scope, modules, dependencies, and non-live usage examples."}, + {"path": "pyproject.toml", "purpose": "Supported Python version, package version, dependencies, and quality configuration."} + ], + "excluded_paths": ["graphify-out", ".venv", "build", "dist"], + "max_default_tokens": 8000 + }, + "verification": {"commands": [ + {"id": "module-metadata", "argv": ["python3", "tests/governance/test_module_spec.py"], "cwd": ".", "network": false, "required": true}, + {"id": "unit-tests", "argv": ["python3", "-m", "pytest"], "cwd": ".", "network": false, "required": true} + ]} +}