Skip to content

About

No description, website, or topics provided.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Ma Capital OS v0.1

Ma Capital OS is a local-first, read-only research and decision-support platform for China index derivatives, U.S. rates, global cross-asset signals, probabilistic forecasting, portfolio risk, and falsifiable strategy research. It never places orders or moves money.

Status

This repository is a public work-in-progress checkpoint, not a completed v0.1 release. The typed analytics, point-in-time data contracts, immutable evidence models, registries, backtester, fail-closed reporting controls, deterministic daily/demo and quantitative-acceptance workflows, and local read-only dashboard are implemented. The demo and acceptance paths are synthetic by design, grant no research-quota credit, and always block recommendations. The web product now also accepts an exact, source-specific iFinD/CFFEX/China-surface multi-asset profile: it replays pinned local futures, cash-index, official option, normalized Black-76 surface, U.S.-rates, and cross-asset inputs, exposes 50 descriptive/model facts across five market sections, and remains recommendation-blocked and no_trade. The restored China surface is explicitly STALE/INVALID, never silently upgraded. The decisive non-waivable blocker is the lawful empirical research quota, currently 0/18. A final coherent-candidate clean-environment receipt is now available for the repository-controlled scope, but it cannot substitute for those 18 statistical packages. The durable completion contract and honest criterion status live in MA_CAPITAL_OS_GOAL.md and docs/ACCEPTANCE_MATRIX.md.

The blocker is now enumerated by a content-addressed 18-row coverage receipt: each frozen protocol requires 504 observations, has zero audit-eligible source observations, records typed rights/PIT/field/forecast-timing attempts and removal actions, and receives zero quota credit. It asserts no source hash, data right, market fact, or alpha result.

A post-candidate local iFinD SDK integration now verifies licensed read-only access to four CFFEX continuous futures roots, four synchronous cash indices, historical one-minute bars, and expired/current option contracts. Its content-addressed local foundation capture contains 19,652 observations in four raw objects, publishes only secret-free hashes and coverage metadata, and still grants zero quota credit. All captured market events end on 2026-08-07, before the protocols were frozen at 2026-08-08 15:20 UTC, so they are training coverage rather than untouched OOS evidence.

The expanded resumable iFinD backfill covers 2024-01-01 through 2026-08-07 with 5,494,936 daily/one-minute China futures and cash-index observations plus U.S. rates and cross-asset EDB series. A separate official CFFEX monthly-archive workflow covers 629 sessions and 459,126 HO/IO/MO contract-day rows from 2024-01-02 through 2026-08-07. Five deterministic contracts were cross-checked against iFinD on 2026-08-07 across close, settlement, volume, and open interest: all 20 comparisons matched exactly. Raw licensed rows remain local; these post-freeze captures remain recommendation-blocked and worth zero research-quota credit.

The narrow ifind-report workflow and the broader multiasset-report workflow publish deterministic JSON, Parquet, and self-contained HTML without republishing licensed rows. Their Web projections are accepted only when every pinned source generation, replayed observation, numerical fact, provenance link, and no-trade card matches exactly.

maos ifind-prospective now removes the manual trading-date guess: it captures the licensed iFinD SSE trading calendar, applies a 17:00 Asia/Shanghai completion cutoff, selects the latest completed session, captures the two-session daily slice plus that session's opening minute window, and publishes both the no-trade report and a durable success/failure status. Same-cutoff reruns replay and reuse the verified generation without credentials or another vendor request. The SSE calendar is explicitly labeled as a scheduling proxy for CFFEX equity-index derivatives, not an authoritative contract calendar.

The China derivatives package includes strict contracts plus a read-only, five-file capture, coherence validator, and normalized analytics adapter compatible with the authorized China-Options-Engine artifact shape. No upstream raw market data are copied into this repository.

Bootstrap and verified gates

Prerequisites: Python 3.12 and uv 0.11 or newer.

python scripts/tasks.py doctor
python scripts/tasks.py setup
python scripts/tasks.py lint
python scripts/tasks.py typecheck
python scripts/tasks.py test
python scripts/tasks.py demo-data
python scripts/tasks.py validate-data
python scripts/tasks.py backtest
python scripts/tasks.py report
python scripts/tasks.py daily
python scripts/tasks.py acceptance
python scripts/tasks.py benchmark
python scripts/tasks.py registry-demo
python scripts/tasks.py registry-query
python scripts/tasks.py cffex-option-backfill
python scripts/tasks.py cffex-ifind-validate
python scripts/tasks.py ifind-prospective
python scripts/tasks.py serve
python scripts/tasks.py smoke
python scripts/tasks.py verify
python scripts/tasks.py security

Licensed local iFinD capture is intentionally outside verify and requires explicit completed dates plus credentials in the process environment:

uv run --env-file .env --frozen --extra dev maos ifind-capture --start-date 2024-07-01 --end-date 2026-08-07 --minute-date 2026-08-07 --output-root artifacts/live-ifind
uv run --env-file .env --frozen --extra dev maos ifind-report --output-root artifacts/live-ifind
uv run --env-file .env --frozen --extra dev maos ifind-prospective --output-root artifacts/live-ifind-prospective
uv run --frozen --extra dev maos cffex-option-backfill --start-month 202401 --end-month 202608 --output-root artifacts/live-cffex-options
uv run --env-file .env --frozen --extra dev maos cffex-ifind-validate --archive-month 202608 --trading-date 2026-08-07 --output-root artifacts/live-cffex-options
uv run --frozen --extra dev maos multiasset-report --output-root artifacts

The prospective command is calendar-aware and preferred for recurring collection. It is kept outside verify because it consumes licensed vendor access. Its 2026-08-09 live receipt selected 2026-08-07 and published generation ifind-prospective-dc3375ba066ad2c78c9f; a credential-free same-cutoff retry returned the identical generation.

The 2026-08-09 publication candidate collected 801 tests: 800 passed and one Windows symlink-permission case was skipped, with 83.18% branch coverage against an 80% floor. Ruff checked and format-checked 196 files; strict mypy checked 104 source files. An independently materialized candidate checkout completed doctor, locked setup, and the full verify task, including all deterministic workflows, 11 e2e smoke tests, the fixed benchmark suite, candidate secret/publication scans, and a hash-locked runtime+development dependency audit with no known vulnerabilities. The authorized China integration also passed while preserving all 132 upstream files byte-for-byte, including size and mtime. Generated output remains under ignored artifacts/ paths.

The current uncommitted multi-asset delta collected 837 tests: 835 passed and two platform/opt-in integration cases were skipped, with 81.36% total branch-aware coverage. Ruff checked and format-checked 215 files and strict mypy checked 114 source files. Exact candidate tree 5171d125956a43cfd2bb9c3db51e945109876015 passed the full alternate-index verify task in 254.2 seconds and a separately materialized checkout repeated doctor, locked setup, and full verify in 288.9 seconds. The real replay produced China generation china-2026-08-07-bc71d2ba5a6f84325a3f and report generation report-e98dfba064fed3ad776b; Dashboard verification reported artifact integrity available, 50 facts, top quality invalid, no_trade, and 0/18 statistical evaluations. Desktop 1280x720 and mobile 390x844 browser checks had no horizontal overflow or console warnings/errors; all four public read-only endpoints returned HTTP 200. The current working tree has not been committed or pushed.

Safety and data boundaries

  • Demo and mechanics fixtures are explicitly synthetic and cannot count as empirical alpha evidence.
  • Wind and iFinD interfaces are read-only and disabled unless locally configured; the verified iFinD SDK path keeps credentials environment-only and licensed rows local.
  • Licensed raw data, credentials, local databases, and generated artifacts are ignored.
  • Data-quality or provenance failures block recommendations rather than being coerced.
  • China live-mid and official settlement-fallback price bases remain separate.

Core documentation:

License

Copyright 2026 Ma Capital. This public source is proprietary and distributed under the terms in LICENSE.

About

No description, website, or topics provided.

Resources

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages