← Results index

Re-audit ADL Volume-Ratio experiment — Pine UVOL/DVOL >22 fidelity

2026-08-18T14:30:00Z Experiment completed Re-derived Pine ADL Volume Ratio UVOL/DVOL daily >22 (request.security D close, timeframe=5 input unused vs D request) tick-for-tick and verified 0 date drift vs prior qm-4bx.17/22 (both 24 triggers 259 active hw20 on 1996-04-19→2026-08-11; pinned 15-row fixture with 22-edge and DVOL-zero cases passes); audited on maximal native span the sparse buy-only signal (0.8/yr, 3.4% active, sum5 max 5.08 never hits 22, MA collapse at 22) is +65% vs SMA200 and walk-forward both halves +25% but brittle and sparse, rejected for risk-off promotion and published as a qm-kdnj experiment with parity metrics and generic-exit harness.

Objective

Re-derive the ADL Volume Ratio signal exactly as the pinned Pine defines it (USI:UVOL/USI:DVOL daily close ratio >22, timeframe=5 declared but not wired to request.security D), re-audit existing experiments qm-4bx.17 (overlay) and qm-4bx.22 (signal) for signal-date fidelity, fix any date/definition drift (ratio construction, timeframe ambiguity, threshold strictness, aggregation, calendar, hysteresis, lookahead, ffill, holding window), persist inputs offline to data/market.sqlite with provenance, and republish under the qm-kdnj experiment-as-strategy contract with strategy parity plus notebook narrative and generic-exit harness for the one-way buy signal.

Approach

Froze Pine verbatim: upvol=request.security(USI:UVOL,D,close), downvol=request.security(USI:DVOL,D,close), upratio=upvol/downvol, adl_vol_buy_signal=upratio>ratiothold with ratiothold=22 and timeframe=5 not wired to D request. Documented request.security D close as dividend/split-unadjusted TV daily close, calendar tradingview daily, timezone UTC normalized, frequency D, field close, adjustment n/a, available at close executable next_close (+1 bar, no lookahead). Distinguished documented rule (tickers, D close, threshold 22, strict >) from inference (timeframe=5 → daily primary vs 5-day sum sum(UVOL,5)/sum(DVOL,5) alternative not primary, no HMA/EMA/MA, no quantile/sigma/hysteresis, no execution in Pine — all probes). Updated backtest/adl_vol_ratio.py docstring to full verbatim + semantics + documented-vs-inference + timeframe ambiguity note (already Pine-correct implementation of adl_vol_buy_signal strict >22 level hb1 and adl_volume_ratio daily vs sum5 vs ma). Verified tick-for-tick via new research/fixtures/adl-vol-ratio-pine-fixture.csv (15 rows hand-computed ratio >22 strict, exact 22 false, just-above true, DVOL zero → NaN false, sum5 5-bar NaN) and tests/test_adl_vol_ratio.py::test_adl_pine_fixture_tick_for_tick. Audited maximal native span USI:UVOL 1996-04-19→2026-08-11 7616 rows and USI:DVOL 1992-01-02→2026-08-11 8643 rows (ratio 7616) via read_ohlcv mode=ro + query_only; confirmed prior vs corrected triggers 24 vs 24, active 259 vs 259, 0 mismatches, evaluator _signal_adl_vol_ratio mirrors adl_vol_buy_signal on unified SPY calendar 8428 days. Ran full robustness matrix (thresholds 8/12/15/22/30/40, sum5/MA collapse at 22, hysteresis level hb1 vs hb2/3, holdings 5/10/20/40/60, extra lag +1 bar, falsification random/inverted, subperiod walk-forward, NASDAQ r=0.69 probe, synthetic NO-GO). Kept signal assessment separate from strategy-overlay harness; for buy-only paired generic opposite signals SPX<50DMA/<200DMA/50-200 cross/trailing-stop 10% and reported head-to-head generic-only vs signal+generic deltas on same window/costs/lag via BacktestConfig.allocatesmartly().

Files changed

Validation

Results

Fidelity frozen and validated: Pine daily UVOL/DVOL >22 strict level hb1 hw20 next_close is tick-for-tick correct. Date-fidelity audit on maximal native span shows 0 mismatches vs prior qm-4bx.17/22 (both 24 triggers 259 active hw20 on 7616 ratios 1996-04-19→2026-08-11; evaluator vs direct delta 0; pinned fixture passes). Baseline 24 triggers (2007-09-18→2025-04-09) 3.4% native, 2.97% unified 8709, ratio mean 1.79 std 2.71 max 70.2 sum5 max 5.08. Robustness: threshold 15 best 13.42 vs 22 13.39 vs 30 9.27 vs 40 8.34 brittle; sum5 at 22 never fires and all MA 3/5/10/20 collapse to 0 (only raw daily fires) — flagged; holdings monotonic 5:7.63 10:8.89 20:13.39 40:17.54 60:18.62 optimization risk; extra lag +1 bar 14.50 vs 13.39 not destructive; falsification random 10 trig 7.94 vs 13.39 (-40%) and inverted 48 trig 9.67 (-27%) pass; walk-forward both halves +25% (9 and 15 trig); GFC +10.9% 2011 +7.8% COVID 0% 2022 +0.13%. Generic-exit harness (buy-only → SPX<50DMA/<200DMA/50-200 cross/trailing-stop 10%) head-to-head on same window/costs/lag: SMA200 generic-only 8.11 → signal+generic 13.39 +65% Sharpe 0.63→0.73, SMA50 9.02→12.85 +42%, cross 7.85→11.02 +40%, trailing 9.45→13.10 +38%, B&H 19.28→19.28 0%. Synthetic pre-1996 NO-GO (close-only store Volume=0, counts not volume, Bloomberg licensed rejected). Disposition rejected for risk-off-indicators/v1 (sparse not regime, brittle, sparse power) but SHIP as signal via risk-signals/v1 (buy-signals-v1.json adl-vol-ratio, signals/history.json, docs/signals.html generic selector 3 signals). Published as qm-kdnj experiment-as-strategy with frozen implementation and provenance, promotable via qm-kdnj harness only if OOS Deflated Sharpe with fixed hw20 passes.

Links

Source artifact: research/results/qm-kdnj.2.md