CAT researchOverviewEURUSDGBPUSDXAUUSDGBPCADEURCADAUDJPYGBPJPYResearch notes

Pivot tie-rule fix — screen reproduction note

Task 5's report and its reviewer showed that pyakao.pinets._Pivot.update rejected an equal value on either side of a pivot candidate, while Pine's ta.pivothigh/pivotlow(N, N) accepts an equal value among the LEFT neighbours and rejects one only among the RIGHT neighbours. _Pivot.update (pyakao/src/pyakao/pinets.py) was changed to that asymmetric rule (left <=/>= allowed, right strict </>); two new tests (test_pivot_high_accepts_a_left_tie_and_rejects_a_right_tie, test_pivot_low_mirrors_the_tie_rule) were added to pyakao/tests/test_pinets.py and the full suite grew from 301 to 304, all green. This is the only pivot logic in the codebase, and it has two consumers, not one. In entry5m it feeds the 5m-pullback-extreme detection (stop_mode = pullback) and the unused ZTD Swing anchor mode, so every 5m pullback-based screen (v1, v2, v3, v4, v5, v6 all use PivotLow/PivotHigh for pullback-extreme detection regardless of stop_mode) can shift slightly. It is also used by pyakao/src/pyakao/zones.py (PivotHigh(5, 2) / PivotLow(5, 2) feeding last_swing_high / last_swing_low and, through them, Zone.fib_og in the AKAO engine port), so the AKAO zone/fib layer is inside the blast radius too. State that plainly: that path has no regression coverage for ties. pyakao/tests/test_zones.py drives the tracker with hand-written bars that never repeat a swing extreme, and pyakao/tests/test_engine.py builds its bars from random.Random.gauss, whose float64 highs and lows are ties with probability ~0, so neither test would have caught the old rule and neither can confirm the new one. This reproduction re-ran the entry5m screens and the 304-test suite only; the AKAO engine's TradingView golden comparison (pyakao/validation/compare_tv.py), which is the only artefact that would show a zone/fib shift, is not part of it. The six pre-registered entry5m screens (v1-v6) were re-run unchanged (same flags, --no-sensitivity, same data) as a code-fix reproduction, not a new test: verdicts are reported as unchanged/changed against the original pre-registered criteria, not re-judged.

Full reproduction outputs: entry5m/research/repro/v1.md .. v6.md (JSON sidecars are gitignored via entry5m/research/repro/.gitignore).

v1 — primary screen (2026-09-06-entry5m-screen.md)

Symbol n (orig -> repro) net R (orig -> repro) PF (orig -> repro) verdict (orig -> repro)
EURJPY 547 -> 552 -65.3 -> -66.5 0.86 -> 0.86 FAIL -> FAIL
EURUSD 540 -> 556 +53.4 -> +56.7 1.12 -> 1.12 FAIL -> FAIL
GBPUSD 526 -> 537 -30.6 -> -42.0 0.93 -> 0.91 FAIL -> FAIL
XAUUSD 449 -> 456 -17.2 -> -17.9 0.96 -> 0.96 FAIL -> FAIL

Overall: FAIL overall: 0 of 3 groups (need 2) both times.

Conclusion: verdict unchanged (still 0 of 3 groups; the rule remains dead).

v2 — H1-extreme stop (2026-09-06-entry5m-v2-h1stop-screen.md)

Symbol n (orig -> repro) net R (orig -> repro) PF (orig -> repro) verdict (orig -> repro)
EURJPY 343 -> 347 -66.4 -> -71.2 0.77 -> 0.76 FAIL -> FAIL
EURUSD 343 -> 361 +16.1 -> -2.6 1.06 -> 0.99 FAIL -> FAIL
GBPUSD 315 -> 327 +59.3 -> +55.4 1.23 -> 1.21 FAIL -> FAIL
XAUUSD 298 -> 299 -71.9 -> -73.3 0.72 -> 0.72 FAIL -> FAIL

Overall: FAIL overall: 0 of 3 groups (need 2) both times.

Conclusion: verdict unchanged (0 of 3 groups both times; EURUSD's net R flips sign but neither run reaches PF/expectancy thresholds).

v3 — H1-extreme stop + fixed 3R target (2026-09-06-entry5m-v3-fixed3r-screen.md)

Symbol n (orig -> repro) net R (orig -> repro) PF (orig -> repro) verdict (orig -> repro)
EURJPY 406 -> 411 -21.9 -> -23.8 0.92 -> 0.92 FAIL -> FAIL
EURUSD 415 -> 433 +53.9 -> +44.5 1.21 -> 1.16 PASS -> PASS
GBPUSD 388 -> 400 +19.6 -> +6.2 1.08 -> 1.02 FAIL -> FAIL
XAUUSD 356 -> 357 -28.4 -> -29.1 0.89 -> 0.88 FAIL -> FAIL

Overall: FAIL overall: 1 of 3 groups (need 2) both times (group usd PASS on EURUSD carrying it, metal and jpy FAIL).

Conclusion: verdict unchanged (usd group still the lone PASS; overall still FAIL, 1 of 3 needed 2).

v4 — XAUUSD arm bias source (2026-09-06-entry5m-v4-xau-arm-screen.md)

Symbol n (orig -> repro) net R (orig -> repro) PF (orig -> repro) verdict (orig -> repro)
XAUUSD 726 -> 732 -68.3 -> -70.6 0.83 -> 0.83 FAIL -> FAIL

Overall: FAIL overall: 0 of 3 groups (need 2) both times.

Conclusion: verdict unchanged.

v5 — v4 plus scale-out at 1R (2026-09-06-entry5m-v5-xau-scaleout-screen.md)

Symbol n (orig -> repro) net R (orig -> repro) PF (orig -> repro) verdict (orig -> repro)
XAUUSD 797 -> 802 -69.5 -> -74.2 0.81 -> 0.80 FAIL -> FAIL

Overall: FAIL overall: 0 of 3 groups (need 2) both times.

Conclusion: verdict unchanged.

v6 — v3 plus scale-out, EURUSD/GBPUSD (2026-09-06-entry5m-v6-usd-scaleout-screen.md)

Symbol n (orig -> repro) net R (orig -> repro) PF (orig -> repro) verdict (orig -> repro)
EURUSD 474 -> 492 +23.7 -> +13.2 1.11 -> 1.06 FAIL -> FAIL
GBPUSD 450 -> 466 -0.6 -> -6.8 1.00 -> 0.97 FAIL -> FAIL

Overall: FAIL overall: 0 of 3 groups (need 2) both times.

Conclusion: verdict unchanged.

Summary

All six pre-registered screens (v1-v6) reproduce with the corrected pivot tie rule and no verdict changes anywhere — every group verdict and the overall verdict for each variant is identical to the original record. Trade counts and net R figures move by a small amount per symbol (more pullback-extreme candidates now qualify because a left-side tie no longer disqualifies them), consistent with a pivot-detection change that only affects which bars register as a pullback extreme, not the overall pattern of results. The pre-registered criteria were not re-judged; this note only confirms the original verdicts stand under the corrected pivot semantics.