How jonathan0926x/strategy-falsification-lab works
Strategy Falsification Lab is a command-line research tool for testing one frozen SPY monthly trend rule against a matched buy-and-hold benchmark, with execution costs and diagnostics. The workflow starts with a user-supplied licensed dataset and provenance manifest, validates its schema and exchange-session coverage, simulates the rule, calculates performance, runs registered stress and selection checks, then writes run artifacts and a paper. The README also documents the closed-data-gate status and limits on empirical claims. Some CLI and report wiring is unsampled; edges below rely on shown calls, indexed references, or README statements.
Main entry points: cli.py CLI workflow · stress.py Stress suite · backtest.py Execution simulator · schema.py Bar schema
Components 16
Data controls
- CLI workflow
src/falsification_lab/cli.py - Frozen plan
configs/frozen_plan.yaml - Bar schema
src/falsification_lab/data/schema.py - Data manifest
src/falsification_lab/data/manifest.py - Session coverage
src/falsification_lab/data/coverage.py
Strategy simulation
- Monthly SMA signal
src/falsification_lab/strategies/monthly_sma.py - Execution simulator
src/falsification_lab/engine/backtest.py - Cost and result models
src/falsification_lab/engine/models.py
Falsification diagnostics
- Performance metrics
src/falsification_lab/metrics/performance.py - Stress suite
src/falsification_lab/validation/stress.py - Block bootstrap
src/falsification_lab/validation/bootstrap.py - PBO analysis
src/falsification_lab/validation/pbo.py
Results and reporting
- Paper generator
src/falsification_lab/reports/build_report.py - Run artifacts
Other components
- Researcher
- Licensed market CSV
Connections 24
- Researcher → CLI workflow: runs commands
README.md - Researcher → Licensed market CSV: provides data
README.md - CLI workflow → Frozen plan: reads configuration
README.md - CLI workflow → Bar schema: validates bars
src/falsification_lab/cli.py - CLI workflow → Data manifest: builds provenance
src/falsification_lab/cli.py - CLI workflow → Session coverage: checks coverage
src/falsification_lab/cli.py - CLI workflow → Execution simulator: simulates runs
src/falsification_lab/cli.py - CLI workflow → Cost and result models: configures costs
src/falsification_lab/cli.py - CLI workflow → Performance metrics: calculates statistics
src/falsification_lab/cli.py - CLI workflow → Stress suite: runs diagnostics
src/falsification_lab/cli.py - CLI workflow → Paper generator: builds paper
src/falsification_lab/cli.py - CLI workflow → Run artifacts: writes ledgers
src/falsification_lab/cli.py - Licensed market CSV → Bar schema: supplies observations
README.md - Data manifest → Bar schema: validates input
src/falsification_lab/data/manifest.py - Session coverage → Data manifest: checks latest session
src/falsification_lab/data/coverage.py - Session coverage → Bar schema: raises validation errors
src/falsification_lab/data/coverage.py - Execution simulator → Monthly SMA signal: gets month signals
src/falsification_lab/engine/backtest.py - Execution simulator → Cost and result models: creates results
src/falsification_lab/engine/backtest.py - Performance metrics → Cost and result models: reads result type
src/falsification_lab/metrics/performance.py - Stress suite → Execution simulator: runs scenarios
src/falsification_lab/validation/stress.py - Stress suite → Performance metrics: measures outcomes
src/falsification_lab/validation/stress.py - Stress suite → Block bootstrap: estimates uncertainty
src/falsification_lab/validation/stress.py - Stress suite → PBO analysis: estimates selection risk
src/falsification_lab/validation/stress.py - Paper generator → Run artifacts: renders saved results
README.md