# Trader Filter Mine (timed): remined on the Excel-rebuild log _Built 2026-10-06 from `trader-log/trades_timestamped.csv`: Excel rebuild, **230 rows**, weekend-dated rows resolved to adjacent trading days. The previous OCR-based run is archived in `archive/run_ocr_2026-10-06_0404/`._ ## Bottom line - **No narrow (3-condition) take-filter survives the Jul–Sep 2026 holdout** once controls are time-symmetric. Model holdout AUC is about 0.5 (tree 0.51, GB 0.49), so condition features barely separate the trader's chosen minute and side from the neighbouring slots. - **Best surviving candidate (broad):** IF price is **within 25 pts of the day extreme in the trade direction** AND the **3-min move in the trade direction is < 5 pts** THEN take ATM that side. Holdout lift **1.24** (22/89 takes, 90% CI 0.84–1.61, P(lift>1) 84%), lift after 09:45 1.27. It's weaker without the weekend rows (1.07). Treat it as a hypothesis, not a validated edge. - **The previously published T1–T4 were opening-bell artifacts.** On the Excel log with the old ±30-min controls they still score 1.5–3.4×, but with symmetric controls they drop to 1.03–1.15×. Near 09:15 the old control window was entirely *later* than the take, so 'small day range so far' or 'near the 5-EMA' just meant 'earlier'. - **Timing is the robust signal:** 09:16–10:00 is over-weighted in both splits (timing lift about 1.8–2.9×) and midday is under-weighted (about 0.7×). The 15:10 '3 PM' slot is over-weighted only in Jul–Sep (2.4×). ## What changed in this remine - **Input:** Excel-rebuilt timestamped log (230 rows: 157 May–Jul + 20 Jul + 53 Aug–Sep). It adds new sessions on 25 May, 01 Jun and 22 Jun, fixes the 25 Jun strikes and changes one Aug–Sep instrument. The old OCR log had 222 rows. - **Weekends:** the 21 weekend-dated rows now sit on their resolved trading days (08 Aug→07 Aug, 16 Aug→17 Aug, 30 Aug→28 Aug, 12 Sep→15 Sep) in the **primary** run. Excluding them is the sensitivity column. - **Symmetric matched controls (new):** for each take at minute m, controls are non-take 5-min slots on the same session within ±min(30, m−1, 370−m) minutes, both sides, plus the opposite side at the exact same minute. Each take's control set has weight 1. The control window can no longer sit entirely after the take (09:15–09:45 entries) or entirely before it. - **Robustness columns (new):** a session-block bootstrap 90% CI on holdout lift, holdout lift using only takes at or after 09:45, and the share of matched takes before 09:45. The old asymmetric design is kept as a sensitivity run (`--asym`). - **Broad filters (new):** a second search where each rule needs ≥ 30 train takes and at most 2 conditions, which gives less noisy lifts. - Unchanged: exact printed IST minute (09:15 fills at 09:16); features from the last completed 1m bar; Sensex → Nifty ATM same side; train May–Jun / holdout Jul–Sep 2026; time features are excluded from condition rules. ## Sample - Takes used: **225** (230 − 4 Gold − 1 no-trade day). Train 136 takes / 34 sessions; holdout 89 takes / 19 sessions, of which 21 are weekend-resolved. - Matched controls: train 1949, holdout 1089. Excluding weekend rows: holdout 68 takes / 15 sessions. - Model check (time-neutral features): holdout AUC tree **0.51**, GB **0.49**. Excluding weekends: 0.51 / 0.50. Old asymmetric design: 0.49 / 0.51. ## Top rules ranked by holdout lift (primary: weekend-resolved, symmetric controls) **lift** = share of takes the rule matches ÷ weighted share of matched non-take slots it matches (>1 means it singles out the trader's chosen minute and side). **after 09:45** = holdout lift using only takes at or after 09:45. **early** = share of matched holdout takes before 09:45. **sim/fire** = ATM option at the next-minute open, SL10/TP20, flat 15:20, option pts per 5-min grid fire. B-rules are broad (≥ 30 train takes), R-rules are narrow. | # | IF (all) THEN take ATM that side | train lift (cov) | **holdout lift (cov)** | holdout 90% CI | P(lift>1) | after 09:45 lift (cov) | early | excl-weekend holdout | old-asym holdout | holdout log WR | fires/day | sim/fire | verdict | |---|---|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---:|---| | R6 | position in day range toward trade side (1=at day high for CE / day low for PE) >= 0.85 AND day range so far < 120 pts AND ATM premium >= 130 | 5.18 (12/136) | **2.25** (4/89) | 0.57–4.33 | 87% | 1.67 (2) | 50% | 2.14 | NA | 75% | 2.1 | -4.00 | too few holdout takes | | R3 | spot vs day open, in trade direction >= 25 pts AND signal-bar body/range >= 0.32 AND day range so far / ATR20 < 0.35x | 5.20 (13/136) | **1.49** (4/89) | 0.23–4.21 | 70% | 2.50 (2) | 50% | 1.11 | NA | 100% | 1.8 | -2.06 | too few holdout takes | | R9 | spot vs day open, in trade direction >= -2 pts AND 5-min spot move in trade direction < 0 pts AND day range so far / ATR20 < 0.35x | 4.87 (13/136) | **1.44** (5/89) | 0.52–3.97 | 76% | 1.44 (3) | 40% | 1.44 | NA | 100% | 3.7 | -3.77 | too few holdout takes | | B1 | spot vs day open, in trade direction >= -2 pts AND day range so far / ATR20 < 0.35x | 2.27 (30/136) | **1.30** (14/89) | 0.74–3.10 | 78% | 0.92 (5) | 64% | 1.14 | 1.58 | 93% | 9.8 | -3.13 | opening-window artifact | | B4 | distance to day extreme in trade direction < 25 pts AND 3-min spot move in trade direction < 5 pts | 2.09 (30/136) | **1.24** (22/89) | 0.84–1.61 | 84% | 1.27 (14) | 36% | 1.07 | 1.56 | 86% | 20.7 | -2.33 | best candidate | | B2 | 30-min spot move in trade direction >= 15 pts AND 15-min OI change of traded ATM leg >= +3% | 2.18 (30/136) | **1.14** (7/89) | 0.42–2.29 | 59% | 0.58 (2) | 71% | 0.81 | NA | 71% | 8.0 | -0.80 | too few holdout takes | | R10 | distance from opposite day extreme (support for CE / resistance for PE) < 100 pts AND position in day range toward trade side (1=at day high for CE / day low for PE) >= 0.85 AND distance to nearest 50-pt round level < 20 pts | 4.70 (14/136) | **1.10** (5/89) | 0.34–2.13 | 57% | 0.85 (2) | 60% | 1.09 | NA | 80% | 6.6 | -3.25 | too few holdout takes | | B6 | distance to day extreme in trade direction < 25 pts AND 15-min OI change of traded ATM leg >= -0% | 1.95 (36/136) | **1.07** (17/89) | 0.74–1.46 | 59% | 1.05 (7) | 59% | 0.91 | 1.12 | 88% | 16.3 | -1.81 | did not hold | - **B1:** Early-day with-open entry: spot is on the trade side of the day open and the day has used < 35% of ATR. About two-thirds of the matched takes are before 09:45, and after 09:45 the lift is < 1. - **B4:** Near-extreme pause: price is within 25 pts of the day high (CE) or day low (PE), but the last 3 min hasn't spiked your way (< +5 pts). It reads as buying the breakout/continuation on a pause, not chasing the candle. This is the only rule whose lift survives after 09:45. The narrow R-rules with high holdout lift (R6 2.25, R3 1.49, R9 1.44) rest on 4–5 holdout takes, and their CIs span well below 1. ## Previously published rules (OCR log) re-scored on the Excel log | prev | rule | prev holdout lift (cov) | Excel log, old ±30 controls: holdout lift (cov) | Excel log, **symmetric** controls: holdout lift (cov) | |---|---|---:|---:|---:| | T1 | 5-min spot move in trade direction >= 0 pts AND spot vs 5-EMA (5m), in trade direction < 4 pts AND day range so far / ATR20 < 0.31x | 3.83 (8) | 3.41 (9/89) | **1.03** (9/89) | | T2 | 15-min spot move in trade direction >= 0 pts AND 30-min spot move in trade direction >= 0 pts AND spot vs 5-EMA (5m), in trade direction < 4 pts | 2.34 (10) | 2.38 (15/89) | **1.15** (15/89) | | T3 | distance to day extreme in trade direction < 50 pts AND spot vs 20-EMA (1m), in trade direction >= 0 pts AND spot vs 5-EMA (5m), in trade direction < 4 pts | 2.02 (9) | 2.00 (13/89) | **1.08** (13/89) | | T4 | distance from opposite day extreme (support for CE / resistance for PE) < 25 pts AND spot vs 20-EMA (1m), in trade direction >= -10 pts AND 15-min OI change of traded ATM leg < +9% | 1.51 (9) | 1.49 (14/89) | **1.09** (14/89) | The Excel rebuild reproduces the old numbers under the old design, so the data change didn't break them. The control design did: their lift was the opening-window time asymmetry. ### Old-design (asymmetric) survivors, for reference | rule | holdout lift (cov) | 90% CI | early | after 09:45 lift (cov) | |---|---:|---:|---:|---:| | distance to day extreme in trade direction < 25 pts AND 5-min ATM premium change < 0 pts AND day range so far / ATR20 < 0.35x | 3.28 (8) | 1.91–5.82 | 75% | 2.00 (2) | | spot vs day open, in trade direction >= -2 pts AND 5-min ATM premium change < 0 pts AND day range so far / ATR20 < 0.35x | 2.34 (10) | 1.16–6.93 | 70% | 1.14 (3) | | 30-min spot move in trade direction >= 0 pts AND signal-bar body/range < 0.42 AND day range so far < 80 pts | 2.26 (10) | 1.22–6.73 | 90% | 0.39 (1) | | 3-min spot move in trade direction < 2 pts AND 30-min spot move in trade direction >= 0 pts AND day range so far < 80 pts | 2.16 (11) | 1.24–5.64 | 91% | 0.38 (1) | | position in day range toward trade side (1=at day high for CE / day low for PE) >= 0.6 AND day range so far < 80 pts AND 15-min OI change of traded ATM leg >= +3% | 1.99 (9) | 1.23–3.32 | 100% | 0.00 (0) | | spot vs day open, in trade direction >= -2 pts AND day range so far < 80 pts AND NOT (any setup detector fired (last 5m)) | 1.81 (9) | 0.94–4.53 | 78% | 0.69 (2) | | spot vs day open, in trade direction >= -2 pts AND day range so far / ATR20 < 0.35x | 1.58 (14) | 0.91–3.71 | 64% | 0.92 (5) | | distance to day extreme in trade direction < 25 pts AND 3-min spot move in trade direction < 5 pts | 1.56 (22) | 1.18–1.87 | 36% | 1.37 (14) | | distance to day extreme in trade direction < 35 pts AND day range so far < 80 pts AND |opening gap| < 150 pts | 1.32 (15) | 0.99–2.04 | 67% | 0.97 (5) | Apart from the near-extreme-pause rule (1.37 after 09:45, 14 takes), every old-design survivor is 64–100% opening takes. After 09:45 each one has ≤ 5 matched takes, and most of those lifts are < 1. ## Timing rule (exact times) | window (IST) | train share | train timing lift | holdout share | holdout timing lift | holdout log WR | holdout sim/take | holdout sim/grid slot | |---|---:|---:|---:|---:|---:|---:|---:| | 09:16-09:30 open | 11% | 2.9 | 8% | 2.1 | 100% | 2.86 | 4.29 | | 09:30-10:00 | 15% | 1.8 | 16% | 1.9 | 86% | 2.86 | -1.86 | | 10:00-11:15 | 29% | 1.5 | 18% | 0.9 | 100% | 1.25 | -1.34 | | 11:15-14:15 midday | 35% | 0.7 | 34% | 0.7 | 67% | 4.52 | -1.41 | | 14:15-14:55 | 2% | 0.2 | 4% | 0.4 | 100% | -2.50 | -2.55 | | 14:55-15:26 3PM | 7% | 0.9 | 20% | 2.4 | 89% | 0.41 | -2.54 | **IF** the time is 09:16–10:00 IST **THEN** you're in the trader's main entry zone (timing lift about 1.8–2.9× in both splits). Midday 11:15–14:15 holds about a third of the takes in half the session (about 0.7×). The 14:55–15:26 window is 0.9× in train but 2.4× in holdout, driven by the 15:10 '3 PM Matka' rows of the Jul/Aug–Sep sheets. ## Which takes won (log WIN vs LOSS, takes only, depth-2 tree) - IF prior ATR20 < 290 pts AND day range so far / ATR20 < 0.43x: train log WR 100% (n=23), holdout 91% (n=35) - IF prior ATR20 < 290 pts AND day range so far / ATR20 >= 0.43x: train log WR 73% (n=11), holdout 80% (n=54) - IF prior ATR20 >= 290 pts AND spot vs day open, in trade direction < 120 pts: train log WR 64% (n=88), holdout NA (n=0) - IF prior ATR20 >= 290 pts AND spot vs day open, in trade direction >= 120 pts: train log WR 100% (n=14), holdout NA (n=0) - Takes on calmer days that have used < 43% of ATR so far won more often in both splits (100%/91% vs 73%/80%). But ATR ≥ 290 occurs only in May–Jun, so this split is partly a regime/period split. ## Reality check: logged vs simulated at the printed minute - Logged: WR **78%**, mean **+50.3** pts per take. - Simulated at the printed minute (ATM, SL10/TP20): WR **36%**, mean -0.43 (train) / +2.46 (holdout) option pts. All other 5-min slots: -0.79 / -1.53. - In holdout the takes beat the average slot by about 4 option pts per trade, so there's some timing value. But a mechanical entry at the printed minute is nowhere near the logged result. Excel times are still mostly round (44 distinct minutes; 09:30 and 10:15 ×19, 09:15 ×15, 15:10 ×13), so the true fill is near, not at, the printed minute. ## Caveats - Small sample: 225 takes / 53 sessions, holdout 89 takes / 19 sessions. A rule covering 20 holdout takes has a CI roughly ±0.4 lift wide. - Weekend-resolved rows (21, all in the holdout) are low-confidence date fixes. They move results: the best candidate's holdout lift is 1.24 with them and 1.07 without. - About 200 rule candidates were searched, so the best train lifts (5×) are inflated by selection. Only holdout numbers mean anything. - 25 Sep strikes sit 1–2% below that day's range, so that date may be off by a session. - Sensex trades are mapped to Nifty ATM, and features are computed on Nifty 1m. Sensex-specific levels are lost. - Train (May–Jun) is a high-ATR regime (ATR20 ≥ 290) and holdout (Jul–Sep) is calmer, so absolute-point thresholds can shift between regimes. ## Files - `results/features.parquet` (primary, weekend-resolved), `features_no_weekend.parquet` - `results/rules.json`, `rules_metrics.csv` (primary, symmetric); `*_no_weekend.*` (sensitivity); `*_asym.*` (old ±30-min design); `prev_rules_rescored.csv` - `results/timing_profile.csv`, `feature_contrast.csv`, `decision_tree.txt`, `taken_aligned.csv`, `trade_inclusion.csv`, `source_selection.csv`, `trades_timestamped.csv` (input snapshot) - `src/build_dataset.py [--no-weekend]` → `src/mine_rules.py [--no-weekend] [--asym]` → `src/rescore_prev.py` → `src/report.py`