This file is the source of truth for phase completion, test results, assumptions, unresolved risks, and next steps. The project specification is treated as immutable unless the specification itself requires revision.
[x] Phase 0 - Repository foundation
[x] Phase 1 - Raw market-data ingestion
[x] Phase 2 - Market-data QA
[x] Phase 3 - Order-book reconstruction
[x] Phase 4 - Research dataset construction
[x] Phase 5 - Feature engineering
[x] Phase 6 - Label generation
[x] Phase 7 - Baseline statistical research
[x] Phase 8 - Predictive modeling
[x] Phase 9 - Walk-forward evaluation
[x] Phase 10 - Signal construction
[x] Phase 11 - Execution simulator
[x] Phase 12 - Portfolio / inventory accounting
[x] Phase 13 - Cost and latency analysis
[x] Phase 14 - Robustness and regime analysis
[x] Phase 15 - Research report
[x] Phase 16 - Performance engineering
[x] Phase 17 - Final packaging
Status: PASS
Accepted Phase 15 state:
- Exact commit on
origin/main:1eb43e516366c08165b5ac05d367d0bf342dd82e. - GitHub Actions
tests: PASS, run31417149603. - GitHub Actions
research-smoke: PASS, run31417149604. - Both runs are on commit
1eb43e516366c08165b5ac05d367d0bf342dd82eand use the Python 3.11 CI path.
Phase 15 privacy correction remains in force:
reports/final/RESUME_BULLETS.mdandreports/final/INTERVIEW_STORIES.mdare intentionally private career artifacts, excluded from Git, public validation, and public hash scope.- Phase 16 will not restore or publish those private files.
Status: PASS locally and in Python 3.11 GitHub Actions
Change:
- Renamed the YAML model key
models.nulltomodels.null_baselineto avoid PyYAML interpreting the reserved unquoted keynullas PythonNone. - Added recursive config validation requiring all mapping keys to be strings
after YAML loading. Non-string keys now fail clearly before config hashing,
for example:
Non-string YAML mapping key detected at model.models: None. Quote or rename reserved YAML keys. - Added hashing-path validation so direct config hashing cannot fail later in
json.dumps(sort_keys=True)with mixed key types. - Added pytest
pythonpath = ["src"]sopython -m pytestworks from a checkout without relying on an editable install.
Config-key scan:
- Searched all YAML files under
configs/for mapping keys that PyYAML may interpret as non-string scalars:null,~,true,false,yes,no,on, andoff. - The only mapping-key issue found was
configs/model.yamlmodels.null. - Existing
nullandtruescalar values remain unchanged because the portability risk is mapping keys, not ordinary scalar values.
Test results:
python -m pytest: PASS,69 passed in 0.42s.ruff check src tests scripts: PASS,All checks passed!.PYTHONPYCACHEPREFIX=/tmp/microalpha-pycache python -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash0fbc90654bf03c51df2c806dc0765a213d28882b909b22b5cfc34faca61f7483.- GitHub Actions
research-smokeon commitbe1f24e6fb4a1e7e8d7eed4bf23db2877662bbe2: PASS. - GitHub Actions run:
https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31283323407. - Latest pushed commit
82eb73214dad05054f6e428cd74d8a5eb586a689also passed GitHub Actionsresearch-smoke. - Latest GitHub Actions run:
https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31283395667. - Job
smoke: PASS. Stepsactions/setup-python@v5,Install package, andRun tiny research smoke testall completed successfully.
Assumptions and risks:
- Local smoke verification used Python with PyYAML but not Python 3.11 because
no
python3.11binary is installed in this workspace. - Python 3.11 smoke compatibility is confirmed by GitHub Actions
research-smoke, whose workflow config usespython-version: "3.11". - This is a configuration serialization/CI portability bug and does not change the Phase 4 causal research dataset acceptance status.
Status: PASS
Test results:
pytest: PASS, 4 tests.ruff check src tests scripts: PASS.- Installed CLI smoke command generated a run manifest.
- Package import without
PYTHONPATH: PASS in a temporary editable install.
Assumptions and risks:
- Local machine Python is 3.9.6, while the project requires Python 3.11+.
- Local verification used a temporary Python 3.9 virtual environment and forced editable install past the Python-version gate only to exercise the code paths.
- This is not equivalent to Python 3.11+ compatibility verification.
- Proper Python 3.11+ verification must come from GitHub Actions or a real Python 3.11+ environment.
- GitHub Actions has been configured, but no remote CI result has been confirmed in this workspace.
Status: PASS
Data-source decision:
- Initial instrument:
BTC-USDT. - MVP source: local CSV files supplied by the user or downloaded outside the pipeline from an exchange/vendor source.
- Rationale: file-based ingestion is deterministic, works without live network access, keeps raw source files unchanged, and is instrument-agnostic.
- Test data: tiny CSV fixtures committed under
tests/fixtures/phase1.
Assumptions:
- All input timestamps are source-local strings until bronze normalization.
- The configured source timezone is
UTC. - Raw files are copied byte-for-byte into
data/rawand never modified by the ingestion step. - Bronze output is a normalized CSV artifact for Phase 1. Parquet can be added later once the runtime has PyArrow available and downstream needs justify it.
Raw schemas:
trades: requiredevent_time,price,quantity; optionalreceive_time,side,trade_id.book_updates: requiredevent_time,side,price,quantity; optionalreceive_time,update_type,sequence_id.snapshots: requiredevent_time; optional top-Nbid_px_N,bid_sz_N,ask_px_N,ask_sz_Ncolumns are supported for levels 1-10 when present.
Bronze schema:
- Preserves practical source fields from the raw CSV.
- Normalizes
event_timeand optionalreceive_timeto UTC ISO-8601 strings. - Adds
source_event_timeand optionalsource_receive_timebefore timestamp normalization. - Normalizes price/quantity fields as decimal text,
sideandupdate_typeto lowercase, andsequence_idto integer text when present. - Adds
instrumentandsource_checksumlineage columns.
Implementation notes:
- Raw files are copied byte-for-byte into checksum-addressed paths under
data/rawor the configured raw directory. - SHA-256 is computed before and after copy; mismatches fail loudly.
- Metadata manifests are JSON files under
data/manifests/phase1or the configured manifest directory. - Re-ingesting the same source checksum reuses the same raw and bronze paths and does not create duplicate raw data.
Test results:
PYTHONPYCACHEPREFIX=/tmp/microalpha-pycache PYTHONPATH=src python3 -m compileall -q src scripts tests: PASS./tmp/microalpha-phase0-venv/bin/ruff check src tests scripts: PASS./tmp/microalpha-phase0-venv/bin/python -m pytest: PASS, 11 tests./tmp/microalpha-phase0-venv/bin/microalpha-ingest --source-path tests/fixtures/phase1/btc_usdt_trades_2026-01-02.csv --dataset-type trades --instrument BTC-USDT --trade-date 2026-01-02 --raw-dir /tmp/microalpha-phase1-installed/raw --bronze-dir /tmp/microalpha-phase1-installed/bronze --manifest-dir /tmp/microalpha-phase1-installed/manifests: PASS.
Acceptance-gate evidence:
- Immutable raw file: PASS; fixture raw bytes match copied raw bytes exactly.
- Checksum: PASS; SHA-256 is stored in the manifest and re-reading the copied raw file reproduces the same digest.
- Metadata manifest: PASS; JSON manifest includes source path, checksum, ingestion timestamp, timezone, instrument, trade date, row count, required columns, raw path, bronze path, and source metadata.
- Normalized bronze output: PASS; bronze CSV is produced separately from raw.
- Schema tests: PASS; missing required columns are rejected.
- Type tests: PASS; timestamps parse, prices must be positive, quantities must be non-negative, and sequence IDs must be integral when present.
- Duplicate-ingestion test: PASS; repeated ingestion of the same fixture does not duplicate raw or bronze files.
- Large data files: PASS; no non-
.gitkeepfiles exist under repositorydata/.
Unresolved risks:
- Python 3.11+ CI has not yet been confirmed. There is no configured Git remote
and no
ghCLI available in this workspace. - A real exchange/vendor full-day BTC-USDT source file has not yet been ingested locally; Phase 1 acceptance was verified against tiny fixture-day files as requested.
Next steps:
- Do not begin Phase 2 until the user accepts Phase 1 or requests continuation.
- When a real source file is available, run the same ingestion command with
configured
data/raw,data/bronze, anddata/manifestsdirectories.
Status: PASS with documented L2 download limitation
Data-source policy:
- Canonical internal instrument:
BTC-USDT. - Binance Spot vendor symbol:
BTCUSDT. - Tardis normalized Binance Spot vendor symbol:
BTCUSDT. - Binance official public historical Spot trades are used for real full-day trade ingestion validation.
- Binance's standard public historical archive is not assumed to provide historical incremental Spot L2 updates.
- Tardis is selected as the L2 replay-path source because Tardis exchange
metadata confirms Binance Spot
BTCUSDTsupportsincremental_book_L2.
Timestamp semantics:
- Binance Spot trades on
2024-01-01usetimein milliseconds since Unix epoch, UTC. Binance documents Spot timestamps as microseconds from2025-01-01onward, so the adapter chooses units from documented source/date semantics, not from the column name alone. - Tardis normalized
incremental_book_L2usestimestampandlocal_timestampin microseconds since Unix epoch, UTC.timestampis the exchange timestamp where available;local_timestampis message-arrival time.
Real trade-data validation:
- Source: Binance official public archive.
- URL:
https://data.binance.vision/data/spot/daily/trades/BTCUSDT/BTCUSDT-trades-2024-01-01.zip - Checksum URL:
https://data.binance.vision/data/spot/daily/trades/BTCUSDT/BTCUSDT-trades-2024-01-01.zip.CHECKSUM - Date:
2024-01-01. - Vendor checksum:
a312617d895cdae43a58551f05fc9bc6b97285fab2e5d0daf774b4fb61e0a0c0. - Project SHA-256:
a312617d895cdae43a58551f05fc9bc6b97285fab2e5d0daf774b4fb61e0a0c0. - Vendor checksum verification: PASS.
- Full-day rows ingested:
1,114,623. - Raw zip preserved under
/tmp/microalpha-real-ingest/raw/.... - Bronze file produced under
/tmp/microalpha-real-ingest/bronze/.... - Metadata manifest produced under
/tmp/microalpha-real-ingest/manifests/.... - No real/raw data files were written under repository
data/.
Actual Binance source schema encountered:
trade_id, price, quantity, quote_quantity, time, is_buyer_maker, is_best_match
Binance normalization mapping:
time->event_time, converted from documented milliseconds to UTC ISO.- No Binance receive timestamp exists in this archive, so
receive_timeis empty. price->price.quantity->quantity.trade_id->trade_idandsource_trade_id.quote_quantitypreserved.is_buyer_maker=True-> aggressiveside=sell;False->side=buy.is_best_matchpreserved.- Adds
instrument=BTC-USDTandsource_checksum.
Tardis L2 adapter:
- Adapter implemented for Tardis normalized
incremental_book_L2gzip CSV. - Expected Tardis source schema:
exchange, symbol, timestamp, local_timestamp, is_snapshot, side, price, amount
- Tardis normalization mapping:
timestamp->event_time, converted from microseconds UTC.local_timestamp->receive_time, converted from microseconds UTC.amount->quantity.is_snapshot=true->update_type=snapshot; otherwiseset.side,price, vendor fields, and source timestamps are preserved.
- A direct GET request for the documented Binance Spot
BTCUSDTincremental_book_L2sample later succeeded during Phase 3 preflight. The downloaded file is recorded in the Phase 3 section.
Regression fixtures:
tests/fixtures/real_subsets/binance_spot_BTCUSDT_trades_2024-01-01_first5.csvcontains the first five rows from the real Binance full-day trade file.tests/fixtures/real_subsets/tardis_binance_incremental_l2_schema_sample.csvcontains a tiny Tardis normalized incremental L2 schema fixture.
Status: PASS
QA threshold configuration:
- Config file:
configs/qa.yaml. - Timestamp bounds:
2010-01-01T00:00:00+00:00to2035-01-01T00:00:00+00:00. - Extreme price discontinuity ERROR threshold:
1000bps consecutive observed price/BBO-mid move. - Extreme quantity WARNING threshold: absolute quantity above
1,000,000. - Update gap WARNING threshold:
60,000ms between consecutive event times. - Stale BBO WARNING threshold: unchanged BBO longer than
300,000ms.
Severity policy:
ERROR: downstream research must stop; QA report setscan_continue=false.WARNING: processing may continue; the issue remains visible in the QA report.
Validators implemented:
- Missing/corrupted/impossible/naive/backward timestamps.
- Exact duplicate rows.
- Missing sequence gaps, repeated sequence IDs, out-of-order sequence IDs, and non-integer sequence IDs when present.
- Non-positive prices and unparsable prices.
- Negative quantities and unparsable quantities.
- Crossed books and locked books when BBO columns are present.
- Extreme consecutive price discontinuities.
- Extreme size outliers.
- Inter-update gaps.
- Stale BBO.
QA report schema:
- Deterministic JSON with
status,can_continue,row_count,duplicate_count,sequence_gap_count,crossed_book_count,locked_book_count,timestamp_error_count,warning_count,error_count, sortedwarnings, and structuredissues.
Test results:
PYTHONPYCACHEPREFIX=/tmp/microalpha-pycache PYTHONPATH=src python3 -m compileall -q src scripts tests: PASS./tmp/microalpha-phase0-venv/bin/ruff check src tests scripts: PASS./tmp/microalpha-phase0-venv/bin/python -m pytest: PASS, 31 tests./tmp/microalpha-phase0-venv/bin/microalpha-qa --input-path tests/fixtures/phase2/clean_book.csv --dataset-type book_updates --report-out /tmp/microalpha-phase2-clean-qa.json: PASS, exit code 0./tmp/microalpha-phase0-venv/bin/microalpha-qa --input-path tests/fixtures/phase2/zero_price.csv --dataset-type trades --report-out /tmp/microalpha-phase2-fail-qa.json: PASS, exit code 2 withcan_continue=false.
Real-data QA result:
- Input:
/tmp/microalpha-real-ingest/bronze/binance_spot/BTC-USDT/2024-01-01/trades/a312617d895cdae4.csv - Dataset type:
trades. - Rows:
1,114,623. - Status: PASS.
can_continue: true.- Errors:
0. - Warnings:
0. - Duplicates:
0. - Timestamp errors:
0. - QA report:
/tmp/microalpha-real-ingest/qa/binance_spot_BTCUSDT_trades_2024-01-01_qa.json
Acceptance-gate evidence:
- Synthetic corruption fixtures exist for timestamp errors, duplicates, sequence gaps/repeats/out-of-order IDs, invalid prices, negative quantities, crossed/locked books, extreme price discontinuities, extreme sizes, update gaps, stale BBO, and combined corruption.
- Clean fixture passes.
- Deterministic QA report output test passes.
- Real BTC-USDT full-day trade QA smoke passes.
- Invalid critical data prevents downstream continuation.
Known limitations:
- Python 3.11+ CI remains unconfirmed in this workspace.
- Phase 2 row/schema QA does not replace Phase 3 state-level book validation.
- Sequence validation is source-dependent. It is N/A for Tardis normalized L2
because the normalized CSV does not supply vendor sequence IDs; replay uses
capture-order mode based on source row order and
local_timestamp. - Crossed/locked-book checks on individual incremental updates are not a substitute for reconstructed-state invariants. Phase 3 enforces crossed-book validation after complete logical update groups.
Next steps:
- Phase 3 preflight is required before replay work is considered valid.
Status: PASS
Real-data preflight source:
- Source: Tardis downloadable CSV datasets API.
- Exchange:
binance. - Vendor symbol:
BTCUSDT. - Canonical symbol:
BTC-USDT. - Data type:
incremental_book_L2. - Date:
2019-12-01. - Request path:
https://datasets.tardis.dev/v1/binance/incremental_book_L2/2019/12/01/BTCUSDT.csv.gz - HTTP status:
200. - Local raw path:
/tmp/microalpha-real-data/tardis_binance_BTCUSDT_incremental_book_L2_2019-12-01.csv.gz - Source SHA-256:
f7daa040dc33fc7328ff8468b198731fd5add90bc8cef434aab86726268e8a34. - Compressed size:
43,947,405bytes.
Actual Tardis source schema:
exchange, symbol, timestamp, local_timestamp, is_snapshot, side, price, amount
Tardis inspection results:
- Decompressed row count:
6,486,542. - Timestamp range:
1575158404999000to1575244799808000microseconds since Unix epoch, UTC. - Local timestamp range:
1575158405045139to1575244799929296microseconds since Unix epoch, UTC. is_snapshot=truerows:2,000.is_snapshot=falserows:6,484,542.- Unique sides:
ask,bid. - Price range:
1336.92to51000. - Amount range:
0to351.854158. - Multiple rows share
local_timestamp: yes. - Exchange
timestampmonotonic in source row order: no. local_timestampmonotonic in source row order: yes.- Initial snapshot rows: source rows
1through2,000. - First incremental row after snapshot: source row
2,001.
First 10 raw Tardis rows:
binance,BTCUSDT,1575158405045139,1575158405045139,true,ask,7541.38,0.085806
binance,BTCUSDT,1575158405045139,1575158405045139,true,ask,7541.39,0.013013
binance,BTCUSDT,1575158405045139,1575158405045139,true,ask,7541.4,4
binance,BTCUSDT,1575158405045139,1575158405045139,true,ask,7541.44,5.045272
binance,BTCUSDT,1575158405045139,1575158405045139,true,ask,7541.45,3.995438
binance,BTCUSDT,1575158405045139,1575158405045139,true,ask,7541.46,1.971371
binance,BTCUSDT,1575158405045139,1575158405045139,true,ask,7541.47,4
binance,BTCUSDT,1575158405045139,1575158405045139,true,ask,7541.48,0.097294
binance,BTCUSDT,1575158405045139,1575158405045139,true,ask,7541.49,0.3
binance,BTCUSDT,1575158405045139,1575158405045139,true,ask,7541.5,0.082835
Source ordering semantics:
- Tardis normalized L2 does not contain
sequence_id; absence of sequence IDs is not an error for this source. - Replay supports two modes:
- vendor-sequence mode, used when an explicit source sequence exists;
- capture-order mode, used for Tardis normalized L2.
- Capture-order mode preserves source row order using
source_row_numberand groups logical source messages byreceive_time/Tardislocal_timestamp. - Replay validates book invariants after complete logical update groups, not halfway through a multi-row source message.
- Pre-snapshot incremental rows are ignored until the first valid snapshot group initializes the book.
Real regression fixture:
- Fixture:
tests/fixtures/real_subsets/tardis_binance_BTCUSDT_incremental_book_L2_2019-12-01_rows_1_2050.csv - Source row range: contiguous rows
1through2,050, including the full2,000-row initial snapshot plus50subsequent incremental rows. - Fixture SHA-256:
bde8b4ce360d2f8e8a226559aa9b69480fdf5b442981614357b1483f485d740a. - Sampling method: contiguous source-order extraction; no random sampling.
Implementation notes:
- Ordered price levels use a sorted price list plus quantity map per side.
- Price insertion/removal uses binary search and list insertion/removal; replay does not sort the full book on every event.
- Baseline complexity is O(log n) search plus O(n) list shift on price-level insert/delete, acceptable for Phase 3 correctness.
- Maintains bid levels, ask levels, quantities, top-N depth, best bid, best ask, mid, and spread.
Real-data replay validation:
- Input: first
50,000contiguous rows of the actual Tardis gzip, normalized through the Tardis adapter into/tmp/microalpha-tardis-preflight/bronze/.... - Rows/events processed:
50,000. - Initial snapshot location: rows
1through2,000. - Timestamp range replayed:
2019-12-01T00:00:05.045139+00:00to2019-12-01T00:12:57.774000+00:00. - Final best bid:
7506.07. - Final best ask:
7506.95. - Inserts:
21,739. - Updates:
6,260. - Deletions:
19,576. - No-op deletes:
2,425. - Invalid/crossed states:
0. - Replay resets:
0. - Rows ignored before snapshot:
0. - Processing time: approximately
0.435seconds. - Deterministic final-state match: true.
- Deterministic output hash match: true.
- Output hash:
3d8e5fdde91499db9b68d5f9f73a48698ac370b323eddff439ac3840cf1d19f7.
Real Tardis row-level QA:
- QA input: same
50,000-row Tardis bronze sample. - Ordering timestamp:
receive_time, matching Tardislocal_timestampcapture-order semantics. - Status: PASS.
- Errors:
0. - Warnings:
0. can_continue: true.
Tests:
- Synthetic Phase 3 tests cover deterministic hand-built book state, level deletion, best-bid improvement, best-ask improvement, multi-level depth ordering, crossed reconstructed state detection, pre-snapshot update handling, same-local-timestamp source-order preservation, deterministic replay, no-sequence-ID Tardis replay, and vendor-sequence replay.
- Real regression tests cover Tardis snapshot initialization and contiguous source-order replay.
Test results:
/tmp/microalpha-phase0-venv/bin/python -m pytest: PASS, 42 tests./tmp/microalpha-phase0-venv/bin/ruff check src tests scripts: PASS.PYTHONPYCACHEPREFIX=/tmp/microalpha-pycache PYTHONPATH=src python3 -m compileall -q src scripts tests: PASS.
Acceptance-gate evidence:
- Real Tardis L2 dataset successfully acquired and inspected.
- Real initial snapshot reconstructed.
- Real incremental updates replayed.
- Synthetic and real-data regression tests pass.
- Source ordering semantics are documented.
- No hidden unresolved book-state inconsistency remains; real replay reported zero invalid/crossed states.
Next steps:
- Phase 4 is now complete. Stop before Phase 5 until the user accepts Phase 4 or requests continuation.
Status: PASS
Scope control:
- Phase 5 feature engineering was not started.
- No queue imbalance, OFI, microprice, labels, models, or trading signals were implemented.
Full-day Phase 3 hardening:
- Full-day Tardis L2 input rows:
6,486,542. - Initial snapshot rows:
2,000, with1,000ask rows and1,000bid rows. - Effective snapshot-depth limitation: research state is initialized from the finite Tardis snapshot depth present in the file, not infinite/full market depth. Top-10 state is reliable only within the maintained levels after this finite initialization and subsequent updates.
- Timestamp range replayed:
2019-12-01T00:00:05.045139+00:00to2019-12-01T23:59:59.808000+00:00. - Inserts:
2,671,052. - Updates:
835,070. - Deletes:
2,663,854. - No-op deletes:
316,566. - Crossed/invalid states:
0. - Resets:
0. - Final best bid:
7390.16. - Final best ask:
7391.55. - Final top-5 bids:
7390.16 x 0.027057,7390.13 x 4.09756,7390.11 x 0.59991,7390.09 x 4,7390.07 x 0.497399. - Final top-5 asks:
7391.55 x 0.022018,7391.56 x 0.046975,7391.61 x 0.05,7392.99 x 0.09282,7393 x 2. - Processing time: approximately
68.061seconds for the first full replay. - Deterministic output hash:
582d22aea26c6f177ba7682cc67f02f81697dd6d0a28bc5b2274ab2476d6d110. - Second full replay output hash matched exactly.
No-op delete investigation:
- Tardis represents zero
amountrows as level removals. - A no-op delete means the removal references a price level that is not present in the maintained book at that point.
- This is not automatically erroneous because the replay starts from a finite 2,000-row snapshot, not an infinite-depth book; later removals can reference levels outside the initialized/maintained depth or levels already removed by a prior update.
- No-op deletes do not alter top-N state directly because they remove no currently maintained level. They are counted and reported because excessive no-ops may indicate snapshot-depth limitations or vendor stream semantics.
Same-day trade data:
- Source: Tardis downloadable CSV datasets API.
- Exchange:
binance. - Vendor symbol:
BTCUSDT. - Canonical symbol:
BTC-USDT. - Data type:
trades. - Date:
2019-12-01. - Request path:
https://datasets.tardis.dev/v1/binance/trades/2019/12/01/BTCUSDT.csv.gz - HTTP status:
200. - Local raw path:
/tmp/microalpha-real-data/tardis_binance_BTCUSDT_trades_2019-12-01.csv.gz - Compressed size:
6,669,039bytes. - SHA-256:
6a6a2bf2cb8a609f8f2ba4b264d6f3bb31dd3c8b39f93644a87f53e83202e258. - Row count:
420,562. - Headers:
exchange, symbol, timestamp, local_timestamp, id, side, price, amount. - Exchange timestamp range:
1575158403572000to1575244799868000. - Local timestamp range:
1575158403820370to1575244799991952. - Exchange timestamp monotonic in source order: true.
- Local timestamp monotonic in source order: true.
- Trade side/aggressor semantics: Tardis normalized
sideisbuyorsell. - Price range:
7210to7541.46. - Quantity range:
0.000001to63.2398. - Bronze trade rows normalized:
420,562.
First Tardis trade rows:
binance,BTCUSDT,1575158403572000,1575158403820370,211646077,sell,7540.78,0.039741
binance,BTCUSDT,1575158403579000,1575158403820405,211646078,sell,7540.78,0.035479
binance,BTCUSDT,1575158403622000,1575158403820575,211646079,buy,7541.46,0.03974
binance,BTCUSDT,1575158403857000,1575158404041373,211646080,buy,7541.45,0.004562
binance,BTCUSDT,1575158404680000,1575158404802170,211646081,sell,7540.78,0.023631
Real trade regression fixture:
- Fixture:
tests/fixtures/real_subsets/tardis_binance_BTCUSDT_trades_2019-12-01_rows_1_100.csv - Source row range: contiguous rows
1through100. - Fixture SHA-256:
cedb2fd4e2f52e10acc1334cd493aa9aae448ff74a9fe3075a94e00a6682a50f.
Causal time contract:
event_time: exchange-origin timestamp, preserved for analysis.observation_time: local/receive timestamp at which the event became observable.source_row_number: immutable source-order tie breaker.feature_cutoff_time: latest observation time information is allowed to use.- For Tardis research data, causal replay and feature availability are based on
observation_time/local_timestampplus preserved source row ordering. - The captured stream is not resorted by non-monotonic exchange
event_time.
Dataset views implemented:
- Event-state dataset: one row per fully completed logical book-state update group after the active book has been initialized from a valid snapshot.
- Fixed-clock dataset: 100 ms configurable grid using backward/as-of semantics;
a grid row at
Tcan only use a fully completed state withobservation_time <= T. - Maximum book-state staleness is configurable; stale rows are marked unavailable rather than carried indefinitely.
- Trade alignment uses only trades with
trade_observation_time <= T; exchange trade timestamps are preserved separately. - Top-10 book depth is emitted.
Required research-table fields:
- Event/fixed rows include
instrument,observation_time,feature_cutoff_time,book_event_time,book_observation_time,book_source_row_number, best bid/ask, top-10 bid/ask prices and sizes,mid,spread, and latest eligible trade event/observation fields for fixed-clock rows. - No forward-return labels are present.
Storage:
- PyArrow is not installed in the current local test environment, so verified
large real-data outputs are deterministic CSV files under
/tmp. - Parquet remains preferred once a proper PyArrow runtime is available; testing was not weakened because PyArrow is absent locally.
Meaningful real interval validation:
- L2 source rows:
50,000. - Trade source rows:
420,562. - Event-state rows:
6,983. - Fixed-clock rows:
7,729. - Unavailable/stale rows:
0. - Sampling interval:
100ms. - Timestamp range:
2019-12-01T00:00:05.045139+00:00to2019-12-01T00:12:57.845139+00:00. - Duplicate research timestamps:
0. - Crossed/invalid states:
0. - Max RSS reported by process:
557,318,144bytes-equivalent on macOS. - Event-state processing time: approximately
0.663seconds. - Fixed-clock processing time: approximately
2.538seconds. - Event-state hash:
6b9e0a4d3bcdfa8a3ecef5a4af37abce0e878c861a0eb6ef933b3ebc16f28bfb. - Fixed-clock hash:
3de878a37c24ccd3af29e57bb832d6db898d08db98139c64f405f82c3f49e099. - Independent rerun on the same interval produced identical hashes.
Full-day Phase 4 validation:
- L2 source rows:
6,486,542. - Trade source rows:
420,562. - Event-state rows:
815,980. - Fixed-clock rows:
863,949. - Unavailable/stale rows:
13. - Sampling interval:
100ms. - Timestamp range:
2019-12-01T00:00:05.045139+00:00to2019-12-01T23:59:59.845139+00:00. - Duplicate research timestamps:
0. - Crossed/invalid states:
0. - Max RSS reported by process:
1,527,881,728bytes-equivalent on macOS. - Event-state processing time: approximately
84.819seconds. - Fixed-clock processing time: approximately
71.381seconds. - Event-state output:
/tmp/microalpha-phase4-full-day/event_states_full.csv. - Fixed-clock output:
/tmp/microalpha-phase4-full-day/fixed_100ms_full.csv. - Event-state hash:
8953bdab6d46556d8f1b51a18695e00050b53abc9d87ad52090e12bb441f876e. - Fixed-clock hash:
46f7fedf461bdaad807c7a16c96bd2a3f543c48c45e1be6097173853a16c16e9.
100 ms grid row-count clarification:
- The full-day fixed-clock table contains
863,949rows rather than the calendar-day maximum of864,000because the grid is bounded by observable book state availability, not midnight-to-midnight wall-clock time. - Grid start is the first completed, valid book-state observation:
2019-12-01T00:00:05.045139+00:00. - Grid end is the last grid timestamp
<=the final completed book-state observation:2019-12-01T23:59:59.929296+00:00; with 100 ms spacing from the start, the final emitted grid cutoff is2019-12-01T23:59:59.845139+00:00. - Row count is therefore:
floor((2019-12-01T23:59:59.929296 - 2019-12-01T00:00:05.045139) / 100ms) + 1 = 863,949.
Logical book update group clarification:
- A complete logical book update group is identified by the source adapter's documented ordering/grouping semantics.
- For Tardis normalized L2, rows are preserved in source order using
source_row_number, and rows sharing the samelocal_timestamp(receive_time) are treated as one completed observable group because Tardis emits normalized book updates withlocal_timestampas the capture/arrival timestamp for that source message. - Equal timestamps alone are not treated as a universal proof of atomicity for other vendors. If a source supplies explicit sequence/message IDs, the replay layer must use those identifiers instead.
- Source ordering is preserved in all modes; event-state rows are emitted only after the full applicable group has been processed and validated.
Manual fixed-clock row audits:
cutoff=2019-12-01T00:00:05.045139+00:00
selected_book=2019-12-01T00:00:05.045139+00:00 source_row=2000
latest_trade=2019-12-01T00:00:04.802441+00:00
next_book=2019-12-01T00:00:05.116597+00:00 next_trade=2019-12-01T00:00:05.701053+00:00
cutoff=2019-12-01T06:00:03.745139+00:00
selected_book=2019-12-01T06:00:03.690874+00:00 source_row=1849626
latest_trade=2019-12-01T06:00:03.496320+00:00
next_book=2019-12-01T06:00:03.792105+00:00 next_trade=2019-12-01T06:00:03.902115+00:00
cutoff=2019-12-01T12:00:02.445139+00:00
selected_book=2019-12-01T12:00:02.357883+00:00 source_row=3395608
latest_trade=2019-12-01T12:00:02.314170+00:00
next_book=2019-12-01T12:00:02.458453+00:00 next_trade=2019-12-01T12:00:02.785756+00:00
cutoff=2019-12-01T18:00:01.145139+00:00
selected_book=2019-12-01T18:00:01.080147+00:00 source_row=5062419
latest_trade=2019-12-01T18:00:00.327022+00:00
next_book=2019-12-01T18:00:01.180721+00:00 next_trade=2019-12-01T18:00:02.357109+00:00
cutoff=2019-12-01T23:59:59.845139+00:00
selected_book=2019-12-01T23:59:59.829502+00:00 source_row=6486535
latest_trade=2019-12-01T23:59:58.785719+00:00
next_book=2019-12-01T23:59:59.929296+00:00 next_trade=2019-12-01T23:59:59.991952+00:00
All audited selected book/trade observations are <= cutoff; the listed next
book/trade records are strictly after cutoff and were not selected.
Tests:
- Temporal causality test: PASS.
- Future mutation test: PASS.
- Sampling boundary test: PASS.
- Exact boundary test: PASS.
- Same-local-timestamp ordering/grouping test: PASS.
- Staleness test: PASS.
- Snapshot boundary test: PASS.
- Determinism/hash test: PASS.
- No-event-time-resort test: PASS.
- Trade alignment leakage test: PASS.
- Real contiguous Phase 4 regression fixture test: PASS.
Test results:
/tmp/microalpha-phase0-venv/bin/python -m pytest: PASS, 51 tests./tmp/microalpha-phase0-venv/bin/ruff check src tests scripts: PASS.PYTHONPYCACHEPREFIX=/tmp/microalpha-pycache PYTHONPATH=src python3 -m compileall -q src scripts tests: PASS.
Acceptance-gate evidence:
- Full-day L2 replay is trusted and deterministic.
- Same-day real Tardis trades were acquired and normalized.
- Causal observation-time semantics are explicit in code and status.
- Source ordering is preserved via
source_row_number. - Event-state research table works.
- Fixed-clock research table works.
- Backward/as-of sampling cannot select future book state.
- Trade alignment cannot select future trades.
- Future-mutation leakage tests pass.
- Deterministic dataset hash is demonstrated on real contiguous data.
- Real-data row audits show no future information usage.
Known limitations:
- Python 3.11+ CI remains unconfirmed in this workspace.
- Parquet output is deferred until PyArrow is available in the runtime.
- The initial Tardis snapshot is finite depth, so top-10 research state is supported, but no claim is made about complete full-depth book history.
Next steps:
- Phase 5 feature engineering is now complete. Stop before Phase 6 until the user accepts Phase 5 or requests continuation.
Status: PASS
Files created or modified:
STATUS.mdconfigs/features.yamlsrc/microalpha/features/__init__.pysrc/microalpha/features/engineering.pysrc/microalpha/features/metadata.pytests/unit/test_phase5_features.py
Feature version:
microstructure_v1
Feature architecture:
- State features are computed from the latest causally available completed book
state at
feature_cutoff_time. - Flow features are computed from underlying book/trade event streams first and then causally aggregated into fixed-clock rows.
- All trailing windows use
(T-W, T]: events exactly atTare included, events exactly atT-Ware excluded, and events afterTare excluded. - Tardis observation/local timestamp is the causal eligibility timestamp.
Exact feature definitions:
mid = (best_bid + best_ask) / 2.spread = best_ask - best_bid.relative_spread = spread / mid.spread_bps = 10000 * spread / mid.qi_1 = (bid_sz_1 - ask_sz_1) / (bid_sz_1 + ask_sz_1).bid_depth_N = sum(bid_sz_1 ... bid_sz_N)forN in {5, 10}.ask_depth_N = sum(ask_sz_1 ... ask_sz_N)forN in {5, 10}.di_N = (bid_depth_N - ask_depth_N) / (bid_depth_N + ask_depth_N)forN in {5, 10}.microprice = ask_px_1 * bid_sz_1 / (bid_sz_1 + ask_sz_1) + bid_px_1 * ask_sz_1 / (bid_sz_1 + ask_sz_1).microprice_deviation = (microprice - mid) / mid.microprice_deviation_bps = 10000 * (microprice - mid) / mid.ofi_eventfollows the documented Cont-style BBO transition formula from consecutive completed observable BBO states.ofi_W = sum(ofi_event)over completed BBO transitions in(T-W, T].book_update_count_W = count(completed BBO transitions)in(T-W, T].buy_volume_W,sell_volume_W,trade_count_W, andtrade_notional_Wuse trades in(T-W, T].trade_imbalance_W = (buy_volume_W - sell_volume_W) / (buy_volume_W + sell_volume_W).signed_trade_volume_Wis positive for aggressive buys and negative for aggressive sells.realized_vol_W = sqrt(sum(log(mid_n / mid_{n-1})^2))over trailing completed-state mid returns in(T-W, T]; it is not annualized.mom_W = log(mid_asof_T / mid_asof_(T-W))using backward/as-of mid selection.
Configured windows:
- OFI and book-update count:
100ms,500ms,1s,5s,30s. - Trade-flow features:
100ms,500ms,1s,5s,30s. - Realized volatility:
1s,5s,30s. - Momentum:
100ms,500ms,1s,5s.
Missing-data behavior:
- Missing or stale Phase 4 book state leaves state-dependent features blank.
- Zero denominators for
qi_1,di_N, and microprice-family features produceNaN. - Missing depth levels are omitted from depth sums; they are not imputed.
- No-trade windows produce zero count/volume/notional and
NaNtrade_imbalance. - Realized volatility and momentum are blank until enough trailing mid history exists.
Real data used:
- Canonical instrument:
BTC-USDT. - Vendor: Tardis normalized Binance Spot.
- Vendor symbol:
BTCUSDT. - Date:
2019-12-01. - Event-state input:
/tmp/microalpha-phase4-full-day/event_states_full.csv. - Fixed-clock input:
/tmp/microalpha-phase4-full-day/fixed_100ms_full.csv. - Trade input:
/tmp/microalpha-tardis-trades/bronze/tardis_binance_spot/BTC-USDT/2019-12-01/trades/6a6a2bf2cb8a609f.csv. - Feature output:
/tmp/microalpha-phase5-full-day/features_microstructure_v1_full.csv. - Summary output:
/tmp/microalpha-phase5-full-day/summary.json. - Manual audit output:
/tmp/microalpha-phase5-full-day/manual_audits.json.
Full-day real-data results:
- Total feature rows:
863,949. - Feature columns:
91. - Feature output hash:
e95c6dfa6bcb5c21272a267d5f2f3760a3b1f2f53f2af6f3770bee3723419dd2. - Full end-to-end feature build processing time on rerun:
approximately
549.627seconds. - Future performance-engineering target: reduce the full-day Phase 5 build
runtime from approximately
549.627seconds. Do not optimize this before the performance-engineering phase. - Max RSS during full rerun:
1,502,711,808bytes-equivalent on macOS. - The initial full-day feature build wrote the complete CSV but was interrupted during the old non-streaming summary pass. The completed CSV was retained, row-counted, hashed, summarized with the streaming summary implementation, and manually audited.
- A full rerun with the patched streaming summary wrote
/tmp/microalpha-phase5-full-day-rerun/features_microstructure_v1_full.csvand reproduced the same feature output hash exactly.
Feature distribution summary:
feature missing_rate min p1 p5 median p95 p99 max mean std
qi_1 0.0000150472 -0.999999768 -0.999969654 -0.986454 -0.0144416 0.984090 0.999943 1.000000 -0.0296896 0.705152
di_5 0.0000150472 -0.998830781 -0.949912445 -0.881049 -0.0755150 0.854105 0.935727 0.998102 -0.0488373 0.569611
di_10 0.0000150472 -0.996997093 -0.887659958 -0.780111 -0.0721688 0.748735 0.871000 0.992299 -0.0472432 0.487867
spread_bps 0.0000150472 0.0132640 0.0135685 0.0672973 1.76922 4.25807 5.62211 22.3764 1.95446 1.22050
microprice_deviation_bps 0.0000150472 -10.1238150 -2.01402 -1.29917 -0.00284128 1.24599 1.96588 8.40500 -0.0267559 0.783333
ofi_100ms 0.0000000000 -84.315575 -2.69634 -0.800014 0.00000 0.548697 2.50000 108.326 -0.0133520 0.983538
ofi_1s 0.0000000000 -109.979372 -11.2528 -5.80600 0.00000 5.15535 10.5752 136.908 -0.133520 3.91295
ofi_5s 0.0000000000 -125.432520 -30.2532 -16.6057 -0.266469 14.5705 26.6764 145.357 -0.667536 10.5192
trade_imbalance_1s 0.135388779 -1.000000 -1.00000 -1.00000 0.380039 1.00000 1.00000 1.00000 0.130085 0.851310
trade_count_1s 0.0000000000 0.000000 0.00000 0.00000 3.00000 16.0000 32.0000 1304.000 4.86784 9.51138
trade_volume_1s 0.0000000000 0.000000 0.00000 0.00000 0.190464 2.56925 9.37140 267.339 0.703365 2.91425
realized_vol_5s 0.0000011575 0.000000 0.00000240 0.00000478 0.0001169 0.0003886 0.000643 0.004571 0.0001467 0.0001569
mom_1s 0.0000115748 -0.00485147 -0.0003059 -0.0001481 0.000000 0.0001497 0.000319 0.003057 -0.000000232 0.0001001
Manual real-data audits:
- Five deterministic rows were audited at feature row indexes
10006,200000,400000,600000, and800000. - Each audit records
feature_cutoff_time,book_source_row_number, top-of-book source inputs, OFI source-event index range, trade source-row index range, and as-of mids. - Recomputed
qi_1,microprice,ofi_1s,trade_imbalance_1s, andmom_1smatched feature output exactly or within1e-18float tolerance for momentum. - Audit examples:
- row
10006, cutoff2019-12-01T00:16:45.645139+00:00, book source row73989:qi_1=0.9737111542805600800142501945,ofi_1s=2.600000,trade_imbalance_1s=-1,mom_1s=1.3321024705939499e-06. - row
400000, cutoff2019-12-01T11:06:45.045139+00:00, book source row3165784:qi_1=0.9582831829249456148042292063,ofi_1s=6.079340,trade_imbalance_1s=1,mom_1s=4.3477876900748396e-05. - row
800000, cutoff2019-12-01T22:13:25.045139+00:00, book source row6021333:qi_1=0.7086629303442754203362690152,ofi_1s=0.106706,trade_imbalance_1s=-1,mom_1s=2.0392383443867545e-06.
- row
Tests added:
- Exact formula tests for queue imbalance, depth imbalance, microprice, microprice deviation, trade imbalance, momentum, and realized volatility.
- Exact numeric tests for all eight OFI BBO transition cases.
- Range tests for imbalance features, spread, depth, and finite numeric output.
- Mirror-symmetry tests for queue imbalance, depth imbalance, microprice deviation, and OFI.
- Explicit
(T-W, T]boundary test. - Trade-arrival leakage test using receive time.
- Future-mutation leakage test covering state, event-flow, trade-flow, realized-volatility, and momentum features.
- Event-stream OFI test proving intermediate BBO events within a 100 ms bin are retained.
- Same-observation-time source-order test.
- No-trade-window, stale-row propagation, missing-depth, zero-denominator, and deterministic feature-hash tests.
Exact test results:
/tmp/microalpha-phase0-venv/bin/python -m pytest: PASS,63 passed in 0.48s./tmp/microalpha-phase0-venv/bin/ruff check src tests scripts: PASS,All checks passed!.PYTHONPYCACHEPREFIX=/tmp/microalpha-pycache PYTHONPATH=src python3 -m compileall -q src scripts tests: PASS.
Acceptance-gate evidence:
- All required baseline state, flow, activity, realized-volatility, and momentum features are implemented.
- Event-level OFI is computed from completed real book-state transitions and aggregated causally.
- Real same-day Tardis
BTCUSDTtrades from2019-12-01are used for trade-flow features. - All trailing windows use the documented
(T-W, T]convention. - Missing/stale behavior is explicit.
- Formula, OFI transition, mirror-symmetry, leakage, event-stream OFI, deterministic hash, and source-order tests pass.
- Real-data distributions were inspected for required important features.
- At least five manual real-data audits confirmed selected feature calculations.
Assumptions:
- Tardis normalized trade
sideis interpreted as the aggressive trade side; buy is positive and sell is negative for signed volume. - Tardis
local_timestamp/ normalizedreceive_timeis the causal eligibility clock for both L2 and trade events. - For same-observation-time L2 groups, source row order remains the tie breaker.
- Missing depth levels represent absent captured levels in the Phase 4 row and are omitted from top-N depth sums.
Known limitations:
- Python 3.11+ CI remains unconfirmed in this workspace; local checks still run under Python 3.9.6.
- Parquet/PyArrow was not introduced because PyArrow is unavailable locally and storage optimization must not block feature correctness.
- The full-day feature artifact is a large CSV under
/tmpand is not committed to Git. - Feature generation is correct but not yet optimized for production-scale memory or storage throughput.
- No labels, IC calculations, models, optimized signals, backtests, or trading simulation were implemented.
Next steps:
- Phase 6 label generation was requested after Phase 5 acceptance; see below.
Status: PASS locally + PASS in Python 3.11 CI
Files created or modified:
STATUS.mdconfigs/labels.yamlsrc/microalpha/labels/__init__.pysrc/microalpha/labels/generation.pysrc/microalpha/labels/metadata.pytests/unit/test_phase6_labels.py
Documentation follow-up before implementation:
- Verified that the Phase 5 feature distribution table already records actual
missing rate plus min/p1/p5/median/p95/p99/max/mean/std for
qi_1,di_5,di_10,spread_bps,microprice_deviation_bps,ofi_1s,trade_imbalance_1s,realized_vol_5s, andmom_1s; no duplicate table was added. - Recorded the full-day Phase 5 runtime, approximately
549.627seconds, as a future Phase 16 performance-engineering target.
Label version and configuration:
- Label version:
microstructure_labels_v1. - Horizons:
100ms,500ms,1s,5s,30s. - Regression labels:
ret_fwd_100ms,ret_fwd_500ms,ret_fwd_1s,ret_fwd_5s,ret_fwd_30s. - Regression definition:
log(mid_future / mid_T). - Classification labels:
direction_100ms,direction_500ms,direction_1s,direction_5s,direction_30s. - Classification threshold:
0.5bps, fixed in config and not tuned. - Classification rule:
UPif return> threshold,DOWNif return< -threshold, otherwiseFLAT. - Future lookup rule:
first_observation_at_or_after_horizon. - Initial maximum label delay:
100ms. This matches the Phase 4 fixed-clock grid spacing: exact target rows are preferred, the next valid fixed-clock row may be accepted, and multi-row/multi-second drift is rejected. - Default multi-day policy:
cross_session_labels=false; labels cannot cross UTC session/date boundaries by default. - Binance Spot trades continuously 24/7, so
cross_session_labels=falserefers to the project's UTC research-day / dataset-partition boundary, not to an exchange market close. - Next observable mid-change diagnostic search horizon:
30,000ms.
Timestamp and causality contract:
- Prediction time
Tisfeature_cutoff_time. - Target time is
feature_cutoff_time + horizon. - Future observations are selected by fixed-clock observation/cutoff time, never
by exchange
book_event_time. - The input table is validated as monotonic by
feature_cutoff_timein source row order; the label generator does not reorder rows by exchange event time. - Lineage fields are emitted for each horizon:
target_time_*,actual_label_time_*, andlabel_delay_ms_*.
Label output schema:
- Base fields:
label_version,instrument,observation_time,feature_cutoff_time,is_available,mid,spread,book_observation_time,book_event_time,book_source_row_number. - Per-horizon fields:
target_time_*,actual_label_time_*,label_delay_ms_*,ret_fwd_*,direction_*,future_mid_move_bps_*,future_move_in_spreads_*. - Next-mid-change diagnostics:
next_mid_change_available,next_mid_change_direction,time_to_next_mid_change_ms.
Missing-label behavior:
- Current stale/unavailable rows receive missing forward labels.
- Future stale/unavailable rows are skipped; the first valid future row at or
after the target is accepted only if delay is within
max_label_delay_ms. - Missing labels are produced when no valid future state exists, accepted delay would exceed the configured limit, the future target crosses the session boundary, or the row is at end-of-data.
- Rows are preserved even when some or all horizons are missing.
future_move_in_spreads_*is missing when the current spread is missing or non-positive; it uses the current spread, not the future spread.next_mid_change_directionis only-1or+1whennext_mid_change_available=true; unavailable/no-observed-move outcomes are blank and cannot be interpreted as neutral, down, or up.
Real data used:
- Canonical instrument:
BTC-USDT. - Vendor: Tardis normalized Binance Spot.
- Vendor symbol:
BTCUSDT. - Date:
2019-12-01. - Input fixed-clock research table:
/tmp/microalpha-phase4-full-day/fixed_100ms_full.csv. - Label output:
/tmp/microalpha-phase6-full-day/labels_microstructure_labels_v1_full.csv. - Summary output:
/tmp/microalpha-phase6-full-day/summary.json. - Manual audit output:
/tmp/microalpha-phase6-full-day/manual_audits.json. - Full-day label rows:
863,949. - Label columns:
38. - Label output hash:
ab39e25fff543b6cf85c62b5266423ab8deba4e4e54edaca1534e0c87712edf9. - Full-day label processing time: approximately
140.505seconds.
Full-day real-data label results:
horizon total_rows valid_reg missing_reg missing_% delay_median delay_p95 delay_max UP_count UP_% FLAT_count FLAT_% DOWN_count DOWN_% return_min return_p1 return_p5 return_median return_p95 return_p99 return_max return_mean return_std
100ms 863949 863932 17 0.001968 0.0 0.0 100.0 19775 2.28895 824394 95.42348 19763 2.28756 -0.00399630 -0.0000983869 -0.00000888332 0.0 0.00000881197 0.0000989676 0.00256402 -0.0000000232 0.0000303320
500ms 863949 863926 23 0.002662 0.0 0.0 100.0 72505 8.39250 717535 83.05515 73886 8.55235 -0.00467907 -0.000210647 -0.0000907562 0.0 0.0000908897 0.000214520 0.00258091 -0.0000001159 0.0000669204
1s 863949 863921 28 0.003241 0.0 0.0 100.0 119800 13.8670 619704 71.73156 124417 14.4014 -0.00485147 -0.000305907 -0.000148145 0.0 0.000149655 0.000318994 0.00305745 -0.0000002319 0.000100079
5s 863949 863881 68 0.007871 0.0 0.0 100.0 276561 32.0138 295967 34.26016 291353 33.7261 -0.00542819 -0.000720928 -0.000414735 -0.000000687545 0.000430237 0.000751737 0.00355407 -0.0000011552 0.000260738
30s 863949 863631 318 0.036808 0.0 0.0 100.0 382429 44.2815 72069 8.34488 409133 47.3736 -0.00613216 -0.00165903 -0.00101031 -0.0000164931 0.00105359 0.00167102 0.00567891 -0.0000067571 0.000653610
The table above is descriptive only and has no predictive interpretation.
Manual real-data audits:
- Five cutoffs were audited manually against source fixed-clock rows.
- Exact-target case row
0, cutoff2019-12-01T00:00:05.045139+00:00,mid_T=7540.395:100msexact target return0.0,1sreturn-8.620275218937428e-06; manual and generated values match. - After-target case row
185605, cutoff2019-12-01T05:09:25.545139+00:00,mid_T=7326.545:30starget used actual observation2019-12-01T05:09:55.645139+00:00with100ms delay, return-5.937490511153481e-05;1sexact target return-1.7061393377150398e-05; manual and generated values match. - Deterministic row
10006, cutoff2019-12-01T00:16:45.645139+00:00,mid_T=7506.935:100msreturn0.0,5sreturn6.726886736064051e-05; manual and generated values match. - Deterministic row
200000, cutoff2019-12-01T05:33:25.045139+00:00,mid_T=7280.11:100msreturn0.0,5sreturn-0.0003441474193888563; manual and generated values match. - End-of-data missing case row
863947, cutoff2019-12-01T23:59:59.745139+00:00,mid_T=7390.855:100msexact target return0.0;30starget2019-12-02T00:00:29.745139+00:00is missing because labels do not cross the session boundary and no valid same-session future exists.
Tests added:
- Exact forward return and exact target-time lookup.
- First-observation-after-target lookup, proving no before-target selection.
- Delay tolerance rejection and end-of-data missing labels.
- Classification boundary behavior.
- Feature-label isolation plus future-mutation asymmetry.
- Monotonic label time, no event-time resort, and unavailable future skip.
- Invalid/stale current-row missing labels.
- Explicit next-mid-change unavailable semantics proving no valid observed move
cannot be interpreted as
-1,0, or+1. - Valid next-mid-change availability and direction.
- Deterministic label output and deterministic summary output.
cross_session_labels=falsesession-boundary behavior.
Exact test results:
python -m pytest: PASS,80 passed in 0.53s.ruff check src tests scripts: PASS,All checks passed!.PYTHONPYCACHEPREFIX=/tmp/microalpha-pycache python -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash8199bdda9ceea7571824b87d0fcd1927d457efb258075075a853f9dfb8885bd0.
GitHub Actions state before marking Phase 6:
- Phase 6 commit SHA:
a542022b1afb9c0e4766067d9eeb0da7cda9fc39(Complete Phase 6 label generation). - CI Python version: workflows use
actions/setup-python@v5withpython-version: "3.11". - GitHub Actions
testson the Phase 6 commit: PASS. Run:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31284658549. Jobpytestand stepRun testspassed. - GitHub Actions
research-smokeon the Phase 6 commit: PASS. Run:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31284658533. Jobsmokeand stepsInstall packageandRun tiny research smoke testpassed. - Local Phase 6 verification used Python
3.10.9; Python 3.11 compatibility is confirmed by the GitHub Actions runs above.
Acceptance-gate evidence:
- Required regression, classification, spread-normalized, bps-move, lineage, and next-mid-change diagnostic labels are implemented.
- Labels are produced separately from features.
- Feature code does not import
microalpha.labelsor reference label columns. - Feature generation is unchanged by future label mutations in regression tests, while labels change as expected.
- Future lookup uses
feature_cutoff_time, not exchangebook_event_time. - Invalid/stale current and future states do not create labels.
- Rows are preserved when horizons are missing.
- Multi-day readiness is explicit through
cross_session_labels=false. - Full-day real-data smoke and manual audits pass.
- No feature/label correlation, IC, bucket study, predictive evaluation, model, signal, threshold optimization, backtest, execution logic, or Phase 7 work was implemented.
Assumptions:
- The fixed-clock Phase 4 table is the canonical label input for Phase 6 because it already represents causal observation-time research states.
- UTC calendar date is the initial session boundary for
cross_session_labels. - A
100ms maximum label delay is appropriate for the current100ms fixed-clock grid; this is a configured engineering tolerance, not a tuned predictive threshold.
Known limitations:
- Local verification did not run under Python 3.11 because no Python 3.11 binary is installed locally; Python 3.11 verification came from GitHub Actions.
- Label output is CSV under
/tmp; Parquet remains deferred until a proper PyArrow runtime is used. - Label generation is correct but not optimized for memory or throughput.
Next steps:
- Stop before Phase 7 until the user accepts Phase 6 or requests continuation.
Status: SUPERSEDED by the corrected GET/metadata source verification recorded below. Phase 7 has not started.
Phase 6 CI completion:
- Phase 6 commit SHA:
a542022b1afb9c0e4766067d9eeb0da7cda9fc39(Complete Phase 6 label generation). - CI Python version: GitHub Actions workflows use
actions/setup-python@v5withpython-version: "3.11". testsworkflow on the Phase 6 commit: PASS. Run:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31284658549.research-smokeworkflow on the Phase 6 commit: PASS. Run:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31284658533.- Phase 6 status is therefore: PASS locally + PASS in Python 3.11 CI.
Semantic hardening before data expansion:
next_mid_change_directionno longer uses numeric0for unavailable outcomes.next_mid_change_availableis emitted explicitly.- When no valid future mid-price change is observed within the allowed search
horizon,
next_mid_change_available=false,next_mid_change_direction="", andtime_to_next_mid_change_ms="". - Valid next-mid-price moves remain direction
-1for down and1for up. - Regression tests prove unavailable next-move outcomes cannot be interpreted as neutral, down, or up observations.
- Binance Spot trades 24/7. Therefore
cross_session_labels=falserefers to the project's UTC research-day / dataset-partition boundary, not an exchange market close.
Frozen date registry:
- Machine-readable registry:
data/manifests/research_dates.yaml. - Canonical instrument:
BTC-USDT. - Vendor:
tardis_binance_spot. - Vendor symbol mapping:
BTC-USDT-> Binance SpotBTCUSDT. - L2 source type: Tardis Binance Spot
incremental_book_L2. - Trade source type: Tardis Binance Spot
trades. - Development dates: mechanically selected first-of-month dates from
2024-01-01through2025-12-01, inclusive, 24 dates. - Holdout dates: available first-of-month 2026 dates through current local date,
2026-01-01through2026-08-01, 8 dates, roleholdout. - Engineering/regression validation date remains
2019-12-01and is not mixed into the 2024-2025 research sample. - The registry records
alpha_analysis_performed_before_freeze=false.
Legacy HEAD-only source availability result (superseded):
- Development registry source check:
PYTHONPATH=src python scripts/check_research_sources.py --registry data/manifests/research_dates.yaml --role development --timeout-seconds 6 --max-workers 12checked 24 dates. - Development dates with both same-day L2 and trades available:
0. - Development dates excluded for technical/source availability reasons:
24. - Holdout registry source check:
PYTHONPATH=src python scripts/check_research_sources.py --registry data/manifests/research_dates.yaml --role holdout --timeout-seconds 6 --max-workers 8checked 8 dates. - Holdout dates with both same-day L2 and trades available:
0. - These legacy diagnostics are retained as history only. They must not be used as objective source unavailability evidence after the corrected GET probe.
- The pilot dates
2024-01-01,2024-02-01, and2024-03-01previously could not be processed because the required primary Tardis public URLs returned HTTP 404 and/or timed out. Example recorded failures:2024-01-01L2 HEADhttps://datasets.tardis.dev/v1/binance/incremental_book_L2/2024/01/01/BTCUSDT.csv.gz->404; trades HEADhttps://datasets.tardis.dev/v1/binance/trades/2024/01/01/BTCUSDT.csv.gz->TimeoutError.2024-02-01L2 HEADhttps://datasets.tardis.dev/v1/binance/incremental_book_L2/2024/02/01/BTCUSDT.csv.gz->TimeoutError; trades HEADhttps://datasets.tardis.dev/v1/binance/trades/2024/02/01/BTCUSDT.csv.gz->404.2024-03-01L2 HEADhttps://datasets.tardis.dev/v1/binance/incremental_book_L2/2024/03/01/BTCUSDT.csv.gz->TimeoutError; trades HEADhttps://datasets.tardis.dev/v1/binance/trades/2024/03/01/BTCUSDT.csv.gz->404.
- Exact per-date source URLs, HEAD results, exclusion statuses, and exclusion
reasons are recorded in
data/manifests/research_dates.yaml.
Implemented pre-gate infrastructure:
- Registry creation/loading/writing utilities.
- Explicit Tardis source URL construction and vendor-symbol mapping.
- Source availability checker that records objective failed source requests.
- Per-day Phase 1-6 orchestration entry point with default
cross_day_features=falseandcross_day_labels=false. - Multi-day registry driver that records failed dates and never silently omits them.
- Parquet writer/round-trip comparator for large derived artifacts.
- Deterministic artifact cache manifests using source checksum, config hash, and feature/label version.
- Large raw and derived artifacts remain ignored by Git; only metadata, fixtures, code, tests, and manifests are tracked.
Tests added for the pre-gate:
- Parquet round-trip preserving timestamp/null/value semantics.
- Day-boundary feature isolation.
- Day-boundary label isolation.
- Dataset-role isolation so development processing does not read holdout artifacts.
- Manifest/hash consistency.
- Cache invalidation for changed source checksum, config hash, feature version, label version, and stage.
- Partial failure handling that records the failed date and reason while preserving registry visibility.
Exact local test results after pre-gate infrastructure:
python -m pytest: PASS,86 passed, 1 warning in 1.35s.ruff check src tests scripts: PASS,All checks passed!.PYTHONPYCACHEPREFIX=/tmp/microalpha-pycache python -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash8199bdda9ceea7571824b87d0fcd1927d457efb258075075a853f9dfb8885bd0.
GitHub Actions after pre-gate infrastructure commit:
- Pre-gate infrastructure commit SHA:
efd930ea91425864c8aaa35f8cc9f6f457794dc6(Add pre-Phase-7 multi-day gate infrastructure). testsworkflow: PASS. Run:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31285342173.research-smokeworkflow: PASS. Run:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31285342179.
Legacy gate result (superseded):
- Pilot processing was not run because the mechanically selected pilot dates do not have both required primary source files available from the checked public URLs.
- Full 24-day development processing was not run for the same reason.
- No aggregate research snapshot manifest or snapshot hash was generated.
- No failed date was dropped; all failed source checks are retained in the registry.
- The 2026 holdout remains untouched by predictive research. Only source availability was checked and recorded.
- No IC, feature bucket study, feature-return relationship, model training, threshold tuning, ablation, backtest, trading logic, or Phase 7 work was run.
Legacy limitations / required decision before corrected GET retry (superseded):
- The requested primary unauthenticated Tardis public dataset URLs were not available for the frozen 2024-2025 development corpus during this run.
- Some source checks returned
TimeoutError; those dates should be retried with a longer timeout, a Tardis API-enabled source path if available, or a deterministic replacement/source policy defined before any predictive analysis. - The gate cannot pass until the selected corpus, or objectively documented deterministic replacements, can be processed through Phases 1-6 with same-day L2 and trades.
Status: SOURCE VERIFICATION PASS + THREE-DATE PILOT PHASE 1-6 PASS locally. The Pre-Phase-7 Multi-Day Expansion Gate remains BLOCKED pending full 24-day Phase 1-6 processing and aggregate frozen snapshot generation. Phase 7 has not started.
Local verification note:
- Local Python version for this correction update:
Python 3.10.9. - Current local results are not Python 3.11 compatibility evidence.
- No new GitHub Actions run was triggered or confirmed for the current uncommitted registry update.
Correction to prior conclusion:
- The previous conclusion that all 24 frozen Tardis development dates were objectively unavailable is superseded.
- The root cause was an availability checker that used authoritative HTTP
HEADprobes. Tardis downloadable datasets are aGETendpoint, and HEAD 404/timeout diagnostics are not sufficient evidence of actual dataset unavailability. - Legacy HEAD diagnostics are retained in
data/manifests/research_dates.yamlundersource_availability_history. - All 24 development dates were rechecked with the corrected low-concurrency GET + metadata path.
- Legacy HEAD diagnostics remain under
source_availability_historyand are not treated as objective source exclusions. - Corrected registry state:
- Development source-available /
included:24dates. - Development
requires_recheck:0dates. - Development
excluded:0dates. - Metadata check
ok=true:24development dates. - Non-pilot development dates still have Phase 1-6 processing statuses
pending;includedhere means source-available, not fully processed.
- Development source-available /
Corrected source availability checker:
- Uses HTTP
GET, notHEAD, for Tardis source probes. - Uses a normal browser-compatible project User-Agent.
- Reads only the configured initial byte sample, default
2bytes and64bytes for live diagnostics here, then closes the stream. - Does not assume Range support. Range probing was tested and returned
Cloudflare
403for the known-good 2019 source, so the default probe is plain GET with early close. - Records method, status, content headers, diagnostic headers, bytes read, first bytes, gzip signature result, elapsed time, exception details, redirects, and small textual error bodies.
- Uses explicit statuses:
AVAILABLE,CONFIRMED_UNAVAILABLE,TRANSIENT_ERROR,AUTH_REQUIRED, andCHECK_FAILED. - Retries transient failures with bounded exponential backoff.
- Timeouts and network errors produce
TRANSIENT_ERRORand cannot permanently exclude a frozen date. 401/403produceAUTH_REQUIRED, not "dataset missing".404is not treated as a permanent exclusion when Tardis metadata still indicates the symbol, date coverage, and data types should exist.
Known-good 2019 validation:
- L2 URL:
https://datasets.tardis.dev/v1/binance/incremental_book_L2/2019/12/01/BTCUSDT.csv.gz- Method:
GET - Status:
200 - Content-Type:
text/csv - Content-Length:
43947405 - Bytes read:
64 - Gzip signature:
true x-md5:"bd2c0f56f73bd9508b92535ebe3c249b"- First bytes hex:
1f8b0800000000000203acbddbb2243b8e9e793fcf121646103cdecee80d46732d
- Method:
- Trades URL:
https://datasets.tardis.dev/v1/binance/trades/2019/12/01/BTCUSDT.csv.gz- Method:
GET - Status:
200 - Content-Type:
text/csv - Content-Length:
6669039 - Bytes read:
64 - Gzip signature:
true x-md5:"f7e5676fde021190b82756ec62074a89"- First bytes hex:
1f8b0800000000000203acbdd9ce2dc9729877ef67696ce4109199716bfb0d2c5d
- Method:
Manual 2024-01-01 GET behavior:
- L2 URL:
https://datasets.tardis.dev/v1/binance/incremental_book_L2/2024/01/01/BTCUSDT.csv.gz- Method:
GET - Status:
200 - Content-Type:
text/csv - Content-Length:
79021220 - Bytes read:
64 - Gzip signature:
true x-md5:"db1c748517df066c3127ab61375edb54"- Redirect URL: none
- Error body: none
- First bytes hex:
1f8b0800000000000203acbdcb92253b729e3bd7b3a42d83038edb54d21b1c9d
- Method:
- Trades URL:
https://datasets.tardis.dev/v1/binance/trades/2024/01/01/BTCUSDT.csv.gz- Method:
GET - Status:
200 - Content-Type:
text/csv - Content-Length:
13066686 - Bytes read:
64 - Gzip signature:
true x-md5:"a7ece8f3d15e77f4c1ca13ea646f83a6"- Redirect URL: none
- Error body: none
- First bytes hex:
1f8b0800000000000203acbddd8e25bb8ee777ef67d928e893a46e6dbf8167ae8d
- Method:
Tardis metadata cross-check:
- Metadata endpoint checked:
https://api.tardis.dev/v1/exchanges/binance. - Exchange id:
binance. - Exchange
availableSince:2019-03-30T00:00:00.000Z. - Dataset
exportedUntilobserved during this correction run:2026-08-09T00:00:00.000Z. BTCUSDTmetadata:- Symbol exists in dataset metadata.
- Type:
spot. - Available since:
2019-03-30T00:00:00.000Z. - Available to:
2026-08-09T00:00:00.000Z. - Supported data types include
tradesandincremental_book_L2. - Other listed data types:
quotes,book_snapshot_5,book_snapshot_25,book_ticker.
Pilot availability recheck:
- Command:
PYTHONPATH=src python scripts/check_research_sources.py --registry data/manifests/research_dates.yaml --role development --date 2024-01-01 --date 2024-02-01 --date 2024-03-01 --timeout-seconds 30 --read-bytes 64 --max-attempts 3 --max-workers 1. - Result:
available:2024-01-01,2024-02-01,2024-03-01.not_available: none.
2024-02-01GET metadata:- L2 status
200, content length113798361, bytes read64, gzip signaturetrue,x-md5"0db6dac8f41fce94d1d5aaf427092acf". - Trades status
200, content length15827091, bytes read64, gzip signaturetrue,x-md5"bbee6a6e2fe342b938c80b2cb693952d".
- L2 status
2024-03-01GET metadata:- L2 status
200, content length144163385, bytes read64, gzip signaturetrue,x-md5"9c6a267be7f5b73a0339cb4f0109dae2". - Trades status
200, content length22046896, bytes read64, gzip signaturetrue,x-md5"b5f27c8d3f1c59214017e8403dec91f5".
- L2 status
Full development availability recheck:
- Command:
PYTHONPATH=src python scripts/check_research_sources.py --registry data/manifests/research_dates.yaml --role development --timeout-seconds 20 --read-bytes 64 --max-attempts 3 --max-workers 1 --metadata-timeout-seconds 20. - Result:
checked:24.available: all first-of-month development dates from2024-01-01through2025-12-01.not_available: none.- Each development date has both
incremental_book_L2andtradesGET status200,availability_status=AVAILABLE,bytes_read=64, and gzip signaturetrue. - Each development date has Tardis metadata check
ok=true, including symbol coverage and support for both required data types.
Pilot Phase 1-6 execution:
- Command:
PYTHONPATH=src python scripts/run_research_registry.py --registry data/manifests/research_dates.yaml --role development --date 2024-01-01 --date 2024-02-01 --date 2024-03-01 --work-root /tmp/microalpha-multiday --source-root /tmp/microalpha-multiday/source --stop-on-error. - Result:
processed:2024-01-01,2024-02-01,2024-03-01.failed: none.stop_on_error:true.
- Large source/raw/bronze/derived artifacts were written only under
/tmpand remain outside Git.
Pilot per-day results:
date l2_rows trade_rows research_rows unavailable_research_rows feature_rows label_rows invalid_crossed feature_runtime_s label_runtime_s total_runtime_s feature_hash label_hash
2024-01-01 12284879 1114633 863986 0 863986 863986 0 727.055 223.903 1850.275 c0e8e2387fe6cc1107962ffc9e5d977e76ace565b9d9c352b5a561ce23c4af6f d61e2ebcb617f8534bfd74bb524f610ebdce2f68d582dccbf5268732716a4ec2
2024-02-01 18878457 1392269 863980 0 863980 863980 0 1499.197 242.909 3398.841 bfb8be02390943e2c659d4c3ba388c7129d4d28a3950280c87c858a268a8a10f 6350b78ee606d35de4e0399f5be1a6bf79e25bb1442c79ab370bfc5b3d425782
2024-03-01 23766560 1947370 863986 50 863986 863986 0 1825.235 218.767 4676.323 24af17d47dee64200f23aa4d518b8fdefcb777f8a43afdaaef1ee83f25930b11 840f9ede0719b28030bff1973ee73d50ea4db7119cf56cd01d17482be5a27296
Pilot QA results:
2024-01-01L2 QA: PASS, rows12284879, errors0, warnings0, duplicates0.2024-01-01trades QA: PASS, rows1114633, errors0, warnings0, duplicates0.2024-02-01L2 QA: PASS, rows18878457, errors0, warnings0, duplicates0.2024-02-01trades QA: PASS, rows1392269, errors0, warnings0, duplicates0.2024-03-01L2 QA: PASS, rows23766560, errors0, warnings0, duplicates0.2024-03-01trades QA: PASS, rows1947370, errors0, warnings0, duplicates0.
Implementation notes:
validate_market_data_csvduplicate detection was hardened for full-day multi-million-row L2 files by replacing per-row sorted tuple retention with a deterministic SHA-256 row fingerprint over CSV field order. The previous implementation stalled during full-day 2024 QA after Phase 1; the corrected duplicate detector completed QA for all three pilot days.- The full pilot run remains slow, especially Phase 5 feature generation:
approximately
727.1,1499.2, and1825.2seconds for the three dates. No causal feature logic was rewritten for speed. - No IC, bucket returns, feature-return relationship, threshold tuning, strategy, model, backtest, or Phase 7 analysis was performed.
Tests required by the availability correction:
- GET
200->AVAILABLE. - GET
206->AVAILABLE. - GET
404handling with metadata cross-check. - GET
403->AUTH_REQUIRED, not missing. - Timeout ->
TRANSIENT_ERROR. - Network error ->
TRANSIENT_ERROR. - Retry succeeds after transient failure.
- Gzip signature validation.
- Response body is not fully downloaded.
- Known-good 2019 Tardis URL logic.
- Metadata confirms known-good 2019 symbol/date/data types.
- Failed HEAD response no longer determines availability.
- Successful GET recheck clears stale HEAD-derived
not_run_source_unavailablestatuses. - 404 plus supporting metadata requires recheck rather than permanent exclusion.
- 404 plus metadata date gap can produce a permanent exclusion.
Exact local test results for this correction:
python -m pytest: PASS,100 passed, 1 warning in 2.08s.ruff check src tests scripts: PASS,All checks passed!.python -m compileall src scripts: PASS.microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: initially not found on the default shellPATH.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash8199bdda9ceea7571824b87d0fcd1927d457efb258075075a853f9dfb8885bd0.- Equivalent source-tree entry-point command
PYTHONPATH=src python -m microalpha.cli --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash8199bdda9ceea7571824b87d0fcd1927d457efb258075075a853f9dfb8885bd0.
GitHub Actions for the prior committed availability correction:
- Correction commit SHA:
1c1261497d224ce5e2c4346411fadb40ad0f12ba(Fix Tardis availability probing). - CI Python version: GitHub Actions workflows use
actions/setup-python@v5withpython-version: "3.11". testsworkflow: PASS. Run:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31292717831.research-smokeworkflow: PASS. Run:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31292717888.- Current registry update has not been committed or pushed, so no GitHub Actions result exists for it yet.
Next required work before Phase 7:
- Process the remaining 21 source-available development dates through the same Phase 1-6 pipeline.
- Only after the full frozen development corpus is processed, or objective corrected-GET/metadata-backed exclusions are documented, generate the aggregate frozen research snapshot.
- Do not begin Phase 7 until the full Pre-Phase-7 Multi-Day Expansion Gate passes.
Status: PASS locally; final push and new Python 3.11 GitHub Actions confirmation are pending because the current environment rejected further escalated process operations after the local work completed.
Scope:
- No Phase 7 work was started.
- No IC, bucket studies, feature-return relationships, model training, strategy metrics, or backtests were calculated.
cross_day_features=falseandcross_day_labels=falseremain set indata/manifests/research_dates.yaml.- The 2026 holdout dates remain excluded from predictive research and are absent from the frozen development snapshot.
Pilot verification:
2024-01-01,2024-02-01, and2024-03-01were explicitly verified as Phase 1-6 complete.- For each pilot date: source availability PASS, ingestion PASS, QA PASS, book replay PASS, research dataset PASS, feature generation PASS, label generation PASS, feature hash exists, label hash exists, artifact paths exist, source checksums exist, feature version matches config, and label version matches config.
Remaining development-date processing:
- Processed remaining frozen development dates
2024-04-01through2025-12-01with the existing Phase 1-6 driver. - Large raw/bronze/derived CSV working files remained outside Git under
/tmp/microalpha-multiday. - For each successful non-pilot date, cleanup retained source gzip files, QA reports, day/artifact manifests, label summaries, and Parquet outputs; cleanup removed raw working copies, bronze CSVs, and derived CSV intermediates.
- Remaining-date runner result: processed
21, failed0, retried0. - Remaining-date total runtime:
57320.429seconds. - Slowest remaining dates were
2025-08-01at6163.534seconds and2025-12-01at5429.851seconds, dominated by large L2 validation/replay and Phase 5 feature generation. Treat Phase 5/runtime as future Phase 16 optimization work; no financial logic was optimized during this gate.
Development corpus completeness:
- Included dates: all 24 first-of-month development dates from
2024-01-01through2025-12-01. - Excluded dates: none.
- Failed dates: none.
- Pending dates: none.
- Per-date source checksums, row counts, QA status, replay counts, feature
hashes, label hashes, runtimes, versions, and artifact paths are recorded in
data/manifests/pre_phase7_verification.json. - Row-count range across included dates:
- research rows:
863950to863992. - feature rows:
863950to863992. - label rows:
863950to863992. - unavailable/stale research rows:
0to50. - crossed/invalid book states:
0on every included date.
- research rows:
Multi-day feature QA:
- Report:
data/manifests/pre_phase7_feature_qa.json. - Important features reviewed per date:
qi_1,di_5,di_10,spread_bps,microprice_deviation_bps,ofi_1s,trade_imbalance_1s,realized_vol_5s, andmom_1s. - Reported per-date missing rate, p1, median, p99, and constant-feature flag.
- Review note: no constant important features and no impossible crossed-book
replay counts were observed.
trade_imbalance_1smissingness exceeded a 5% review threshold on 12 dates, ranging from about5.18%to11.02%. This was recorded as data/feature QA only and was not used to drop dates or tune any label/feature logic.
Multi-day label QA:
- Report:
data/manifests/pre_phase7_label_qa.json. - For every included date and label horizon, the report records valid count, missing count, missing percentage, UP/FLAT/DOWN percentages, median lookup delay, p95 lookup delay, and maximum accepted lookup delay.
- No label missing percentage exceeded
1%in the generated review. - The configured
0.5bps threshold was not tuned from these results. - Class proportions were not interpreted as signal performance.
Frozen aggregate research snapshot:
- Manifest:
data/manifests/pre_phase7_research_snapshot.json. - Snapshot version:
pre_phase7_research_snapshot_v1. - Dataset role:
development. - Canonical instrument:
BTC-USDT. - Vendor:
tardis_binance_spot. - Included dates: all 24 development dates, ordered.
- Excluded dates: none.
- Failed dates: none.
- Snapshot hash:
0bcdb7eddebbe83458998eff78844471afb78fc66d249a53aeb25667bebd803a. - Snapshot hash determinism checks:
- same inputs produce the same hash: PASS.
- creation timestamp is excluded from the hash: PASS.
- controlled dependency change changes the hash: PASS.
- absolute local paths such as
/tmp/...do not affect the hash: PASS. - holdout dates are absent from the included-date list: PASS.
- This snapshot is the frozen development input for Phase 7. Any later data/config/code change requires a new snapshot version/hash before Phase 7 uses it.
Local test results after full multi-day processing:
python -m pytest: PASS,104 passed, 1 warning in 2.20s.ruff check src tests scripts: PASS,All checks passed!.python -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash8199bdda9ceea7571824b87d0fcd1927d457efb258075075a853f9dfb8885bd0.
Python 3.11 CI status:
- Source-verification support commit
4cbb6f0958fc57134913a8490c1385beb4a688e1was pushed toorigin/main. - GitHub Actions
testsrun31293453728: PASS. URL:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31293453728. - GitHub Actions
research-smokerun31293453718: PASS. URL:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31293453718. - Both workflows use
actions/setup-python@v5with Python3.11. - The current registry/report/status update has not yet been committed or pushed, so there is not yet a GitHub Actions result for this exact final artifact state.
Assumptions and limitations:
- Local execution used Python 3.10.9 and emitted the existing pandas warning that
installed
bottleneckis1.3.5while pandas asks for>=1.3.6. - Python 3.11 compatibility for source code is evidenced by GitHub Actions on the pushed source-verification commit; final artifact-state CI still needs a successful push and workflow run.
/tmp/microalpha-multidaycontains the retained local source gzip files and Parquet outputs used to generate the manifests. These large files are not committed to Git.- The aggregate snapshot intentionally hashes logical checksums, configs, versions, and ordered dates, not absolute local artifact paths.
Next steps:
- Commit and push the current registry/report/status update when Git operations are available.
- Confirm GitHub Actions
testsandresearch-smokepass on the resulting commit under Python 3.11. - Do not begin Phase 7 until that final current-commit CI confirmation is green.
Status: PASS locally.
Scope:
- Phase 7 used only the frozen development dates from
2024-01-01through2025-12-01. - The 2026 holdout was not read or referenced by the Phase 7 runner.
- No model training, optimization, feature-definition tuning, label-threshold tuning, trading rule, backtest, execution simulation, or Phase 8 work was performed.
Frozen inputs and plan:
- Immutable project specification remains unchanged.
- Frozen snapshot:
data/manifests/pre_phase7_research_snapshot.json. - Required and verified snapshot hash:
0bcdb7eddebbe83458998eff78844471afb78fc66d249a53aeb25667bebd803a. - Snapshot verification confirmed 24 ordered development dates, no excluded
dates, no failed dates, dataset role
development, feature versionmicrostructure_v1, label versionmicrostructure_labels_v1, and no 2026 holdout dates. - Frozen Phase 7 research plan:
data/manifests/phase7_research_plan.yaml. - Phase 7 research plan hash:
417f1b38895bf1cc3735cb72ce08249a2cc32ba7cfc936eec5a1875dea0e14da. - Primary matrix: 30 prespecified tests, covering
qi_1,di_5,di_10,microprice_deviation_bps, and horizon-matched OFI/trade-imbalance features againstret_fwd_100ms,ret_fwd_500ms,ret_fwd_1s,ret_fwd_5s, andret_fwd_30s.
Implementation and outputs:
- Added Phase 7 utilities in
src/microalpha/research/phase7.py. - Added Phase 7 runner
scripts/run_phase7_research.py. - Added unit tests in
tests/unit/test_phase7_research.py. - Added tracked plan allow-list entry in
.gitignore. - Generated compact Phase 7 outputs under
reports/phase7/:primary_ic.csv: 30 rows.daily_ic.csv: 720 rows.nonoverlap_ic.csv: 750 rows.bucket_results.csv: 9000 rows.next_move_results.csv: 1250 rows.direction_results.csv: 7500 rows.phase7_summary.json.README.md.- 10 prespecified figures under
reports/phase7/figures/.
- Deterministic Phase 7 result hash:
b86d51c4317f87d0cabf579f152d07c139e7fc23e47356d655bd09057342eb04. - A fresh recomputation of the result hash matched the stored summary hash.
Statistical summary:
- All 30 primary tests had positive mean daily Spearman IC.
- Minimum BH/FDR q-value across the 30-test primary family:
1.4326671839881356e-21. - Maximum absolute mean daily Spearman IC:
0.4259401679798902. - Strongest mean daily IC:
qi_1vsret_fwd_1s, mean Spearman IC0.425940168, median0.4364408196, 24 positive days, 0 negative days, t-stat39.1582477124, FDR q-value1.432667184e-21. - Other top primary tests were
microprice_deviation_bpsvsret_fwd_1swith mean Spearman IC0.4258462052, anddi_5vsret_fwd_1swith mean Spearman IC0.4238563992. - 2024/2025 split stability: all 30 primary tests had same-sign annual mean ICs.
- Non-overlap robustness: mean absolute full-grid vs non-overlap IC difference
across primary summaries was
0.0009773737819616633. - Negative control: deterministic within-day permutation of
qi_1vsret_fwd_1shad mean Spearman IC0.0001328308230472829, t-stat0.7036037327952906, raw p-value0.48874197127979135, 15 positive days, and 9 negative days.
Missing-data and inference policy:
- Missing alpha features and labels were handled pairwise-valid only.
- Missing alpha features were not filled with zero.
- Daily Spearman IC is the primary inference metric with day as the inference unit.
- Pearson IC is reported as a secondary diagnostic.
- Pooled cross-day IC is not used for inference.
- Bucket studies rank valid feature observations within each day using feature values only, then evaluate labels within those fixed deciles using equal day weighting.
Tests added:
- Spearman/Pearson utility determinism.
- Pairwise missing handling and no-zero-fill guard.
- t-statistic, sign consistency, and sign-test behavior.
- Benjamini-Hochberg/FDR behavior.
- Deterministic decile buckets with ties, top-minus-bottom effect, and bucket monotonicity.
- Next-mid-move unavailable-outcome exclusion.
- Non-overlap deterministic offset-zero mask.
- Deterministic within-day permutation.
- Snapshot verification, holdout rejection, chronological development-date ordering, and 2024/2025 split rejection of 2026 dates.
- Deterministic result hash excluding embedded result-hash self-reference.
- Exact 30-test primary matrix.
Exact local test results:
python -m pytest: PASS,119 passed, 1 warning in 2.00s.ruff check src tests scripts: PASS,All checks passed!.python -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash8199bdda9ceea7571824b87d0fcd1927d457efb258075075a853f9dfb8885bd0.MPLCONFIGDIR=/tmp/microalpha-mpl PYTHONPATH=src python scripts/run_phase7_research.py --clean: PASS, result hashb86d51c4317f87d0cabf579f152d07c139e7fc23e47356d655bd09057342eb04.
Assumptions and limitations:
- Local execution used Python 3.10 and emitted the existing pandas warning that
installed
bottleneckis1.3.5while pandas asks for>=1.3.6. - PyArrow emitted sandbox CPU-info warnings while reading parquet; these did not affect the Phase 7 gate.
- Phase 7 evidence is statistical predictability on the frozen development sample only and is not an executable trading result.
- No suspicious-audit exception was opened from Phase 7 outputs because the negative control was near zero, non-overlap robustness was close to full-grid IC, and 2024/2025 signs were stable. The high same-sign primary family should still be treated as research evidence only, not as a trading claim.
- Python 3.11 CI was later confirmed on the exact pushed Phase 7 audit artifact commit recorded below.
Next steps:
- See the Phase 7 audit section for the exact pushed commit and Python 3.11 CI runs that cleared the pre-Phase-8 gate.
Status: PASS locally.
Scope:
- This was a narrowly scoped audit of the unusually strong Phase 7 baseline results.
- Original Phase 7 baseline outputs were preserved and not overwritten:
primary_ic.csv,bucket_results.csv,nonoverlap_ic.csv,phase7_summary.json, existing figures, the Phase 7 research plan, and the Phase 7 result hash remain unchanged. - Fresh recomputation confirmed the original Phase 7 result hash remains:
b86d51c4317f87d0cabf579f152d07c139e7fc23e47356d655bd09057342eb04. - No 2026 holdout data was accessed.
- No Phase 8 work, model training, optimization, trading rule, backtest, or execution simulation was performed.
Audit implementation and outputs:
- Added
scripts/run_phase7_audit.py. - Created audit outputs under
reports/phase7/audit/only:audit_summary.json.changed_state_ic.csv.unique_state_ic.csv.manual_lineage_audit.csv.independent_label_check.csv.independent_bucket_check.csv.feature_redundancy.csv.return_discreteness.csv.spread_diagnostics.csv.README.md.
- Audit output size: approximately
352K. - Audit result hash:
b6b8206e03c81b47787d5ae4d4e5b960b4748bc75eed0ee5be4862ebf190d6e1. - Fresh recomputation of the audit hash matched the stored
audit_summary.jsonhash.
Non-overlap reporting clarification:
- The prior Phase 7 summary value was confirmed to be the aggregate-row
diagnostic over
date == ALLrows. aggregate_pair_mean_abs_difference:0.0009773737819900022.daily_pair_mean_abs_differenceacross 24 x 30 daily comparisons:0.003750858043641231.- Median daily absolute difference:
0.0015011638109999892. - P95 daily absolute difference:
0.01842234572084997. - Maximum daily absolute difference:
0.03277160954699998.
Changed-state and unique-state robustness:
- Changed-state definition used deterministic consecutive BBO-state changes:
best_bid,bid_sz_1,best_ask, andask_sz_1. - Top-10 book levels are available in the research table, but the audit used BBO identity to test the minimum explicitly required observable state.
- Changed-state retained median fraction of fixed-clock rows:
0.7462537598881. - Changed-state state-signal tests with positive mean IC:
20 / 20. - Minimum changed-state mean IC across state-signal/horizon summaries:
0.2164018712435578. - Unique consecutive BBO-state run collapse retained median fraction:
0.7462549173146528. - Unique-state state-signal tests with positive mean IC:
20 / 20. - Minimum unique-state mean IC across state-signal/horizon summaries:
0.21640109056283144. - A material magnitude decline would not have failed the audit; the observed changed/unique-state diagnostics remained directionally consistent.
Manual timestamp / lineage and independent labels:
- Manual lineage audit rows:
20, selected deterministically across 2024 early, 2024 late, 2025 early, and 2025 late, spanning very negative, moderately negative, near-zero, moderately positive, and very positiveqi_1. - All selected rows satisfied:
- feature source observation time <= feature cutoff
T; - target time >
T; - actual label time >= target time;
- actual label delay <= configured 100ms tolerance;
- future mid came from a later/future state, not the feature state.
- feature source observation time <= feature cutoff
- Independent label recomputation rows:
80, covering100ms,1s,5s, and30shorizons for the selected observations. - Independent label recomputation failures:
0. - Maximum absolute label difference:
9.573505183047004e-17with tolerance1e-12. - The independent label check directly located future mids from the research table and did not call the production label-generation helper.
Independent bucket and aggregation audit:
- Independent
qi_1/1sdecile reconstruction was run for:2024-01-01,2024-06-01,2024-12-01,2025-06-01, and2025-12-01. - Bucket failures:
0. - Maximum independent-vs-production mean return absolute difference:
3.581255300991182e-17. - Maximum independent-vs-production mean future-move bps absolute difference:
4.642120021713936e-13. - Bucket numbering was verified as low feature to high feature.
- Labels were not used for bucket assignment.
- No future-return sorting was used in the independent reconstruction.
- Equal-day aggregation was checked over 300 production aggregate bucket rows.
- Maximum equal-day mean-return aggregation difference:
5.083417410969848e-16. - Maximum equal-day mean-move aggregation difference:
4.958256027975949e-12.
Feature redundancy and incremental diagnostics:
- The mathematical relationship was documented:
microprice - mid = spread * qi_1 / 2, thereforemicroprice_deviation_bps = spread_bps * qi_1 / 2. - Mean daily rank correlation between
qi_1andmicroprice_deviation_bpswas0.999265480102078. qi_1andmicroprice_deviation_bpsshould be treated as highly redundant transformations under the observed spread regime, not independent alpha discoveries.feature_redundancy.csvalso records daily feature-feature correlations and descriptive rank-residual IC diagnostics fordi_5,di_10, andofi_1sresidualized againstqi_1.
Return discreteness, spread, and temporal controls:
return_discreteness.csvreports per-date/horizon zero-return fraction, unique forward-return count, unchanged-mid fraction, and by-qi_1-decile zero/up/down fractions.spread_diagnostics.csvreports per-date spread summaries andqi_1IC separately for minimum-spread and wider-spread states.- The deterministic temporal negative control was chosen before running:
qi_1lagged by 5 minutes on the 100ms fixed grid. - Temporal control mean Spearman IC:
0.004108648248610643, much weaker than the primary alignedqi_1/1smean IC of about0.42594. - Temporal control t-stat:
4.207552744782699, raw p-value0.00033565848441401787, with 21 positive and 3 negative days. This indicates residual temporal autocorrelation, but a large attenuation versus the aligned signal.
Exact local verification:
PYTHONPATH=src python scripts/run_phase7_audit.py --clean: PASS, audit hashb6b8206e03c81b47787d5ae4d4e5b960b4748bc75eed0ee5be4862ebf190d6e1.- Phase 7 baseline hash recomputation:
PASS, unchanged at
b86d51c4317f87d0cabf579f152d07c139e7fc23e47356d655bd09057342eb04. - Audit hash recomputation:
PASS, matched stored hash
b6b8206e03c81b47787d5ae4d4e5b960b4748bc75eed0ee5be4862ebf190d6e1. python -m pytest: PASS,119 passed, 1 warning in 2.58s.ruff check src tests scripts: PASS,All checks passed!.python -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash8199bdda9ceea7571824b87d0fcd1927d457efb258075075a853f9dfb8885bd0.
Assumptions and limitations:
- Local execution used Python 3.10.9 and emitted the existing pandas warning
that installed
bottleneckis1.3.5while pandas asks for>=1.3.6. - PyArrow emitted sandbox CPU-info warnings while reading parquet; these did not affect the audit gate.
- The changed-state and unique-state diagnostics used consecutive BBO identity. They intentionally did not use future labels.
- The audit did not reinterpret Phase 7 as an economic result. It only tested timestamp lineage, label construction, repeated-state weighting, bucket mechanics, feature redundancy, discreteness, spread mechanics, and temporal alignment sensitivity.
- Python 3.11 CI was confirmed on the exact pushed audit artifact commit.
Next steps:
- Exact pushed audit artifact commit:
d785b28907776865ebd1ca799cfd6ad1611e3717. - Commit message:
docs: Add Phase 7 robustness audit results to STATUS.md. origin/mainand localHEADboth resolved to that SHA before Phase 8 work started.- GitHub Actions workflows use
actions/setup-python@v5withpython-version: "3.11". - GitHub Actions
testsworkflow: PASS. Run:31346275365. URL:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31346275365. Head SHA:d785b28907776865ebd1ca799cfd6ad1611e3717. - GitHub Actions
research-smokeworkflow: PASS. Run:31346275370. URL:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31346275370. Head SHA:d785b28907776865ebd1ca799cfd6ad1611e3717. - Phase 8 may now begin using only 2024 TRAIN and 2025 VALIDATION data.
- Do not access 2026 holdout data or begin Phase 9.
Status: PASS locally and accepted
Pre-Phase-8 CI gate:
- Exact pushed Phase 7 audit artifact commit:
d785b28907776865ebd1ca799cfd6ad1611e3717. - GitHub Actions workflows use
actions/setup-python@v5withpython-version: "3.11". - GitHub Actions
testsworkflow: PASS. Run:31346275365. URL:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31346275365. Head SHA:d785b28907776865ebd1ca799cfd6ad1611e3717. - GitHub Actions
research-smokeworkflow: PASS. Run:31346275370. URL:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31346275370. Head SHA:d785b28907776865ebd1ca799cfd6ad1611e3717.
Frozen plan:
- Plan file:
data/manifests/phase8_modeling_plan.yaml. - Phase 8 modeling plan hash:
823ee7a98be9a5199842536a65edd2394a39f1c5c6ae13947c29bd7c1c2494fe. - Frozen Phase 7 snapshot hash:
0bcdb7eddebbe83458998eff78844471afb78fc66d249a53aeb25667bebd803a. - Phase 7 result hash:
b86d51c4317f87d0cabf579f152d07c139e7fc23e47356d655bd09057342eb04. - Phase 7 audit hash:
b6b8206e03c81b47787d5ae4d4e5b960b4748bc75eed0ee5be4862ebf190d6e1. - The plan was created before Phase 8 validation model results were generated.
Data split and target:
- TRAIN dates: all 2024 first-of-month development dates,
2024-01-01through2024-12-01. - VALIDATION dates: all 2025 first-of-month development dates,
2025-01-01through2025-12-01. - 2025 is development validation, not an untouched holdout.
- 2026 holdout access:
false. - Primary target:
ret_fwd_1s. - Secondary classification target:
next_mid_change_direction, with unavailable observations excluded. - Primary anchor rule: deterministic non-overlapping 1s anchors from the 100ms
grid,
row_index % 10 == 0, offset0. - Training rows:
1,036,749. - Validation rows:
1,036,771. - Classification validation rows:
911,358.
Feature sets:
qi_only:qi_1.qi_ofi:qi_1,ofi_1s.qi_trade_imbalance:qi_1,trade_imbalance_1s.core_independent_microstructure:qi_1,ofi_1s,trade_imbalance_1s.extended_book_flow:qi_1,di_5,di_10,ofi_1s,trade_imbalance_1s,spread_bps,realized_vol_5s,mom_1s,book_update_count_1s,trade_count_1s.- Reference baselines:
ofi_1sonly andtrade_imbalance_1sonly. microprice_deviation_bpswas excluded from primary models because the Phase 7 audit showed it is nearly rank-equivalent toqi_1under the observed spread regime.
Model configs:
- Null regression: training-set mean predictor.
- QI baseline: single-feature standardized ridge with
alpha=0.0,solver=svd. - Ridge regression:
alpha=1.0, standardized features, training-only median imputation, explicit missing indicators for features missing in TRAIN. - LightGBM regression:
n_estimators=120,learning_rate=0.05,num_leaves=15,max_depth=4,min_child_samples=200,subsample=0.8,colsample_bytree=0.9,reg_alpha=0.1,reg_lambda=1.0,random_state=8008,deterministic=true,force_col_wise=true,n_jobs=1. - Classification: QI-only logistic regression, core-feature logistic regression, and LightGBM classifier with the same tree parameters.
Implementation and outputs:
- Added reusable Phase 8 helpers in
src/microalpha/research/phase8.py. - Added runner
scripts/run_phase8_modeling.py. - Added leakage/isolation/modeling tests in
tests/unit/test_phase8_modeling.py. - Created compact tracked outputs under
reports/phase8/:regression_results.csv,daily_regression_metrics.csv,ablation_results.csv,prediction_correlations.csv,feature_importance.csv,classification_results.csv,classification_calibration.csv,negative_control.csv,phase8_summary.json,README.md, and required figures. - Phase 8 result hash:
d8471add338d79106fb1839008c5168535bb644505b5282a5e6236147b31255d.
Validation metrics:
- QI baseline mean daily Spearman IC:
0.4222578166269703. - Best Ridge model:
ridge / qi_only. Spearman IC0.424256903031, mean daily IC0.422257816627, Pearson0.274089676645, MAE2.58063266482e-05, RMSE5.04536924006e-05, R20.0712236661297, non-zero sign accuracy0.867339596343, positive validation days12 / 12. - Best incremental model:
lightgbm_regression / extended_book_flow. Spearman IC0.437010448125, mean daily IC0.430171064696, Pearson0.337969588481, MAE2.17870943295e-05, RMSE4.9273301211e-05, R20.114173740143, non-zero sign accuracy0.870892101463, positive validation days12 / 12.
Incremental lift over QI:
lightgbm_regression / extended_book_flow: mean delta daily IC0.00791324806945, median0.00832294095587, min0.00177382728405, max0.0149799477797, positive-lift days12, negative-lift days0.lightgbm_regression / core_independent_microstructure: mean delta0.00502243518434, median0.00498025879287, min-0.00122501618755, max0.0115030072751, positive-lift days11, negative-lift days1.lightgbm_regression / qi_ofi: mean delta0.00484766312093, median0.00421298509425, min-0.00163878344482, max0.0104240363204, positive-lift days11, negative-lift days1.- Ridge multivariate variants did not improve mean daily IC over QI-only.
Prediction redundancy:
- QI-only ridge prediction rank correlation with
qi_1:1.0. - LightGBM QI-only prediction rank correlation with
qi_1:0.999794341414. - LightGBM
core_independent_microstructureprediction rank correlation:qi_1=0.960831733082,ofi_1s=0.629918550616,trade_imbalance_1s=0.316948322822. - LightGBM
extended_book_flowprediction rank correlation:qi_1=0.950510869209,ofi_1s=0.625371024709,trade_imbalance_1s=0.312459706788. - Interpretation: the best model remains heavily related to QI, with modest incremental information from flow/deeper-book features.
Classification metrics:
logistic_qi / qi_only: ROC AUC0.763726139363, log loss0.584211503425, Brier0.199419383388.logistic_core / core_independent_microstructure: ROC AUC0.762554132261, delta AUC-0.00117200710254, log loss0.583598394067, delta log loss-0.000613109357836, Brier0.199174840627, delta Brier-0.000244542761368.lightgbm_classifier / core_independent_microstructure: ROC AUC0.764691788037, delta AUC0.000965648673324, log loss0.577684004165, delta log loss-0.00652749926056, Brier0.197286487243, delta Brier-0.00213289614558.- No decision-threshold tuning was performed.
Negative control:
- Control: deterministic permuted train target with ridge on
core_independent_microstructure, bounded to200,000train rows and200,000validation rows. - Validation against permuted target: Spearman IC
0.0022175796, Pearson0.0018329581, R2-1.74617e-05, non-zero sign accuracy0.5024767963. - The diagnostic rank correlation against the real target was also recorded
separately as
0.2265100018; it is not the negative-control target metric.
Exact local test results:
MPLCONFIGDIR=/tmp/microalpha-mpl PYTHONPATH=src /tmp/microalpha-phase8-venv/bin/python scripts/run_phase8_modeling.py --clean: PASS, result hashd8471add338d79106fb1839008c5168535bb644505b5282a5e6236147b31255d.python -m pytest: PASS,126 passed, 37 warnings in 3.89s.ruff check src tests scripts: PASS,All checks passed!.python -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash8199bdda9ceea7571824b87d0fcd1927d457efb258075075a853f9dfb8885bd0.- Forbidden economic-word scan over
STATUS.md,reports/phase8,scripts/run_phase8_modeling.py, anddata/manifests/phase8_modeling_plan.yaml: PASS, no matches.
Assumptions and limitations:
- Local default
pythonis Python 3.10.9, not Python 3.11. - Phase 8 LightGBM execution used a temporary environment at
/tmp/microalpha-phase8-venvwith working LightGBM dependencies. - PyArrow emitted sandbox CPU-info warnings while reading parquet; they did not affect the Phase 8 gate.
- The accepted Phase 8 artifact state was later confirmed by GitHub Actions
under Python 3.11 on commit
0cff6ce05980ac226ec47f0d602045a6dadf9993. - 2025 is development validation because Phase 7 already examined 2025.
- No 2026 holdout date was read.
- No Phase 9 walk-forward evaluation, trading signal, execution threshold, fill simulation, cost analysis, PnL, or backtest was implemented.
Next steps:
- Pre-Phase-9 GitHub Actions gate was cleared on exact Phase 8 commit
0cff6ce05980ac226ec47f0d602045a6dadf9993. - GitHub Actions
tests: PASS, run31351466257. - GitHub Actions
research-smoke: PASS, run31351466255. - Do not begin Phase 10 until the user explicitly accepts Phase 9 and requests continuation.
Status: PASS locally
Pre-Phase-9 CI gate:
- Exact accepted Phase 8 artifact commit:
0cff6ce05980ac226ec47f0d602045a6dadf9993. - Remote
mainresolved to the same SHA before Phase 9 work began. - GitHub Actions workflows use
actions/setup-python@v5withpython-version: "3.11". - GitHub Actions
testsworkflow: PASS. Run:31351466257. URL:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31351466257. Head SHA:0cff6ce05980ac226ec47f0d602045a6dadf9993. - GitHub Actions
research-smokeworkflow: PASS. Run:31351466255. URL:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31351466255. Head SHA:0cff6ce05980ac226ec47f0d602045a6dadf9993.
Frozen inputs and plan:
- Phase 7 snapshot hash:
0bcdb7eddebbe83458998eff78844471afb78fc66d249a53aeb25667bebd803a. - Phase 7 result hash:
b86d51c4317f87d0cabf579f152d07c139e7fc23e47356d655bd09057342eb04. - Phase 7 audit hash:
b6b8206e03c81b47787d5ae4d4e5b960b4748bc75eed0ee5be4862ebf190d6e1. - Phase 8 modeling plan hash:
823ee7a98be9a5199842536a65edd2394a39f1c5c6ae13947c29bd7c1c2494fe. - Phase 8 results hash:
d8471add338d79106fb1839008c5168535bb644505b5282a5e6236147b31255d. - Phase 9 plan file:
data/manifests/phase9_walkforward_plan.yaml. - Phase 9 plan hash:
4b1f0f0dd9f638ff4b5f40af04e17e8fc7753c4a500cac650d2537d3d40fb2c4. - The Phase 9 plan was created before Phase 9 result generation.
- Phase 9 result hash:
0e6567e9f67954df4ec5c74233f4e1d34759e4f6b7bf1f562be2e63997a44aee.
Fold definitions:
- Eligible dates: the 24 first-of-month development dates from
2024-01-01through2025-12-01. - 2026 holdout access:
false. - Primary expanding window: 18 folds.
Fold 1 trains
2024-01-01through2024-06-01, validates2024-07-01. Final fold trains2024-01-01through2025-11-01, validates2025-12-01. - Secondary rolling-6 diagnostic: 18 folds using the most recent 6 development dates strictly before each validation date.
- Every fold enforces
train_date < validation_date. - Deterministic anchor rule:
row_index % 10 == 0, offset0.
Frozen models and features:
- QI direct baseline: fold-local linear baseline on
qi_1with training-only median imputation and standardization. lightgbm_qi_ofi: LightGBM onqi_1,ofi_1s.lightgbm_extended: LightGBM onqi_1,di_5,di_10,ofi_1s,trade_imbalance_1s,spread_bps,realized_vol_5s,mom_1s,book_update_count_1s,trade_count_1s.- LightGBM parameters were frozen from Phase 8:
n_estimators=120,learning_rate=0.05,num_leaves=15,max_depth=4,min_child_samples=200,subsample=0.8,colsample_bytree=0.9,reg_alpha=0.1,reg_lambda=1.0,random_state=8008,deterministic=true,force_col_wise=true,n_jobs=1. - No Phase 5 features, Phase 6 labels, model family, or hyperparameter was changed in response to Phase 9 results.
Primary expanding-window results:
- QI IC across 18 validation dates:
mean
0.43185335860288265, median0.43736534099871366, std0.04983684910402971, min0.33959757606157515, max0.5083387678325725, positive dates18, negative dates0. - QI+OFI incremental IC vs QI:
mean
0.006685448414447604, median0.006467151150689715, std0.004062299982712839, min-0.0005637752138100693, max0.014386104824419987, positive folds17, negative folds1, zero folds0, fold-level t-stat6.982240498110832, exact sign-test p-value0.00014495849609375. - Extended incremental IC vs QI:
mean
0.010743286769766911, median0.010545310449919493, std0.004812944658168465, min0.004449872594214754, max0.021135799769847585, positive folds18, negative folds0, zero folds0, fold-level t-stat9.470274187642238, exact sign-test p-value7.62939453125e-06. - Extended incremental IC beyond QI+OFI:
mean
0.004057838355319306, median0.0036061402317791036, std0.0024405027534758297, min0.0005799588117063048, max0.00984647371674685, positive folds18, negative folds0, zero folds0, fold-level t-stat7.054263750987976, exact sign-test p-value7.62939453125e-06.
Calendar-period stability:
- 2024 H2 mean IC: QI
0.4510444425547074, QI+OFI0.4603107909440598, Extended0.46349081328996616. Mean deltas: QI+OFI0.009266348389352272, Extended0.012446370735258708; positive-lift fraction1.0for both. - 2025 H1 mean IC: QI
0.4234229895781818, QI+OFI0.4283998168539891, Extended0.43163868200094013. Mean deltas: QI+OFI0.004976827275807329, Extended0.0082156924227584; positive-lift fraction1.0for both. - 2025 H2 mean IC: QI
0.4210926436757589, QI+OFI0.42690581325394206, Extended0.43266044082704247. Mean deltas: QI+OFI0.005813169578183212, Extended0.011567797151283624; positive-lift fraction0.8333333333333334for QI+OFI and1.0for Extended.
Expanding vs rolling-6 diagnostic:
- QI+OFI mean delta IC: expanding
0.006685448414447604, rolling-60.006713687269404491. - Extended mean delta IC: expanding
0.010743286769766911, rolling-60.00815920765565316. - Rolling-6 QI+OFI: positive folds
17, negative folds1, t-stat6.878562775893029, sign-test p-value0.00014495849609375. - Rolling-6 Extended: positive folds
18, negative folds0, t-stat7.259212276168416, sign-test p-value7.62939453125e-06. - Interpretation: QI+OFI lift is similar under rolling retraining, while Extended lift remains positive but smaller under rolling-6 than expanding.
Prediction similarity and model drift:
- Expanding Extended prediction vs QI rank correlation:
mean
0.9537434074803967, median0.9545478244067476, min0.9336693815928105, max0.973759202036313. - Expanding QI+OFI prediction vs QI rank correlation:
mean
0.9651497484494895, median0.9649553029245865, min0.954894841087616, max0.9778720768047318. - Expanding Extended prediction vs QI+OFI prediction rank correlation:
mean
0.9855006994427798, median0.9866517006107787, min0.973340910709284, max0.9926761492878023. - Average expanding Extended LightGBM gain importance was led by
di_5,qi_1,trade_count_1s, andofi_1s. - Correlated-feature importances are recorded for drift diagnostics only and are not interpreted causally.
Negative control:
- Control: deterministic permuted train target using the same expanding
walk-forward machinery on folds
1,9, and18, modellightgbm_qi_ofi. - All three controls produced no rank signal with effectively constant predictions.
- Effective Spearman IC values:
0.0,0.0,0.0. - Mean effective Spearman IC:
0.0.
Implementation and outputs:
- Added
src/microalpha/research/phase9.py. - Added
scripts/run_phase9_walkforward.py. - Added
tests/unit/test_phase9_walkforward.py. - Created compact tracked outputs under
reports/phase9/:walkforward_metrics.csv,incremental_lift.csv,window_comparison.csv,prediction_correlations.csv,feature_importance_by_fold.csv,negative_control.csv,phase9_summary.json,README.md, and required figures. - No row-level prediction files were written.
Exact local test results:
MPLCONFIGDIR=/tmp/microalpha-mpl PYTHONPATH=src /tmp/microalpha-phase8-venv/bin/python scripts/run_phase9_walkforward.py --clean: PASS, result hash0e6567e9f67954df4ec5c74233f4e1d34759e4f6b7bf1f562be2e63997a44aee.- Phase 9 result hash recomputation:
PASS, matched stored hash
0e6567e9f67954df4ec5c74233f4e1d34759e4f6b7bf1f562be2e63997a44aee. python -m json.tool reports/phase9/phase9_summary.json: PASS.python -m pytest: PASS,135 passed, 49 warnings in 3.92s.ruff check src tests scripts: PASS,All checks passed!.python -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash8199bdda9ceea7571824b87d0fcd1927d457efb258075075a853f9dfb8885bd0.- Forbidden economic-word scan over Phase 9 artifacts and code: PASS, no matches.
Assumptions and limitations:
- Local default
pythonis Python 3.10.9, not Python 3.11. - Phase 9 LightGBM execution used the temporary environment at
/tmp/microalpha-phase8-venvwith working LightGBM dependencies. - PyArrow emitted sandbox CPU-info warnings while reading parquet; these did not affect the Phase 9 gate.
- NumPy emitted warnings when negative-control predictions had no rank
variation; those rows are explicitly marked
no_rank_signal_constant_prediction. - The accepted Phase 9 artifact state was later confirmed by GitHub Actions
under Python 3.11 on commit
840465559903abf25857bf24a899202c2bbc9f47. - Phase 9 remains development-only temporal robustness analysis.
- No 2026 holdout date was read.
- No Phase 10 signal construction, execution simulation, cost analysis, or trading rule was implemented.
Next steps:
- Pre-Phase-10 GitHub Actions gate was cleared on exact Phase 9 commit
840465559903abf25857bf24a899202c2bbc9f47. - GitHub Actions
tests: PASS, run31353512353. - GitHub Actions
research-smoke: PASS, run31353512319. - Do not begin Phase 11 until the user explicitly accepts Phase 10 and requests continuation.
Status: PASS locally
Pre-Phase-10 CI gate:
- Exact accepted Phase 9 artifact commit:
840465559903abf25857bf24a899202c2bbc9f47. - Remote
mainresolved to the same SHA before Phase 10 work began. - GitHub Actions workflows use
actions/setup-python@v5withpython-version: "3.11". - GitHub Actions
testsworkflow: PASS. Run:31353512353. URL:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31353512353. Head SHA:840465559903abf25857bf24a899202c2bbc9f47. - GitHub Actions
research-smokeworkflow: PASS. Run:31353512319. URL:https://github.com/H2nryHe/Microstructure_Alpha_Execution_Lab/actions/runs/31353512319. Head SHA:840465559903abf25857bf24a899202c2bbc9f47.
Frozen inputs and plan:
- Phase 7 snapshot hash:
0bcdb7eddebbe83458998eff78844471afb78fc66d249a53aeb25667bebd803a. - Phase 7 result hash:
b86d51c4317f87d0cabf579f152d07c139e7fc23e47356d655bd09057342eb04. - Phase 7 audit hash:
b6b8206e03c81b47787d5ae4d4e5b960b4748bc75eed0ee5be4862ebf190d6e1. - Phase 8 modeling plan hash:
823ee7a98be9a5199842536a65edd2394a39f1c5c6ae13947c29bd7c1c2494fe. - Phase 8 result hash:
d8471add338d79106fb1839008c5168535bb644505b5282a5e6236147b31255d. - Phase 9 walk-forward plan hash:
4b1f0f0dd9f638ff4b5f40af04e17e8fc7753c4a500cac650d2537d3d40fb2c4. - Phase 9 result hash:
0e6567e9f67954df4ec5c74233f4e1d34759e4f6b7bf1f562be2e63997a44aee. - Phase 10 signal plan file:
data/manifests/phase10_signal_plan.yaml. - Phase 10 signal plan hash:
0ae8590cef7e7ea313c80889c74cc7db592a948f119e3982a2f2269df0c2a2bb. - The Phase 10 signal plan was created before signal evaluation.
- Phase 10 signal artifact hash:
68edd84a5ea6b72035976a0b0f48aabfc0183e17d6946fcbf69da7190f5de5d6. - Phase 10 results hash:
604a7b8a83990b9052c8fd329d93e93759a58d4b98960c2362f104a2d4b14f71.
Signal rules:
- Eligible validation dates:
2024-07-01through2025-12-01, matching the 18 Phase 9 expanding-window validation folds. - 2026 holdout access:
false. - Prediction source: regenerated Phase 9 expanding-window out-of-sample predictions.
- Model candidates:
qi_direct_baseline,lightgbm_qi_ofi, andlightgbm_extended. - Primary rule:
train_q10_q90. Thresholds are estimated from each fold's training predictions only. - Boundary behavior:
LONG if
prediction >= training q90; SHORT ifprediction <= training q10; FLAT otherwise. - Secondary diagnostics:
train_q05_q95andprediction_sign. - Non-finite predictions, invalid observations, stale observations, first row of each day, and last row of each day become FLAT deterministically.
- Generated signal values are limited to
-1,0, and1.
Signal artifacts:
- Row-level signals were written outside Git under
/tmp/microalpha-phase10/signals. - Row-level signal artifact count:
54Parquet files (18dates x3models). - Row-level signal artifact size: approximately
133M. - Compact path-independent tracked manifest:
reports/phase10/signal_manifest.json. - Compact tracked outputs under
reports/phase10/:signal_summary.csv,signal_by_fold.csv,signal_transitions.csv,signal_persistence.csv,thresholds_by_fold.csv,model_signal_disagreement.csv,signal_future_mid_diagnostics.csv,signal_manifest.json,signal_trace_sample.csv,prediction_reconciliation.csv,phase10_summary.json,README.md, and required figures. - No row-level signal stream is committed to Git.
Prediction reconciliation and label isolation:
- Regenerated predictions reconciled against frozen Phase 9 compact metrics for
all
54fold/model rows. - Reconciliation max absolute differences:
Spearman IC
4.763412e-13, prediction mean4.852440e-18, prediction std4.996817e-17. - Reconciliation status: PASS.
- Label-mutation isolation test: PASS. Mutating future-return, future-move, and direction-label columns cannot change thresholds, raw signals, final signals, or signal artifact hash.
- Signal generation rejects future-derived columns before generating signals.
Threshold statistics:
- Mean q10 thresholds:
qi_direct_baseline=-2.2818582753209408e-05,lightgbm_qi_ofi=-2.3438808013423187e-05,lightgbm_extended=-2.2823068899197757e-05. - Mean q90 thresholds:
qi_direct_baseline=2.2888278677689708e-05,lightgbm_qi_ofi=2.357973672056846e-05,lightgbm_extended=2.2985208346034528e-05. - q05/q95 threshold drift is recorded in
thresholds_by_fold.csvand figures.
Signal coverage:
- Primary 10/90 active coverage:
qi_direct_baseline=0.21705725829589728,lightgbm_qi_ofi=0.20213113613652564,lightgbm_extended=0.17317768411090395. - Primary long/short coverage:
qi_direct_baseline: long0.107837, short0.109221;lightgbm_qi_ofi: long0.100306, short0.101825;lightgbm_extended: long0.086459, short0.086719. - Secondary 5/95 active coverage:
qi_direct_baseline=0.118952,lightgbm_qi_ofi=0.108833,lightgbm_extended=0.086176. - Prediction-sign active coverage is effectively all non-boundary anchors for all three models and is diagnostic only.
Transition and churn statistics:
- Mean final-signal transition rate:
qi_direct_baseline=0.1770324626465384,lightgbm_qi_ofi=0.2449082571068742,lightgbm_extended=0.20987958358443803. - Mean direct reversal rate:
qi_direct_baseline=0.002918,lightgbm_qi_ofi=0.005511,lightgbm_extended=0.006195. - Mean raw/final signal changes are recorded in
reports/phase10/signal_transitions.csv.
Persistence:
- Mean LONG run length in one-second anchors:
qi_direct_baseline=2.4828190838699595,lightgbm_qi_ofi=1.5967943501789448,lightgbm_extended=1.5488590518222731. - Mean SHORT run length in one-second anchors:
qi_direct_baseline=2.624652298438945,lightgbm_qi_ofi=1.6359806214472254,lightgbm_extended=1.559732257926976. - Median, p95, and maximum run lengths are recorded in
reports/phase10/signal_persistence.csv.
Conditional future-mid diagnostics:
- Mean LONG-minus-SHORT future-mid return:
qi_direct_baseline=6.312122164443975e-05,lightgbm_qi_ofi=6.587916126813072e-05,lightgbm_extended=7.558446367242457e-05. - Mean signed future-mid effect:
qi_direct_baseline=3.156061082221988e-05,lightgbm_qi_ofi=3.293958063406536e-05,lightgbm_extended=3.779223183621228e-05. - Conditional LONG, FLAT, SHORT diagnostics are reported in
signal_future_mid_diagnostics.csv. - These are predictive signal-separation diagnostics only.
Model signal disagreement:
- Mean
qi_direct_baselinevslightgbm_extendeddisagreement fraction:0.1330478193097956. - Mean
lightgbm_qi_ofivslightgbm_extendeddisagreement fraction:0.06632017530842774. - Directional disagreement breakdowns and descriptive future-mid outcomes are
recorded in
model_signal_disagreement.csv.
Exact local test results:
MPLCONFIGDIR=/tmp/microalpha-mpl PYTHONPATH=src /tmp/microalpha-phase8-venv/bin/python scripts/run_phase10_signals.py --clean: PASS, signal artifact hash68edd84a5ea6b72035976a0b0f48aabfc0183e17d6946fcbf69da7190f5de5d6, result hash604a7b8a83990b9052c8fd329d93e93759a58d4b98960c2362f104a2d4b14f71.- Phase 10 result hash recomputation:
PASS, matched stored hash
604a7b8a83990b9052c8fd329d93e93759a58d4b98960c2362f104a2d4b14f71. python -m json.tool reports/phase10/phase10_summary.json: PASS.python -m json.tool reports/phase10/signal_manifest.json: PASS.python -m pytest: PASS,148 passed, 49 warnings in 4.17s.ruff check src tests scripts: PASS,All checks passed!.python -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash8199bdda9ceea7571824b87d0fcd1927d457efb258075075a853f9dfb8885bd0.
Assumptions and limitations:
- Local default
pythonis Python 3.10.9, not Python 3.11. - Phase 10 LightGBM execution used the temporary environment at
/tmp/microalpha-phase8-venvwith working LightGBM dependencies. - PyArrow emitted sandbox CPU-info warnings while reading parquet; these did not affect the Phase 10 gate.
- The exact Phase 10 artifact state was committed and pushed as
7b4bba3483bd6a7a3ae52acfd12bc91a830f6901. - GitHub Actions under Python 3.11 confirmed that exact Phase 10 commit:
testsrun31391220465PASS andresearch-smokerun31391220513PASS. - Phase 10 signals are desired directional states only, not orders or fills.
- No 2026 holdout date was read.
- Phase 11 consumes Phase 10 signals as desired directional states and creates separate order/fill diagnostics.
Next steps:
- Phase 11 execution simulation has been completed below from the recorded Phase 10 CI-confirmed commit.
Status: PASS locally and accepted
Pre-Phase-11 gate:
- Exact accepted Phase 10 artifact commit:
7b4bba3483bd6a7a3ae52acfd12bc91a830f6901. - Remote
mainresolved to the same SHA before Phase 11 work began. - GitHub Actions under Python 3.11 confirmed that exact commit:
testsrun31391220465PASS andresearch-smokerun31391220513PASS. - Exact accepted Phase 11 commit:
0a4ef8c2c6d5b98a3709aa0f95400f21a4e8c44e. - GitHub Actions under Python 3.11 confirmed the accepted Phase 11 commit:
testsrun31395063031PASS andresearch-smokerun31395063336PASS.
Frozen execution plan and config:
- Execution config file:
configs/execution.yaml. - Execution config hash:
7886f78e7552404f88ce446094353133a1590d22dd33ae1f3b647a3eb24132ef. - Phase 11 execution plan file:
data/manifests/phase11_execution_plan.yaml. - Phase 11 execution plan hash:
f5fa9ff916ef084cb1f7aa7d95f22058868ed39745aad14c27a0e2c2ee7d81a4. - The plan was frozen before Phase 11 real-data execution diagnostics.
Execution mechanics:
- Replay clock:
observation_time. - Exchange timestamps are retained for audit and not used to reorder replay.
- Same-timestamp tie policy: market states/trades at exactly the order-arrival timestamp are treated as already observed before the simulated order enters.
- Order sizing: fixed quote notional per unit signal transition,
target_order_notional_usd=10000.0. - Phase 10 final-signal state changes create orders; persistent signals do not submit another order every second.
- Market BUY orders consume asks from best ask upward.
- Market SELL orders consume bids from best bid downward.
- Displayed-depth shortfall is explicit; unavailable residual is not filled using inferred hidden liquidity.
- Passive BUY limit price is the best bid observable at order creation.
- Passive SELL limit price is the best ask observable at order creation.
- Passive queue approximation: displayed quantity at the limit price times
queue_fraction=1.0. - Book cancellations do not advance the simulated queue.
- Passive TTL:
1000ms. - Cancel latency:
100ms. - Real-data fee setting:
0.0 bps; nonzero fee calculation is covered by synthetic tests. - Markout horizons:
100ms,500ms,1000ms, and5000ms.
Real-data scope:
- Instrument:
BTC-USDT. - Vendor symbol: Tardis/Binance
BTCUSDT. - Date used for MVP real-data mechanics diagnostics:
2024-07-01. - Models:
qi_direct_baseline,lightgbm_qi_ofi, andlightgbm_extended. - Latency scenarios:
0msand100ms. - Book-state source:
/tmp/microalpha-multiday/derived/date=2024-07-01/research_100ms.parquet. - Passive queue-depletion trade source:
/tmp/microalpha-multiday/source/2024-07-01/BTCUSDT_trades.csv.gz. - Phase 10 signal source root:
/tmp/microalpha-phase10/signals. - Row-level Phase 11 artifact root:
/tmp/microalpha-phase11. - Row-level Phase 11 artifact size: about
38M. - Tracked compact report size: about
356Kunderreports/phase11. - All 54 Phase 10 signal artifact entries were checksum-verified before real execution diagnostics.
Artifacts and hashes:
- Phase 10 signal artifact hash verified:
68edd84a5ea6b72035976a0b0f48aabfc0183e17d6946fcbf69da7190f5de5d6. - Phase 11 execution artifact hash:
893c5196be53a00bcd5fb94362b60dece3da28aea2e264fe1f50bf6bbce415c0. - Phase 11 results hash:
a157c0eb1fb27043f19d6072b215645017d9cbc395b35047dd9b072d9d8ec2e0. - Phase 11 result hash recomputation matched the stored hash.
Compact reports:
reports/phase11/order_summary.csvreports/phase11/market_execution_summary.csvreports/phase11/passive_execution_summary.csvreports/phase11/fill_latency_summary.csvreports/phase11/depth_consumption_summary.csvreports/phase11/passive_fill_summary.csvreports/phase11/adverse_selection_summary.csvreports/phase11/runtime_summary.csvreports/phase11/execution_manifest.jsonreports/phase11/phase11_summary.jsonreports/phase11/README.md- Figures are under
reports/phase11/figures/.
Order traffic:
- Market-order diagnostics generated
112988orders. - Passive-order diagnostics generated
112988orders. - Total fill child rows across market and passive diagnostics:
199392. - Orders per date/model/scenario:
qi_direct_baseline=14240,lightgbm_qi_ofi=21789,lightgbm_extended=20465. - Orders per active signal hour:
qi_direct_baseline=2882.2669515349153,lightgbm_qi_ofi=4300.696310104721,lightgbm_extended=4049.356930856326. - Orders per signal transition:
1.0.
Market-order diagnostics:
- Market fill rate:
1.0for all model/latency scenarios. - Mean implementation shortfall versus decision mid:
qi_direct_baseline:6.77987427046345e-06at0ms,1.0472018849959377e-05at100ms.lightgbm_qi_ofi:5.1850238244400755e-06at0ms,8.28691755766168e-06at100ms.lightgbm_extended:5.607924162474779e-06at0ms,9.781072581593323e-06at100ms.
- Average levels consumed:
qi_direct_baseline=1.4127106741573034at0msand1.365308988764045at100ms;lightgbm_qi_ofi=1.2925788241773373at0msand1.2779384092890909at100ms;lightgbm_extended=1.322697288052773at0msand1.30701197165893at100ms. - Market-order partial-fill counts from displayed depth:
qi_direct_baseline=61/61,lightgbm_qi_ofi=64/71,lightgbm_extended=65/74for0ms/100ms.
Passive-order diagnostics:
- Passive fill rate:
qi_direct_baseline:0.014747191011235955at0ms,0.02359550561797753at100ms.lightgbm_qi_ofi:0.03639451099178485at0ms,0.04534398090779751at100ms.lightgbm_extended:0.030930857561690693at0ms,0.03801612509161984at100ms.
- Mean passive fill fraction:
qi_direct_baseline=0.013128770964257372/0.02116323707953792,lightgbm_qi_ofi=0.028111386227098304/0.03686223902300702,lightgbm_extended=0.023682415223913997/0.03036492513370315for0ms/100ms. - Median time-to-first-fill in milliseconds:
qi_direct_baseline=465.33950000000004/242.7215,lightgbm_qi_ofi=444.73699999999997/317.95799999999997,lightgbm_extended=445.35400000000004/346.01300000000003for0ms/100ms.
Adverse-selection / markout diagnostics:
- Market-order average signed markouts at
100mswere small negative across models, then positive at longer horizons in this diagnostic date. - Passive-order average signed markouts were negative at all configured horizons in this diagnostic date.
- Full
100ms,500ms,1000ms, and5000msmarkouts are recorded inreports/phase11/adverse_selection_summary.csv.
Synthetic tests added:
- No fill before order arrival.
- Market BUY fills against asks, not bids.
- Market SELL fills against bids, not asks.
- Multi-level BUY and SELL depth consumption.
- Insufficient displayed depth leaves explicit residual.
- Passive queue depletion before simulated fill.
- Passive partial fill state.
- Expiration without forced fill.
- Cancel cannot remove causally earlier fills and prevents later fills after cancel effective time.
- Same-timestamp deterministic passive-fill tie rule.
- Exact fee calculation.
- BUY/SELL markout sign convention.
- Deterministic replay hash and future-mutation isolation.
Exact local verification:
python -m pytest: PASS,163 passed, 49 warnings in 3.20s.ruff check src tests scripts: PASS,All checks passed!.python -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash29d8157421a085a12a31c0f77c29b3b09f57cd2663c45513928815977eef1dd8.python -m json.tool reports/phase11/phase11_summary.json: PASS.python -m json.tool reports/phase11/execution_manifest.json: PASS.- Phase 11 result hash recomputation: PASS, matched
a157c0eb1fb27043f19d6072b215645017d9cbc395b35047dd9b072d9d8ec2e0. PYTHONPATH=src MPLCONFIGDIR=/tmp/microalpha-mpl python scripts/run_phase11_execution.py --clean: PASS, with execution artifact hash893c5196be53a00bcd5fb94362b60dece3da28aea2e264fe1f50bf6bbce415c0and results hasha157c0eb1fb27043f19d6072b215645017d9cbc395b35047dd9b072d9d8ec2e0.
Assumptions and limitations:
- Local default
pythonis Python 3.10.9, not Python 3.11. - Exact Phase 11 artifact state was committed and pushed as
0a4ef8c2c6d5b98a3709aa0f95400f21a4e8c44e. - Python 3.11 GitHub Actions confirmed that exact Phase 11 commit with
testsrun31395063031PASS andresearch-smokerun31395063336PASS. - Real-data diagnostics are intentionally bounded to one development date,
2024-07-01, for the Phase 11 MVP. - Real-data book interaction uses existing
research_100ms.parquetdepth snapshots rather than replaying every incremental L2 update inside the execution loop. - Passive queue depletion uses raw Tardis trade prints after order arrival, but exact exchange queue priority is unavailable.
- Real-data fee rate is set to
0.0 bpsto isolate execution mechanics; this is not a venue fee assumption. - No 2026 holdout data was accessed.
- No portfolio cash balance, portfolio equity curve, Sharpe ratio, drawdown, cost grid, or accounting layer was implemented.
Next steps:
- Phase 12 portfolio and inventory accounting has been completed below from the accepted Phase 11 commit.
Status: PASS locally
Pre-Phase-12 gate:
- Exact accepted Phase 11 commit:
0a4ef8c2c6d5b98a3709aa0f95400f21a4e8c44e. - GitHub Actions under Python 3.11 confirmed that exact Phase 11 commit:
testsrun31395063031PASS andresearch-smokerun31395063336PASS. - Exact accepted Phase 12 commit:
78f396b47cd52ea40c5ba8b9e7dfb0551aad4302. - GitHub Actions under Python 3.11 confirmed that exact Phase 12 commit:
testsrun31397870924PASS andresearch-smokerun31397869299PASS. - Phase 11 execution artifact hash verified:
893c5196be53a00bcd5fb94362b60dece3da28aea2e264fe1f50bf6bbce415c0. - Phase 11 results hash verified:
a157c0eb1fb27043f19d6072b215645017d9cbc395b35047dd9b072d9d8ec2e0.
Frozen accounting plan:
- Plan file:
data/manifests/phase12_accounting_plan.yaml. - Plan hash:
a43f49a5d99393cc26b76e86628e67c4459a215f2eb5ad3a241dd339ee3094a9. - The plan was frozen before Phase 12 real-data accounting was run.
Accounting scope:
- Instrument:
BTC-USDT. - Vendor symbol: Tardis/Binance
BTCUSDT. - Date:
2024-07-01. - Models:
qi_direct_baseline,lightgbm_qi_ofi, andlightgbm_extended. - Execution modes:
marketandpassive. - Latency scenarios:
0msand100ms. - Parent-order source: Phase 11 orders under
/tmp/microalpha-phase11. - Fill source: Phase 11 fills under
/tmp/microalpha-phase11. - Mark source: Phase 11 markouts under
/tmp/microalpha-phase11. - Row-level Phase 12 ledger root:
/tmp/microalpha-phase12. - Row-level Phase 12 ledger size: about
90M. - Tracked compact report size: about
732Kunderreports/phase12. - All 12 Phase 11 scenario manifest entries and their order/fill/markout SHA-256 digests were verified before ledger construction.
Accounting conventions:
- BUY fills increase signed base inventory; SELL fills decrease signed base inventory.
- Cash is self-financing: BUY decreases cash by price times quantity; SELL increases cash by price times quantity.
- Gross PnL equals realized PnL plus terminal unrealized PnL.
- Net PnL equals gross PnL minus recorded fill fees.
- Realized PnL uses average-cost inventory accounting and supports partial closes and long/short reversals.
- Terminal unrealized PnL marks remaining inventory to the final available
100msmark mid at or before the terminal ledger time. - Terminal positions are intentionally not forcibly liquidated.
- Fees are consumed from Phase 11 fill records only. Phase 11 real-data fees
were configured as
0.0 bps, so gross and net PnL are identical in this Phase 12 MVP. - No annualization, Sharpe ratio, drawdown analysis, cost grid, or latency sweep was implemented.
Artifacts and hashes:
- Phase 12 accounting artifact hash:
560d48d2656cde46865bc26dd9cd3c853ef6717ed54e2a911ad8a80588c4cc0b. - Phase 12 results hash:
c8fb3c53e09ed36c5d41d72370c3bbc624c37ae0a9a910f0da3460784ce8a012. - Phase 12 result hash recomputation matched the stored hash.
Compact reports:
reports/phase12/accounting_summary.csvreports/phase12/pnl_by_scenario.csvreports/phase12/inventory_summary.csvreports/phase12/turnover_summary.csvreports/phase12/realized_unrealized_summary.csvreports/phase12/execution_pnl_decomposition.csvreports/phase12/accounting_manifest.jsonreports/phase12/phase12_summary.jsonreports/phase12/README.md- Figures are under
reports/phase12/figures/.
Scenario-level accounting results:
- Scenario count:
12. - Parent orders reconciled:
225976. - Fill rows processed:
199392. - Total turnover:
1168524315.7222328. - Market,
lightgbm_extended,0ms: gross/net PnL5720.895120207824, turnover206518401.8921641, realized PnL5716.878252395109, terminal unrealized PnL4.016867813528558, terminal position-0.6942487613772562, max absolute position1.3794587327395869. - Market,
lightgbm_extended,100ms: gross/net PnL5264.311049242642, turnover206446116.54784513, realized PnL5265.172457282935, terminal unrealized PnL-0.861408039753997, terminal position0.377227744490664, max absolute position1.122375204048606. - Market,
lightgbm_qi_ofi,0ms: gross/net PnL5550.258410920898, turnover219850080.70557386, realized PnL5544.346333716735, terminal unrealized PnL5.912077204784866, terminal position-0.725700247928128, max absolute position1.329395406760148. - Market,
lightgbm_qi_ofi,100ms: gross/net PnL5323.436535794204, turnover219792552.9203605, realized PnL5324.145332422236, terminal unrealized PnL-0.7087966283417695, terminal position0.27474928740704657, max absolute position1.0910820224602424. - Market,
qi_direct_baseline,0ms: gross/net PnL5374.277072860903, turnover142876210.0156418, realized PnL5375.860285026886, terminal unrealized PnL-1.5832121654803022, terminal position-1.339746468426229, max absolute position1.870617457951455. - Market,
qi_direct_baseline,100ms: gross/net PnL5177.823381225753, turnover142879876.99890685, realized PnL5176.968076487272, terminal unrealized PnL0.8553047394386138, terminal position-1.0555631291189436, max absolute position1.4173807561822744. - Passive,
lightgbm_extended,0ms: gross/net PnL-3630.264330080594, turnover4866605.998529209, realized PnL-863.697169875399, terminal unrealized PnL-2766.5671602123907, terminal position11.957668360736466, max absolute position11.957668360736466. - Passive,
lightgbm_extended,100ms: gross/net PnL-2571.828693028423, turnover6234185.619222174, realized PnL-639.9838329147991, terminal unrealized PnL-1931.8448601150326, terminal position7.732312207016806, max absolute position7.821530552968911. - Passive,
lightgbm_qi_ofi,0ms: gross/net PnL-3080.5074360552244, turnover6125189.791964068, realized PnL-805.4692192090347, terminal unrealized PnL-2275.038216851113, terminal position9.130302156076135, max absolute position10.06877227302567. - Passive,
lightgbm_qi_ofi,100ms: gross/net PnL-2178.263225474686, turnover8031909.703807328, realized PnL-880.0457814257971, terminal unrealized PnL-1298.2174440461508, terminal position5.819067941774399, max absolute position7.021528248729046. - Passive,
qi_direct_baseline,0ms: gross/net PnL-1035.9125899009377, turnover1879536.6388541388, realized PnL-329.60068186357563, terminal unrealized PnL-706.3119080364783, terminal position1.943989932014357, max absolute position3.6595463441971856. - Passive,
qi_direct_baseline,100ms: gross/net PnL151.5554936050612, turnover3023648.8893636637, realized PnL1075.537259030324, terminal unrealized PnL-923.9817654234315, terminal position3.204774389905958, max absolute position3.7069910927698375.
Reconciliation and integrity checks:
- Duplicate fill IDs are rejected.
- Parent-child fill reconciliation is enforced per scenario.
- Filled quantity and notional are reconciled back to Phase 11 parent-order summaries.
- Inventory, cash, fee, gross PnL, and net PnL conservation identities are checked.
- Scenario ledgers are independent; inventory and cash do not bleed across model, mode, latency, or date boundaries.
- Replay hash is deterministic and sensitive to fill mutations.
- Future-label isolation is covered by synthetic tests; the ledger consumes Phase 11 fills and terminal marks only, and does not read labels or future returns.
Synthetic tests added:
- Long round-trip gain and loss.
- Short round-trip gain and loss.
- Partial close.
- Weighted average entry cost.
- Long-to-short reversal.
- Short-to-long reversal.
- Fee reconciliation.
- Open terminal long and open terminal short marking.
- Scenario reset.
- Duplicate fill rejection.
- Parent-child reconciliation.
- Conservation identities.
- Deterministic replay hash and future-label isolation.
- Fill mutation sensitivity.
Exact local verification:
PYTHONPATH=src MPLCONFIGDIR=/tmp/microalpha-mpl python scripts/run_phase12_accounting.py --clean: PASS, with accounting artifact hash560d48d2656cde46865bc26dd9cd3c853ef6717ed54e2a911ad8a80588c4cc0band results hashc8fb3c53e09ed36c5d41d72370c3bbc624c37ae0a9a910f0da3460784ce8a012.- Phase 12 result hash recomputation:
PASS, matched stored hash
c8fb3c53e09ed36c5d41d72370c3bbc624c37ae0a9a910f0da3460784ce8a012. python -m pytest: PASS,180 passed, 49 warnings in 3.52s.ruff check src tests scripts: PASS,All checks passed!.python -m compileall -q src scripts tests: PASS.python -m json.tool reports/phase12/phase12_summary.json: PASS.python -m json.tool reports/phase12/accounting_manifest.json: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash29d8157421a085a12a31c0f77c29b3b09f57cd2663c45513928815977eef1dd8.
Assumptions and limitations:
- Local default
pythonis Python 3.10.9, not Python 3.11. - Exact Phase 12 artifact state was committed and pushed as
78f396b47cd52ea40c5ba8b9e7dfb0551aad4302. - Python 3.11 GitHub Actions confirmed that exact Phase 12 commit with
testsrun31397870924PASS andresearch-smokerun31397869299PASS. - Real-data accounting is intentionally bounded to one development date,
2024-07-01, for the Phase 12 MVP. - Phase 12 consumes the frozen Phase 11 orders, fills, and markouts unchanged.
- Gross and net PnL are identical in the real-data reports because Phase 11
real-data fees were configured as
0.0 bps. - Passive execution often leaves terminal inventory because Phase 12 does not force liquidation at the end of the diagnostic day.
- Accounting PnL is a ledger result for this bounded diagnostic run only and is not evidence of live economic viability.
- No 2026 holdout data was accessed.
- Phase 13 cost and latency analysis has been completed below.
Next steps:
- Phase 13 transaction-cost, latency, and breakeven analysis has been completed below from the accepted Phase 12 commit.
Status: PASS locally
Pre-Phase-13 gate:
- Exact accepted Phase 12 commit:
78f396b47cd52ea40c5ba8b9e7dfb0551aad4302. - GitHub Actions under Python 3.11 confirmed that exact Phase 12 commit:
testsrun31397870924PASS andresearch-smokerun31397869299PASS. - Phase 12 accounting plan hash:
a43f49a5d99393cc26b76e86628e67c4459a215f2eb5ad3a241dd339ee3094a9. - Phase 12 accounting artifact hash:
560d48d2656cde46865bc26dd9cd3c853ef6717ed54e2a911ad8a80588c4cc0b. - Phase 12 results hash:
c8fb3c53e09ed36c5d41d72370c3bbc624c37ae0a9a910f0da3460784ce8a012. - Phase 10 signal artifact hash verified:
68edd84a5ea6b72035976a0b0f48aabfc0183e17d6946fcbf69da7190f5de5d6.
Frozen Phase 13 plan:
- Plan file:
data/manifests/phase13_cost_latency_plan.yaml. - Plan hash:
fadafb1a634f9661d5c664f3a716a8ead8c24e4abf61a221e94668bab9f0a5f1. - The plan was frozen before Phase 13 cost and latency results were run.
Analysis scope:
- Instrument:
BTC-USDT. - Vendor symbol: Tardis/Binance
BTCUSDT. - Date:
2024-07-01. - Models:
qi_direct_baseline,lightgbm_qi_ofi, andlightgbm_extended. - Execution modes:
marketandpassive. - Latency grid in milliseconds:
0,10,50,100,250. - Market fee grid in bps:
0.00,0.10,0.25,0.50,1.00,2.00,5.00,10.00. - Passive fee scenarios:
P0=(maker 0.00, taker 0.00),P1=(maker -0.50, taker 0.50),P2=(maker 0.00, taker 0.50),P3=(maker 0.00, taker 1.00),P4=(maker 0.25, taker 1.00),P5=(maker 0.50, taker 2.00),P6=(maker 1.00, taker 5.00). - Fee grids are generic research stresses only and are not current exchange fee schedules.
- Market-data latency remains
0ms; scenario latency is downstream order-arrival latency. - New latency scenarios were causally regenerated with Phase 11 mechanics.
- Existing Phase 11 and Phase 12 outputs were not overwritten.
Artifacts and hashes:
- Phase 13 execution root:
/tmp/microalpha-phase13-execution. - Phase 13 zero-fee ledger root:
/tmp/microalpha-phase13-ledgers. - Compact report directory:
reports/phase13. - Execution root size: about
96M. - Zero-fee ledger root size: about
224M. - Compact report size: about
852K. - Phase 13 execution-grid artifact hash:
45ada7b581b9e5240661b2fc5bdb3e137f8a5e86674fa9563685104f10eda5cb. - Phase 13 results hash:
3798edf860c8a493d17fcbbe201b6fd5a2e61a10ab955d504ee160bfdffef990. - Phase 13 result hash recomputation matched the stored hash.
Compact reports:
reports/phase13/market_fee_sensitivity.csvreports/phase13/passive_fee_sensitivity.csvreports/phase13/latency_sensitivity.csvreports/phase13/breakeven_costs.csvreports/phase13/cost_survival.csvreports/phase13/incremental_economics.csvreports/phase13/passive_latency_diagnostic.csvreports/phase13/terminal_inventory_stress.csvreports/phase13/cost_decomposition.csvreports/phase13/execution_grid_manifest.jsonreports/phase13/phase13_summary.jsonreports/phase13/README.md- Figures are under
reports/phase13/figures.
Market breakeven costs:
- QI market breakeven fee bps:
0ms=0.3761491904266314,10ms=0.3761491904266314,50ms=0.3761491904266314,100ms=0.3623899663117268,250ms=0.2985150759056961. - QI+OFI market breakeven fee bps:
0ms=0.2524565100503137,10ms=0.2524565100503137,50ms=0.2524565100503137,100ms=0.24220277097937412,250ms=0.2016144987463031. - Extended market breakeven fee bps:
0ms=0.27701624009249565,10ms=0.27701624009249565,50ms=0.27701624009249565,100ms=0.2549968552216678,250ms=0.209536799801644. - Analytical market breakeven values match the fee-grid interpolation.
Fee survival:
- Market scenarios remain net positive at
0.10 bps. - Most market scenarios remain net positive at
0.25 bps; exceptions are QI+OFI at100msand250ms, and Extended at250ms. - No market scenario remains net positive at
0.50 bpsor higher. - Passive scenarios are net negative for all role-specific scenarios except QI
at
100ms, which remains net positive fromP0throughP4and turns net negative atP5andP6.
Latency diagnostics:
- Market fill rate remains
1.0for all models and latencies. - Market 10ms and 50ms results match 0ms because the execution book state is based on the existing 100ms research grid and the as-of book snapshot does not change for those sub-grid latencies on this date.
- Market gross PnL loss versus 0ms at 100ms:
QI
196.4536916351499, QI+OFI226.8218751266937, Extended456.5840709651818. - Market gross PnL loss versus 0ms at 250ms:
QI
1106.943002297076, QI+OFI1117.5527928109633, Extended1393.1052092698503. - Passive latency response is not interpreted causally. Fill selection, fill rate, maker/taker mix, residual inventory, and markouts all change.
Turnover and incremental economics:
- At 0ms market execution, Extended minus QI gross PnL increment is
346.6180473469203, but turnover increment is about63.642Mand turnover efficiency increment is-0.09913295033413575 bps. - At 0ms market execution, QI+OFI minus QI gross PnL increment is
175.98133805999516, but turnover increment is about76.974Mand turnover efficiency increment is-0.12369268037631769 bps. - At 0ms market execution, Extended minus QI+OFI gross PnL increment is
170.63670928692516, turnover increment is about-13.332M, and turnover efficiency increment is0.02455973004218196 bps. - At 0.25 bps market fee, Extended minus QI net PnL increment is negative at 0ms, 100ms, and 250ms.
- At 0.25 bps market fee, QI+OFI minus QI net PnL increment is negative at 0ms, 100ms, and 250ms.
- These are diagnostic comparisons only and do not select a new strategy.
Passive diagnostics:
- Passive fill rates remain low, ranging from about
0.014115to0.051494across model/latency scenarios. - Passive maker/taker role handling is explicit. At
0ms, passive fills are all maker fills for the three models in this dataset. At100msand250ms, marketable-limit taker-on-arrival fills appear. - Passive terminal inventory remains material. Examples:
Extended
0ms=11.957668360736466,100ms=7.732312207016806,250ms=10.35683844478512; QI+OFI0ms=9.130302156076135,100ms=5.819067941774399,250ms=5.234827553236007; QI0ms=1.943989932014357,100ms=3.204774389905958,250ms=3.6848790029233167. - Terminal inventory stress applies deterministic mark shocks to remaining inventory only and does not create synthetic liquidation trades.
- Passive QI at 100ms has terminal-equity deltas of about
-201.580293and+201.580293for-10 bpsand+10 bpsterminal mark shocks.
Accounting and cost conventions:
- Fees are applied once as quote fees on fill notional after execution.
- Market fills use taker-fee semantics.
- Passive fills use actual Phase 11
liquidity_role: maker fills use maker fee bps, and taker or marketable-limit fills use taker fee bps. - Spread, displayed-depth consumption, arrival-time market state, marketable limit behavior, and implementation shortfall are already embedded in fill prices. They are diagnostics only and are not subtracted again.
- Primary accounting retains terminal inventory. Terminal inventory stress changes only the terminal mark applied to remaining inventory.
Synthetic tests added:
- Exact market fee calculation.
- Exact market breakeven calculation.
- Fixed-fill net PnL monotonicity under increasing fees.
- Maker rebate handling.
- Mixed maker/taker role-specific fee reconciliation.
- Fee overlay does not change gross PnL.
- Fee-grid interpolation reproduces a known zero-fee/breakeven case.
- Passive breakeven rebate flagging.
- Latency causality: arrival time equals create time plus configured latency, and no fill occurs before arrival.
- Latency validation does not mutate signal timestamps.
- Terminal inventory stress and scenario isolation.
Exact local verification:
PYTHONPATH=src MPLCONFIGDIR=/tmp/microalpha-mpl python scripts/run_phase13_cost_latency.py --clean: generated all 30 execution scenarios and all 30 zero-fee ledgers, then failed only in figure generation due to a report-stage lookup bug. No reconciliation failure occurred.PYTHONPATH=src MPLCONFIGDIR=/tmp/microalpha-mpl python scripts/run_phase13_cost_latency.py --reuse-execution: PASS, reused the checksum-validated regenerated execution grid and produced final reports, figures, execution-grid artifact hash, and results hash.python -m pytest: PASS,191 passed, 49 warnings in 3.09s.ruff check src tests scripts: PASS,All checks passed!.python -m compileall -q src scripts tests: PASS.python -m json.tool reports/phase13/phase13_summary.json: PASS.python -m json.tool reports/phase13/execution_grid_manifest.json: PASS.- Phase 13 result hash recomputation:
PASS, matched stored hash
3798edf860c8a493d17fcbbe201b6fd5a2e61a10ab955d504ee160bfdffef990. PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash29d8157421a085a12a31c0f77c29b3b09f57cd2663c45513928815977eef1dd8.- Guardrail scan: no
2026-date references in Phase 13 reports or plan.
Assumptions and limitations:
- Local default
pythonis Python 3.10.9, not Python 3.11. - Exact accepted Phase 13 commit
ebfbee1a0c06c5a908e760ce8015346e66f35295is onorigin/main. - Python 3.11 GitHub Actions for exact Phase 13 commit
ebfbee1a0c06c5a908e760ce8015346e66f35295are green:testsrun31405386682PASS andresearch-smokerun31405386687PASS. ghis not installed locally; Phase 13 CI evidence was confirmed via the GitHub public API after the GitHub connector returned no PR-filtered runs.- Real execution/accounting remains intentionally bounded to one development
date,
2024-07-01. - Latency values below the 100ms book-state grid can share the same as-of book snapshot; this is documented rather than smoothed or optimized away.
- Fee scenarios are generic stress tests and are not current exchange fee schedules.
- No predictive models, features, signal thresholds, order sizing, or fills were optimized or changed.
- No 2026 holdout data was accessed.
- No Phase 14 robustness or regime analysis was started.
- Negative cost-adjusted results are retained.
- No annualized metrics or Sharpe ratio are reported.
Next steps:
- Phase 13 CI is confirmed. Phase 14 may proceed only under the frozen Phase 14 plan and without 2026 holdout access.
Status: PASS locally
Pre-Phase-14 gate:
- Exact accepted Phase 13 commit:
ebfbee1a0c06c5a908e760ce8015346e66f35295. origin/mainwas confirmed atebfbee1a0c06c5a908e760ce8015346e66f35295before Phase 14 execution.- GitHub Actions on that exact SHA:
testsrun31405386682PASS andresearch-smokerun31405386687PASS. ghis not installed locally; workflow status was confirmed through the GitHub public API after the connector returned no PR-filtered runs.
Frozen Phase 14 plan:
- Plan file:
data/manifests/phase14_robustness_plan.yaml. - Plan hash:
a0315262cb252c9e8b0bb0d63891e92cdfe5d16d0d7924cc570dc49b64107317. - Robustness artifact hash:
af685ef974b6cc5fd21a0c3ffe24fff6ff088f185ae8b32a337d25942c058379. - Results hash:
6da1560197c3619f72bbaaf4a76673dcd4c9313f1f8c33dfc3106b694659da0a. - Phase 10 signal artifact hash verified:
68edd84a5ea6b72035976a0b0f48aabfc0183e17d6946fcbf69da7190f5de5d6. - Phase 10 signal entries verified for Phase 14:
18. - Phase 11 execution plan hash:
f5fa9ff916ef084cb1f7aa7d95f22058868ed39745aad14c27a0e2c2ee7d81a4. - Phase 11 execution config hash:
7886f78e7552404f88ce446094353133a1590d22dd33ae1f3b647a3eb24132ef.
Exact date sets:
- Primary market dates:
2024-07-01,2024-10-01,2025-01-01,2025-04-01,2025-07-01,2025-10-01. - Passive robustness dates:
2024-07-01,2025-01-01,2025-07-01. - Order-size sensitivity dates:
2024-07-01,2025-01-01,2025-07-01. - Passive queue and TTL sensitivity dates:
2024-07-01,2025-07-01.
Execution scope:
- Instrument:
BTC-USDT. - Vendor symbol: Tardis/Binance
BTCUSDT. - Models:
qi_direct_baseline,lightgbm_qi_ofi, andlightgbm_extended. - Primary market latencies:
0msand100ms. - Primary market fee overlays:
0.00,0.25, and0.50bps. - Order-size sensitivities:
$1,000,$10,000, and$50,000quote notional, interpreted only as displayed-book size sensitivity. - Passive primary settings:
queue_fraction=1.0,TTL=1000ms. - Passive queue sensitivities:
0.50and1.00. - Passive TTL sensitivities:
500ms,1000ms, and2000ms. - No predictive models, features, signal thresholds, order sizing policy, latency assumptions, or fee assumptions were optimized.
Compact reports:
reports/phase14/market_multiday_results.csvreports/phase14/market_date_level_summary.csvreports/phase14/market_breakeven_by_date.csvreports/phase14/model_ranking_stability.csvreports/phase14/incremental_economics_by_date.csvreports/phase14/latency_robustness.csvreports/phase14/order_size_sensitivity.csvreports/phase14/passive_multiday_results.csvreports/phase14/passive_queue_sensitivity.csvreports/phase14/passive_ttl_sensitivity.csvreports/phase14/passive_inventory_stress.csvreports/phase14/robustness_manifest.jsonreports/phase14/phase14_summary.jsonreports/phase14/README.md- Figures are under
reports/phase14/figures.
Scenario counts:
- Primary market scenarios after fee overlays:
108. - Passive primary scenarios:
18. - Order-size scenarios:
27. - Queue sensitivity scenarios:
12. - TTL sensitivity scenarios:
18. - Total execution scenarios in the robustness manifest:
111.
Cross-date market economics:
- Mean daily gross bps per turnover at
0ms: QI0.328320, QI+OFI0.156474, Extended0.026818. - Mean daily gross bps per turnover at
100ms: QI0.140139, QI+OFI-0.004184, Extended-0.125410. - Each model retained negative gross days:
QI
2/6at both latencies, QI+OFI2/6at0msand3/6at100ms, Extended2/6at0msand3/6at100ms. - Positive net days at
0.25 bps: QI3/6at0msand4/6at100ms, QI+OFI3/6and2/6, Extended4/6and3/6. - Positive net days at
0.50 bps: QI2/6at0msand1/6at100ms, QI+OFI1/6and2/6, Extended2/6and2/6.
Breakeven distribution:
- Mean breakeven bps at
0ms: QI0.687184, QI+OFI0.485834, Extended0.652277. - Mean breakeven bps at
100ms: QI0.587916, QI+OFI0.534749, Extended0.607614. - Fraction of dates with breakeven fee above
0.50 bps: QI2/6at0msand1/6at100ms, QI+OFI1/6and2/6, Extended2/6and2/6. - Result: market transaction-cost headroom is unstable by date and generally
thin around a
0.50 bpsfee overlay.
Model ranking stability:
- Gross dollar PnL first-place counts across date/latency contexts:
QI
6, Extended5, QI+OFI1. - Gross bps-per-turnover first-place counts:
QI
8, Extended4, QI+OFI0. - Net PnL first-place counts at
0.25 bps: QI8, Extended4, QI+OFI0. - Net PnL first-place counts at
0.50 bps: QI8, Extended4, QI+OFI0. - No ranking result is used to select a new strategy.
Incremental economics:
- Extended minus QI mean delta net PnL is negative in all four
latency/fee combinations, from about
-2443.68to-3323.64. - QI+OFI minus QI mean delta net PnL is negative in all four
latency/fee combinations, from about
-2960.26to-5034.68. - Extended minus QI+OFI mean delta net PnL is positive on average in all four latency/fee combinations, but still has negative dates.
- Result: added predictive complexity does not robustly improve net market economics versus QI under moderate generic costs.
Latency robustness:
- At
100ms, gross PnL worsened on5/6dates for each model and improved on1/6date for each model. - Median gross bps erosion:
QI
0.209682, QI+OFI0.078180, Extended0.053930. - Improvements are interpreted cautiously as changed arrival/fill selection, not evidence that latency is beneficial.
Order-size sensitivity:
- Market fill rate remained
1.0for the displayed-book sensitivity grid. - Mean levels consumed increase with notional for all models.
- Mean implementation shortfall increases from about
0.0000023-0.0000028at$1,000to about0.0000127-0.0000139at$50,000. - Mean gross bps at
$50,000: QI0.633733, QI+OFI-0.160003, Extended-1.309970. - These results are displayed-book size sensitivity only, not market capacity.
Passive robustness:
- Passive primary mean fill rates remain low:
QI
0.015585at0msand0.023620at100ms, QI+OFI0.040079and0.048835, Extended0.046999and0.054416. - Passive primary mean gross bps:
QI
-3.446490at0msand-1.003580at100ms, QI+OFI0.162445and-0.122177, Extended-4.870050and-4.096950. - Queue sensitivity mean fill rates increased under
queue_fraction=0.50versus1.00, but economics did not improve systematically across models. - TTL sensitivity increased fill rate as TTL moved from
500msto2000ms, but higher fill rate did not systematically produce better economics. - Residual inventory remains visible. Mean passive terminal positions:
QI
0.207200at0msand1.331700at100ms, QI+OFI2.345570and0.770292, Extended4.794220and3.958080. - Terminal inventory stress applies
-10,-5,0,+5, and+10bps mark shocks without synthetic liquidation fills. Across passive primary scenarios,+/-10 bpsshocks moved terminal equity by as much as about752.137quote units in absolute value.
Acceptance-gate evidence:
- No holdout dates were accessed. Guardrail scan found no forbidden date-prefix references in Phase 14 reports, plan, runner, or helper module.
- All six primary dates and all three passive/order-size dates were retained.
- Negative gross days, negative net days, passive failures, low fill rates, residual inventory, and model underperformance cases are retained.
- Deterministic result hash recomputation matched
6da1560197c3619f72bbaaf4a76673dcd4c9313f1f8c33dfc3106b694659da0a. reports/phase14/phase14_summary.jsonandreports/phase14/robustness_manifest.jsonparse as valid JSON.- No annualization or Sharpe ratio is reported.
Exact local verification:
PYTHONPATH=src MPLCONFIGDIR=/tmp/microalpha-mpl python scripts/run_phase14_robustness.py --clean: PASS; generated all compact reports, figures, robustness manifest, and summary.python -m pytest: PASS,204 passed, 49 warnings in 3.50s.ruff check src tests scripts: PASS,All checks passed!.python -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash29d8157421a085a12a31c0f77c29b3b09f57cd2663c45513928815977eef1dd8.python -m json.tool reports/phase14/phase14_summary.json: PASS.python -m json.tool reports/phase14/robustness_manifest.json: PASS.- Phase 14 result hash recomputation: PASS, matched stored hash.
Assumptions and limitations:
- Local default
pythonis Python 3.10.9, not Python 3.11. - Exact accepted Phase 14 commit
7290d86afa18b67fdf0c46b2eeea22253dab7bc1is onorigin/main. - Python 3.11 GitHub Actions for exact Phase 14 commit
7290d86afa18b67fdf0c46b2eeea22253dab7bc1are green:testsrun31413110254PASS andresearch-smokerun31413111431PASS. - Cost scenarios are generic research fee overlays, not exchange-specific fee schedules.
- Displayed-book size sensitivity omits hidden liquidity, impact from repeated trading, and strategic reaction by other participants.
- Passive queue assumptions are bounded diagnostics and are not a calibrated queue-position model.
- The Phase 14 results do not choose a best model, execution mode, fee, latency, order size, queue fraction, or TTL.
Next steps:
- Phase 14 is formally accepted. Phase 15 may proceed as synthesis only, with no upstream research changes and no 2026 holdout access.
Status: PASS locally
Pre-Phase-15 gate:
- Exact accepted Phase 14 commit:
7290d86afa18b67fdf0c46b2eeea22253dab7bc1. - GitHub Actions on that exact SHA:
testsrun31413110254PASS andresearch-smokerun31413111431PASS. - Frozen Phase 14 plan hash:
a0315262cb252c9e8b0bb0d63891e92cdfe5d16d0d7924cc570dc49b64107317. - Frozen Phase 14 robustness artifact hash:
af685ef974b6cc5fd21a0c3ffe24fff6ff088f185ae8b32a337d25942c058379. - Frozen Phase 14 results hash:
6da1560197c3619f72bbaaf4a76673dcd4c9313f1f8c33dfc3106b694659da0a.
Final artifacts:
- Canonical report:
reports/final/MICROSTRUCTURE_ALPHA_EXECUTION_LAB_REPORT.md. - Final metrics registry:
reports/final/FINAL_METRICS.json. - Final artifact index:
reports/final/FINAL_ARTIFACT_INDEX.md. - Curated final figures:
reports/final/figures/architecture_diagram.png,reports/final/figures/qi_decile_future_1s_move.png,reports/final/figures/daily_ic_stability.png,reports/final/figures/qi_vs_extended_walkforward_ic.png,reports/final/figures/signal_coverage_and_separation.png,reports/final/figures/market_gross_vs_net_economics.png,reports/final/figures/pnl_turnover_vs_fee.png,reports/final/figures/phase14_breakeven_distribution.png,reports/final/figures/qi_vs_extended_economic_efficiency.png, andreports/final/figures/passive_fill_inventory_tradeoff.png.
Phase 15 hashes:
phase15_final_report_hash:b49dd9edf51a0b1d2fb4564c89f87497446819689fc9153aef1a428aacdb2740.phase15_results_hash:49f24d5831081edaa978f7cbee197896111e2b97f7a4b831b6682b310cd00fa7.- Hash scope:
final report hash covers the canonical final report; results hash covers
README, final markdown artifacts,
FINAL_METRICS.json, and curated figure SHA-256 identities. Runtime, timestamps, and absolute paths are excluded. - Phase 16 note: the public Phase 15 results hash changed after Phase 16 because README now includes a small public performance-engineering section. The canonical final report hash remains unchanged.
README status:
- Root
README.mdwas rewritten as a recruiter-facing narrative, not a phase-by-phase history. - Top-level sections include Research Question, Key Findings, Architecture, Data Integrity, Signal Research, Predictive Modeling, Execution Reality, Cost / Robustness, Reproduce, and Limitations.
- Detailed phase history remains in
STATUS.md.
Metrics registry status:
reports/final/FINAL_METRICS.jsoncontains46source-traceable numeric claims.- Each registry entry includes
metric_name,value,unit,source_phase,source_file,description, and claim strings where the value appears in public README or final-report artifacts. - Headline metrics are validated by
tests/unit/test_phase15_final_report.py.
Final report synthesis:
- The report synthesizes Phases 1-14 without recomputing upstream research or modifying upstream conclusions.
- It explicitly separates statistical predictability, predictive modeling, desired trading states, executable fills, accounting, transaction-cost overlays, and net economic robustness.
- It includes required sections for data trust, causal order-book reconstruction, feature engineering, leakage controls, statistical research, predictive modeling, walk-forward stability, signal construction, execution, accounting, costs/latency, cross-date robustness, what worked, what failed, limitations, next research questions, and reproducibility.
- It states that 2026 remains an untouched temporal holdout and does not imply final confirmatory validation has occurred.
Private career artifacts:
- Resume bullets and interview-preparation materials are intentionally private career artifacts and excluded from repository validation and public hash scope.
reports/final/RESUME_BULLETS.mdandreports/final/INTERVIEW_STORIES.mdremain in.gitignore.- The public Phase 15 build and tests must pass when neither private file
exists in
reports/final.
No-2026 and language guardrails:
- No 2026 holdout data was accessed.
- Guardrail scan found no forbidden holdout path/date-prefix references in Phase 15 final markdown, final reports, final helper, build script, or tests.
- Final markdown includes the exact statement: "2026 remains an untouched temporal holdout."
- No unsupported "profitable" claim appears.
- No unsupported annualization or Sharpe claim appears.
Exact local verification:
PYTHONPATH=src MPLCONFIGDIR=/tmp/microalpha-mpl python scripts/build_phase15_final.py: PASS, generated final metrics, curated figures, final artifact index, and deterministic hashes.python -m pytest tests/unit/test_phase15_final_report.py: PASS,6 passed in 0.02s.python -m pytest: PASS,210 passed, 49 warnings in 4.03s.ruff check src tests scripts: PASS,All checks passed!.python -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash29d8157421a085a12a31c0f77c29b3b09f57cd2663c45513928815977eef1dd8.python -m json.tool reports/final/FINAL_METRICS.json: PASS.- Final markdown link validation: PASS.
- Required final figure existence validation: PASS.
- Phase 15 final report hash recomputation: PASS.
- Phase 15 results hash recomputation: PASS.
Assumptions and limitations:
- Local default
pythonis Python 3.10.9, not Python 3.11. - Phase 15 privacy hardening correction commit
54a1961844e71cf4d80e7c6be3b5007b7716b41ewas pushed toorigin/main. - Python 3.11 GitHub Actions for exact correction commit
54a1961844e71cf4d80e7c6be3b5007b7716b41eare green:testsrun31416979704PASS andresearch-smokerun31416979809PASS. - Phase 15 is synthesis only. It does not add new alpha, change models, change features, retune thresholds, introduce new strategy variants, or rerun execution optimization.
- The final report remains limited by the Phase 1-14 research scope: BTC-USDT only, displayed book only, generic fee overlays, approximate passive queue diagnostics, no hidden liquidity, no self-impact, and no opened 2026 confirmatory holdout.
Status: PASS locally and in Python 3.11 GitHub Actions
Pre-gate:
- Accepted Phase 15 exact commit on
origin/main:1eb43e516366c08165b5ac05d367d0bf342dd82e. - GitHub Actions
tests: PASS, run31417149603. - GitHub Actions
research-smoke: PASS, run31417149604. - Both pre-gate runs are on commit
1eb43e516366c08165b5ac05d367d0bf342dd82eand use the Python 3.11 CI path.
Frozen benchmark plan:
- Plan file:
data/manifests/phase16_performance_plan.yaml. phase16_performance_plan_hash:70fc7a9f1dc3fd80642d0dd83b8d09ba17fd3011be23ba432b92a788a539b350.- Benchmark dates/scopes: bounded non-2026 engineering/development fixtures
representing
2019-12-01book replay and2024-07-01feature/execution paths. - Benchmark interpreter: local
python3reports Python 3.10.9. Python 3.11+ compatibility remains a CI requirement.
Profiled stages:
- Phase 3 book replay.
- Phase 5 feature engineering.
- Phase 11 market execution.
- Phase 11 passive execution.
- Representative two-date orchestration path.
Measured bottleneck:
- Baseline
cProfilefound frozen Phase 5_trade_window_featuresconsumed2.186412557cumulative seconds in the bounded profile,81.9%of profiled Phase 5 runtime. _ofi_window_featureswas also part of the repeated trailing-window aggregation path.
Optimization changes:
- Replaced Phase 5 repeated per-cutoff scans of active OFI/trade windows with deterministic per-window running accumulators.
- Preserved
(T-W, T]membership, cutoff semantics, Decimal output formatting, OFI definition, trade-side semantics, missing-value policy, and downstream schema. - Phase 3 replay, Phase 11 execution, models, signals, execution assumptions, and economic parameters were not changed.
C++ decision:
- C++ was not introduced. Profiling showed a stable Python repeated-work issue that was better fixed with a small Python algorithmic change while preserving a simple fallback/reference path.
Benchmark results, median of three bounded repetitions:
- Phase 5 feature engineering: baseline
1.4930219580419362s, optimized0.2923121249768883s, speedup5.107629244459094x. - Representative two-date orchestration: baseline
2.991125874919817s, optimized0.6055903749074787s, speedup4.939189919220228x. - Phase 3 replay was unchanged; measured optimized/reference variation was
1.1153789158747465x. - Phase 11 market execution was unchanged; measured optimized/reference
variation was
0.9248205971224753x. - Phase 11 passive execution was unchanged; measured optimized/reference
variation was
0.9902838716122426x.
Equivalence evidence:
- Phase 5 reference vs optimized feature CSV SHA-256:
d8503550c2d9c597f488a43bbf9c166f9673ce6db666dd6437b04e004ad4ffcffor both outputs. - Phase 3 deterministic replay hash:
cf2a800a27af5df8b279801638ae3f4c66004b1fd7162585c40581710c10b054. - Phase 11 market execution deterministic artifact hash:
12c26a69b47fa408dd2d3ac6b297bebc9f4566ee1bf471e1284f382cdf7b854a. - Phase 11 passive execution deterministic artifact hash:
e647c4f9377be0d1ab85cbeab3af136c6ed814c8440c250ba28afba4aab45873.
Phase 16 artifacts:
reports/phase16/baseline_benchmarks.csv.reports/phase16/optimized_benchmarks.csv.reports/phase16/profile_hotspots.csv.reports/phase16/equivalence_results.csv.reports/phase16/phase16_summary.json.reports/phase16/PERFORMANCE_ENGINEERING.md.reports/phase16/README.md.- Figures:
reports/phase16/figures/baseline_vs_optimized_runtime_by_stage.png,reports/phase16/figures/throughput_before_vs_after.png, andreports/phase16/figures/hotspot_runtime_contribution.png.
Hashes:
phase16_benchmark_artifact_hash:d7d7ae72b9a02754f30b6c906424994ad4da0cba789af2c53a815bf05645ae59.phase16_results_hash:c86d724e084734ed52bd02c3d6cf6d5e75b16c5e6cecf418f5368bb3b92759f0.
Local validation:
PYTHONPATH=src MPLCONFIGDIR=/tmp/microalpha-mpl python3 scripts/run_phase16_performance.py: PASS.PYTHONPATH=src python3 -m pytest: PASS,215 passed, 49 warnings in 3.39s.ruff check src tests scripts: PASS,All checks passed!.PYTHONPYCACHEPREFIX=/tmp/microalpha-pycache python3 -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash29d8157421a085a12a31c0f77c29b3b09f57cd2663c45513928815977eef1dd8.
GitHub Actions verification:
- Phase 16 implementation commit:
1aa0650cd4b881f16c0166100c226387f387f9fe. - GitHub Actions
tests: PASS, run31521948969. - GitHub Actions
research-smoke: PASS, run31521949016.
Assumptions and limitations:
- Benchmarks are bounded engineering fixtures, not full 24-day reruns.
- Wall-clock performance is reported as local evidence only and is not used as a CI pass/fail threshold.
- Local Python is 3.10.9; Python 3.11 compatibility must be confirmed by GitHub Actions after commit/push.
- No 2026 holdout data was accessed. Phase 16
2026references are guardrails or documentation only. - Private resume bullets and interview-preparation materials remain excluded from Git and public validation. No private career artifact was created, restored, or committed for Phase 16.
Status: PASS locally and in Python 3.11 GitHub Actions
Accepted Phase 16 state:
- Exact Phase 16 current commit:
cda51383f1f41be6fc1243ca828330ab73393b54. - GitHub Actions
tests: PASS, run31522113442. - GitHub Actions
research-smoke: PASS, run31522113477. - Frozen
phase16_performance_plan_hash:70fc7a9f1dc3fd80642d0dd83b8d09ba17fd3011be23ba432b92a788a539b350. - Frozen
phase16_benchmark_artifact_hash:d7d7ae72b9a02754f30b6c906424994ad4da0cba789af2c53a815bf05645ae59. - Frozen
phase16_results_hash:c86d724e084734ed52bd02c3d6cf6d5e75b16c5e6cecf418f5368bb3b92759f0.
Packaging artifacts:
REPRODUCIBILITY.md.DATA_GUIDE.md.RELEASE_CHECKLIST.md.reports/final/PROJECT_SUMMARY.md.reports/final/RELEASE_VALIDATION.json.data/manifests/phase17_packaging_manifest.yaml.
Hashes:
phase17_packaging_manifest_hash:7bfb66e28924d87977d4ce8292666edb3b21603be402f085cc2b892286812f88.phase17_release_artifact_hash:8676bb675086e8c20da5be33e2de8387e8c14a8c94d4eb660dc3a7c7c8b00776.- Release artifact hash scope: README, reproducibility/data/release-checklist docs, public final summary, final report, final metrics, final artifact index, final figures, Phase 16 performance docs/summary/figures, and the Phase 17 packaging manifest.
- Exclusions:
timestamps, runtime measurements, absolute local paths, operational CI run
IDs, private files, and
RELEASE_VALIDATION.jsonitself.
Public/private scan:
- Current Git tree contains no
reports/final/RESUME_BULLETS.mdand noreports/final/INTERVIEW_STORIES.md. - Current repo path contains neither private file.
- Scan found no tracked API keys, credentials, tokens, private-key blocks, raw resume artifacts, cover letters, application notes, recruiter messages, or interview scripts. Remaining references to resume/interview materials are privacy-exclusion documentation only.
Link audit:
- Phase 17 markdown link audit: PASS, broken link count
0. - No public link points to private career files.
Repository-size audit:
- Forbidden large/raw-data tracked paths:
0. - No tracked Parquet outputs, bytecode, profiler dumps, zip/gzip raw sources, caches, model cache files, or environment directories were found.
- Largest tracked files remain curated reports/figures and small regression
fixtures. Top examples:
reports/phase7/bucket_results.csv(827515bytes),reports/phase7/direction_results.csv(735825bytes),data/manifests/research_dates.yaml(165988bytes), andtests/fixtures/real_subsets/tardis_binance_BTCUSDT_incremental_book_L2_2019-12-01_rows_1_2050.csv(153576bytes).
Packaging/build audit:
pyproject.tomlis sensible for package name, description, Python floor, dependencies, dev dependencies, CLI entry points, and package discovery.- CLI entry points:
microalpha-smokeis the primary smoke/reproducibility tool,microalpha-ingestis a data-ingestion tool, andmicroalpha-qais a market-data QA tool. python -m buildis blocked locally because thebuildfrontend is not installed.- Local editable install/build checks are also blocked by the restricted local dependency/network path and lack of a local Python 3.11 interpreter. The project's declared Python 3.11 install path is verified by GitHub Actions.
- The Python floor was not weakened.
Fresh-clone validation:
- Fresh local clone source commit:
cd4025d6724099f4d4e1be863def7b0eddf9ee10. python3 -m pip install -e ".[dev]": BLOCKED locally by restricted PyPI access while resolving build/runtime dependencies.python3 -m pip install -e ".[dev]" --no-build-isolation: BLOCKED locally by restricted dependency resolution forlightgbm.PYTHONPATH=src python3 -m pytest: PASS,218 passed, 1 skipped, 49 warnings in 4.65s.PYTHONPATH=src python3 -m microalpha.cli --manifest-out /tmp/microalpha-phase17-fresh-smoke.yaml: PASS, config hash29d8157421a085a12a31c0f77c29b3b09f57cd2663c45513928815977eef1dd8.- Bounded demo from clone:
PYTHONPATH=src MPLCONFIGDIR=/tmp/microalpha-mpl-fresh python3 scripts/run_phase16_performance.py --output-dir /tmp/microalpha-phase17-fresh-demo/reports --work-root /tmp/microalpha-phase17-fresh-demo/work --repetitions 1: PASS; expectedphase16_summary.json,equivalence_results.csv, and smoke manifest artifacts existed.
Final local validation:
PYTHONPATH=src python3 -m pytest: PASS,219 passed, 49 warnings in 4.88s.ruff check src tests scripts: PASS,All checks passed!.PYTHONPYCACHEPREFIX=/tmp/microalpha-pycache python3 -m compileall -q src scripts tests: PASS.PATH=/tmp/microalpha-config-smoke-venv/bin:$PATH microalpha-smoke --manifest-out /tmp/microalpha-smoke.yaml: PASS, config hash29d8157421a085a12a31c0f77c29b3b09f57cd2663c45513928815977eef1dd8.- GitHub workflow YAML audit: PASS after quoting the workflow
onkey for PyYAML portability while preserving GitHub Actions semantics.
No-2026 confirmation:
- No 2026 data was accessed.
- Phase 17 references to 2026 are holdout-policy guardrails and documentation only.
- Public limitations continue to state that 2026 remains an untouched temporal holdout reserved for a future confirmatory evaluation.
Final release recommendation:
- Recommended release tag after explicit user authorization:
v1.0.0. - No Git tag was created.
- No GitHub Release was created.
GitHub Actions verification:
- Phase 17 validation commit:
5ec5ad399845432189290f8684569b86990e8d56. - GitHub Actions
tests: PASS, run31524414826. - GitHub Actions
research-smoke: PASS, run31524414807.
Next steps:
- Stop. Do not begin new research.
- Do not create a Git tag or GitHub Release without explicit user authorization.