pit-release-gate
Completeness-aware release control for staggered-arrival cross-sectional data.
When the entities of a cross-section report on staggered dates — companies filing
financial statements are the canonical case — any same-period cross-sectional signal
computed before the last filer arrives is estimated from an incomplete, and possibly
selectively incomplete, cross-section. If filing timing depends on the very
disturbance the signal measures, releasing early produces a systematic bias
(incomplete-cross-section leakage), while a blanket wait-for-the-deadline rule removes
the bias at a timeliness cost paid by every signal, biased or not. pit-release-gate
measures each signal's susceptibility to this bias — a disturbance-conditional partial
correlation fitted honestly on prior completed periods — and grades the required
completeness per signal, so benign signals release early and susceptible signals are
withheld until enough of the cross-section has arrived to suppress the bias.
Install
pip install pit-release-gate # once published to PyPI
# or, from a source checkout:
pip install .
Requires Python 3.10+ (numpy, pandas, scipy).
Quickstart (30 seconds)
import numpy as np
from pit_release_gate import SusceptibilityGate, ReleaseController, make_group
rng = np.random.default_rng(0)
# 1. Fit the susceptibility gate on prior COMPLETED periods (honest estimation:
# never on the period being gated — its cross-section is still incomplete).
train = [make_group(c_a=0.3, c_x=0.7, rng=rng) for _ in range(10)]
gate = SusceptibilityGate(threshold=0.10)
rho = gate.fit_trailing(train)
# 2. Gate a fresh, live period with the frozen estimate.
controller = ReleaseController(gate=gate)
live = make_group(c_a=0.3, c_x=0.7, rng=rng)
decision = controller.run_until_release(live, policy="gated")
print(f"rho_hat={rho:+.3f} -> {decision.action} "
f"at completeness {decision.completeness:.0%} ({decision.policy})")
To gate your own data, build an AsOfDataStore from your design matrix, signal
values, and per-entity filing-arrival times, then call
ReleaseController.decide(store, t) at each evaluation time — it returns
WITHHOLD, REWEIGHT_RELEASE, or RELEASE plus the released values.
The known-ground-truth demo
The package ships a self-contained worked example with a planted leakage strength, so the right answer is known exactly and no licensed data is needed:
pit-release-gate # or: python -m pit_release_gate
It compares five release policies (naive, threshold, reweight, deadline,
gated) on four signal types. Headline behavior:
| signal | susceptibility ρ̂ | gated releases at | gated bias |
|---|---|---|---|
| Clean | ≈ +0.005 (benign) | 36% completeness | ≈ 0 |
| Composition (selection on observables only) | ≈ −0.036 (benign) | 39% completeness | ≈ 0 |
| Mild leak | ≈ −0.53 | 88% completeness | −0.099 (naive: −0.319) |
| Strong leak | ≈ −0.87 | 100% (deadline) | exactly 0.0 (naive: −0.386) |
A sensitivity sweep of the policy slope κ shows the timeliness–bias dial:
κ = 0.5 → release at 59% completeness (bias −0.229); κ = 1.0 → 83% (−0.118);
κ = 2.0 → 100% (bias exactly 0). The demo is deterministic (fixed seed), and
tests/test_reproduces_paper.py asserts these numbers.
Papers
The method and its evaluation are developed in three public papers:
- Correct-by-Construction Factor Computation: A Verifiably Point-in-Time Engine for Tradeable Signals — doi:10.6084/m9.figshare.32952482
- Measuring Incomplete-Cross-Section Leakage: A Matched Placebo, a Susceptibility Screen, and Evidence from Taiwan and US As-Filed Data — doi:10.6084/m9.figshare.33061955
- Susceptibility-Graded Release Control: Preventing Incomplete-Cross-Section Leakage in Financial Machine-Learning Pipelines without a Blanket Timeliness Penalty — doi:10.6084/m9.figshare.33158615
This package is the reference implementation of paper 3's release controller; its demo reproduces the paper's controlled experiment.
Cite this
See CITATION.cff. If you use this software, please cite paper 3:
@article{wu2026releasecontrol,
title = {Susceptibility-Graded Release Control: Preventing Incomplete-Cross-Section
Leakage in Financial Machine-Learning Pipelines without a Blanket
Timeliness Penalty},
author = {Wu, Kuan-Ta and Wu, Kuan-I},
year = {2026},
doi = {10.6084/m9.figshare.33158615}
}
License
MIT — see LICENSE.
Patent pending: this software implements techniques described in pending U.S. patent applications. The MIT license above governs use of this code.
Max Well Apex LLC — maxwellapexlab@proton.me
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pit_release_gate-0.1.0.tar.gz.
File metadata
- Download URL: pit_release_gate-0.1.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e936def6efe9b41c43371bfe75bad4c5334d8b29a2d4e3537715b06d106f9afd
|
|
| MD5 |
237b9436db271e09dfad94c80104426e
|
|
| BLAKE2b-256 |
849af6e33eaea14bffcd90dce7ffeba214a64bd1bddcec0168c2141bd97237a9
|
Provenance
The following attestation bundles were made for pit_release_gate-0.1.0.tar.gz:
Publisher:
publish.yml on MaxWellApexLab/pit-release-gate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pit_release_gate-0.1.0.tar.gz -
Subject digest:
e936def6efe9b41c43371bfe75bad4c5334d8b29a2d4e3537715b06d106f9afd - Sigstore transparency entry: 2491783368
- Sigstore integration time:
-
Permalink:
MaxWellApexLab/pit-release-gate@2526379d2be26e2e6c555909dc378ca868791b4a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/MaxWellApexLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2526379d2be26e2e6c555909dc378ca868791b4a -
Trigger Event:
release
-
Statement type:
File details
Details for the file pit_release_gate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pit_release_gate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e8a462b2259e89c92e39bce10b4e4da27073d4fa760b23945554edbe7ec3579
|
|
| MD5 |
d99c3267b85e873efdaf4306e8830373
|
|
| BLAKE2b-256 |
5bb0d290ddd4c71c8e67ab62f6c13ad35df41cbc8a17d87fedcd94506bc850a0
|
Provenance
The following attestation bundles were made for pit_release_gate-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on MaxWellApexLab/pit-release-gate
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pit_release_gate-0.1.0-py3-none-any.whl -
Subject digest:
6e8a462b2259e89c92e39bce10b4e4da27073d4fa760b23945554edbe7ec3579 - Sigstore transparency entry: 2491783881
- Sigstore integration time:
-
Permalink:
MaxWellApexLab/pit-release-gate@2526379d2be26e2e6c555909dc378ca868791b4a -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/MaxWellApexLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2526379d2be26e2e6c555909dc378ca868791b4a -
Trigger Event:
release
-
Statement type: