Skip to content

feat(quant): live quote contracts and reproducible daily research foundation - #76

Draft
Altairpaca wants to merge 3 commits into
mainfrom
feat/quant-data-foundation
Draft

Altairpaca wants to merge 3 commits into
mainfrom
feat/quant-data-foundation

Conversation

@Altairpaca

Copy link
Copy Markdown
Owner

Clausula's quant roadmap needs a separate data plane before minute data or native kernels can be useful. This initial slice adds exact live market contracts and a read-only quote service, plus immutable daily archives and three reference factors.

Implemented:

  • Shared domain dataclasses and generated JSON Schema, explicit CN/HK symbol normalization, exact Decimal wire values, independent event/receive/query timestamps.
  • Injected quote provider port, timeout budget propagation, late-result rejection, attempt provenance and process-local circuits.
  • Experimental Tencent CN/HK quote adapter; unknown units/fields remain missing. One concrete upstream only.
  • Independent capability registry and market quote/provider-health CLI, without financial Store creation.
  • Optional PyArrow daily archive, raw hashes, exact decimal128 columns, atomic publication, immutable versions and integrity checks.
  • CLI freeze/list/factor operations; return, momentum and sample volatility reference formulas with dataset/run lineage, warmup nulls and local knowledge cutoffs.

Validation:

Limitations: source/license matrix, independent second provider, strict network cancellation, freshness-aware fallback, live daily adapter to archive, minute data, full factor registry/evaluation, MCP transport/Skill deployment and benchmarks/native code remain outstanding. Socket timeout is not a hard end-to-end deadline. Archive research mode is retrospective, not historical point-in-time reconstruction.

Related: #69 #70 #71 #72 #73 #74. This does not close those issues or merge #68/#75. See docs/adr/0008-ephemeral-market-query-contract.md and docs/project/QUANT_PROGRESS.md.

Copy link
Copy Markdown
Owner Author

Implementation/review evidence: initial full local regression 258 passed; exactly 3 pre-existing bubblewrap namespace tests were deselected after observing their baseline failures. Review fixes in 060a857 add fractional-second overlap and wrapped timeout tests: 32 focused tests pass. Wheel and sdist build passed locally. GitHub CI is being inspected on the updated head. This remains a Draft: only one experimental quote source, supplied canonical daily input for archive, and three reference formulas. Live-data reliability, licence audit, minute data, MCP deployment/Skill and native performance acceptance are not claimed.

Copy link
Copy Markdown
Owner Author

Final review follow-up 7e9d53e fixes a reproducibility issue: reference factor arithmetic now uses its own Decimal Context, including ROUND_HALF_EVEN, rather than inheriting the caller's rounding mode. A non-terminating-return fixture verifies invariance under low precision / ROUND_FLOOR. Latest focused suite: 33 passed. Remote CI is running on this exact head; earlier run outcomes do not substitute for this commit.

Copy link
Copy Markdown
Owner Author

Final-head CI verified: commit 7e9d53e, workflow https://github.com/Altairpaca/clausula/actions/runs/34731450741. Both Python 3.12 and 3.13 jobs completed successfully, including tests, compile, whitespace and wheel/sdist build. Local checkout matches this remote head and is clean. PR stays Draft because the wider programme and live acceptance remain incomplete; this green run does not waive #23/#34 or close #70#74.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant