Skip to content

PEN-TEST-001 — Phase 11a Pennant criteria A/B (Baseline vs V1)

Field Value
Test ID PEN-TEST-001
Date 2026-05-11
Strategy (detection-only — no strategy simulation)
Cohorts produced DET-BASELINE-2026-05-11, DET-V1-2026-05-11
Status complete

Purpose

Side-by-side comparison of the production bull-pennant detector under current criteria (Baseline: pennant 5–15, flagpole 1–10) vs proposed tightened criteria (V1: pennant 10–20, flagpole 1–5) over the 2007–2026 historical dataset. Detection-only — no strategy simulation, no trade ledgers, no P&L. The goal was to quantify how much per-event quality the variant adds at the cost of how many events.

Method

run_ab.py mutates the production pydantic config in-process (approach (a) from the report) and calls uriel.detect.pennant._detect_for_ticker(...) per ticker. No production code or pattern_events rows are touched. Events are written to parquet; forward-30 outcomes (MFE / MAE / endpoints) are computed inline using the same anchor-relative formula as uriel.outcomes.profiler._profile_one_event.

Headline

V1 cuts event volume 71 % (15,534 → 4,533) with the hit-rate at +15 % MFE essentially unchanged (~27 % both). Edge per event is roughly flat; the variant trades raw count for noise reduction without delivering a per-event quality lift.

Files in this directory

  • run_ab.py — harness driver (the script that produced the run)
  • analyze.py — statistics + markdown emitter
  • run.log — harness log
  • run.stdout.log — captured stdout (event counts per ticker, etc.)
  • summary.json — headline JSON for downstream tooling
  • report.md../../reports/Pennant/pennant_criteria_ab_test_2026-05-11.md

Cohort outputs (canonical location)

Detection-event parquets do not live in this directory — they live in cohorts/:

  • Pennant/cohorts/DET-BASELINE-2026-05-11/{events,outcomes}.parquet
  • Pennant/cohorts/DET-V1-2026-05-11/{events,outcomes}.parquet
  • F-001 — V1 cuts volume 71 % without improving per-event hit-rate.

Reproducer

cd /home/kungfujones/Projects/Uriel/build_v1 && source .venv/bin/activate
cd /home/kungfujones/Projects/Uriel/Pennant
python tests/2026-05-11_PEN-TEST-001/run_ab.py

Note: the script writes output paths relative to its own location. Re-running today would write into this directory rather than into the cohort directories. The cohort parquets are the canonical artifacts; the script is preserved here as the reproducer.