Skip to main content

Alpha Reality Check

Evidence-first diagnostics for strategy decay, concentration risk, and backtest-to-live gaps.

Not another backtester. Alpha Reality Check audits trade-level results you already have. It does not fetch market data, generate strategies, optimize parameters, connect to an exchange, or execute trades.

The project is an early v0.1 MVP. Its deterministic reference policy is a review aid—not a statistical truth and not evidence that a strategy will make money.

30-second quick start

pip install alpha-reality-check
alpha-rc demo

Input

UTF-8 CSV with two required columns:

exit_time,pnl,symbol,stage,regime
2025-01-01T12:00:00Z,1.25,ASSET_A,backtest,calm
2025-01-02T12:00:00Z,-0.40,ASSET_B,backtest,volatile

pnl is the net PnL of one closed trade. Optional columns are symbol, stage, fees, slippage, regime, side, and strategy_id. Column names can be mapped in YAML; see input-schema.md.

Invalid timestamps, non-finite PnL, duplicate rows, and invalid configuration fail explicitly. Missing optional dimensions produce warnings and only disable the related analysis.

Commands

alpha-rc audit trades.csv
alpha-rc audit trades.csv --config policy.yaml --json result.json --markdown report.md
alpha-rc compare --backtest backtest.csv --paper paper.csv --live live.csv
alpha-rc demo
alpha-rc validate-config policies/reference.yaml
alpha-rc schema
alpha-rc --version

Example terminal summary:

Decision: CONTINUE | Decision scope: overall | Trades: 80 | Expectancy: 0.669388

Machine-readable JSON separates decision-scope metrics from overall_metrics, stage_metrics, and regime_metrics. It also includes stage comparisons, every evaluated gate, explicit warnings, and input metadata without absolute local paths.

Decisions

Decision Meaning
CONTINUE The supplied sample satisfies every applicable continue gate in the reference policy.
WATCH Evidence is insufficient or mixed; this is not automatically a negative result.
PAUSE A decay or concentration warning crossed a pause threshold.
REJECT The sample floor and multiple negative conditions were met.

Decision priority is REJECT > PAUSE > WATCH > CONTINUE. Defaults are documented in reference-policy.md and can be overridden with YAML. --fail-on supports never, watch, pause, and reject; the default is never.

Backtest / paper / live comparison

When stage is available, the audit computes metrics by stage and reports target-minus-source gaps for expectancy, profit factor, win rate, and absolute drawdown. The preferred comparisons are backtest → paper, paper → live, and backtest → live. Missing stages remain not_available.

The top-level decision always uses the highest evidence stage present in the fixed order live > paper > backtest. Its decision_scope, metrics, reason codes, and gates are based only on that stage; lower stages never supplement its sample count. Without a valid stage, the scope is overall. The audit and compare commands share this behavior.

alpha-rc compare \
  --backtest results/backtest.csv \
  --paper results/paper.csv \
  --live results/live.csv

What it measures

  • expectancy, profit factor, win rate, cumulative PnL, and drawdown;
  • deterministic bootstrap probability that mean trade PnL is positive;
  • recent-versus-history expectancy decay;
  • top-five winner and largest-symbol profit concentration;
  • stage and regime breakdowns.

See methodology.md for definitions.

Limitations

The tool does not prove causality, statistical significance, execution quality, or future profitability. An iid trade bootstrap may be inappropriate for serially dependent strategies. PnL units and data completeness are the user's responsibility. Read limitations.md before using a decision in a review process.

Nothing in this repository is investment advice.

CI use

A minimal reusable shell step is documented in ci-usage.md. The repository's own test matrix covers Python 3.11, 3.12, and 3.13 on Ubuntu.

Contributing

Issues and focused pull requests are welcome. Start with CONTRIBUTING.md and follow the code of conduct.

Roadmap

The next candidates are documented in ROADMAP.md. They are plans, not promises. v0.1 intentionally excludes Web UI, databases, cloud services, market-data downloads, optimization, and trading.

中文简介

Alpha Reality Check 是一个“证据优先”的策略结果审计 CLI:读取你已有的交易 CSV,检查收益衰减、赢家集中度以及回测到模拟/实盘之间的落差。它不是回测器, 不连接交易所、不下单,也不承诺盈利。默认决策规则只是透明、可修改的参考政策。

License

Apache-2.0.

Metadata

Release files for alpha-reality-check 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for alpha-reality-check 0.1.0
File Size Uploaded
alpha_reality_check-0.1.0.tar.gz 39.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for alpha-reality-check 0.1.0
File Interpreter ABI Platform
alpha_reality_check-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 68.9 kB

Release files / alpha_reality_check-0.1.0.tar.gz

Download URL alpha_reality_check-0.1.0.tar.gz
Size 39.9 kB
Tags Source
SHA-256 checksum
How to use checksums
55f6d5ed41d326a203703140373bbcb24396bad12bbcfd0591d46e82a3f72139
BLAKE2b-256 checksum
How to use checksums
47fa30bebf4f9a1a2056dece79d6afe73bb09302d2d8e834608f264abc16e92e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release files / alpha_reality_check-0.1.0-py3-none-any.whl

Download URL alpha_reality_check-0.1.0-py3-none-any.whl
Size 29.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e82858e00a189990262b44303470d401c36ec9005a02a3b40dc4b803e8518eff
BLAKE2b-256 checksum
How to use checksums
35ed31d844a9b82af3713f7a3c12b1f2a9438b6f4739cf85c89dc2af5b7311cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 14, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page