Phase 1 · feasibility · AWS c7i.16xlarge, 32 cores · done 2026-10-09
What does a stated stress-testing task cost on a strong CPU?
With incremental evaluation, even the larger task takes 12 minutes against a one-hour line fixed beforehand: H2 is not supported, and the GPU comparison moves to larger tasks.
C++17 · OpenMPbit-exact enginepre-registered 2026-10-07Write-up (opens in a new tab)Engine (opens in a new tab)Raw results (opens in a new tab)
01The decision rule, written before the run
H2 says that even the fastest exact CPU method, not just a full re-run, needs more time than is available. "Full recomputation is slow" does not count as support. The solid row is what happened.
- Fastest exact method finishes in under 1 hour on 32 coresThe CPU is not the bottleneck; the GPU comparison moves to larger tasks.
- Fastest exact method needs over 1 hourH2 is supported for that task; Phase 2 compares CPU and GPU on it.
02What is estimated: a conditional detection rate
pπ(L, q | x) is the share of starts at which policy π reports a new episode inside an injected event. It holds for this series only, is not a damage bound, and on small problems can be computed exactly.
Fig. 1 · One Monte Carlo trial
- 1
Fix one series
A real BTCUSDT series x: a week of 1-s bars or a quarter of 1-min bars.
- 2
Inject a test event
A rise-and-fall of length L and strength q at a start s drawn at random.
- 3
Re-run the policy
Scan, rank, select. A policy sets window lengths, threshold and merge gap.
- 4
New episode inside?
A hit only if centred in the event and absent from the unchanged series.
- 5
Repeat n times
Hits / n estimates the detection rate p(L, q | x) with a 95% interval.
| Task | Policies | Coverage over 8 × 17 cells | Trials per cell | Trials |
|---|---|---|---|---|
| T1-curve | 1 | pointwise 95%, half-width ≤ 0.02 | 2,449 | 333,064 |
| T2-policy-map | 24 | all 3,264 intervals at once | 11,726 | 1,594,736 |
03Controls: what the rate means
| L | q = 0 | q = 8 | q = 128 | price only | volume only |
|---|---|---|---|---|---|
| 2 | 0 | 0.0004 | 0.0004 | 0 | 0.0004 |
| 30 | 0 | 0.0022 | 0.954 | 0.005 | 0.0021 |
| 256 | 0 | 0.0123 | 0.999 | 0.0131 | 0.0181 |
q = 0 never yields a new detection, as defined. One-feature events are rarely caught.
Two-bar events stay near zero even at q = 128: q scales each length's typical range, which is tiny at L = 2.
04Four exact ways to run a trial
Float32 prices, fixed-point volume and integer ranks make every method produce the same bits, so episodes are compared for equality, never within a tolerance. They differ only in how much they recompute.
Fig. 2 · What one trial recomputes
| full | every policy re-scans, re-sorts each length and selects — the reference |
|---|---|
| shared | one scan and ranking shared by all policies |
| tail | ranks only values that can still reach the threshold |
| incremental | recomputes windows overlapping the event, merges them into stored orderings |
05Correct first: 0 mismatching trials of 2,112
- G · real data: shared, tail, incremental vs full, all 24 policies0 / 2,112 differ
sf_test· tie-heavy synthetic data, 18 policies × 42 eventspasscheck_phase0.py· the C++ engine reproduces the Phase 0 top 20match- Four deliberately broken variants4 / 4 caught
G is a measured check, not a proof: on the 1-second week only L = 30 at q = 0 and 128 enter it.
06Full recomputation is not the CPU's floor
At N = 604,800 incremental runs 349× more trials per second than full (criterion ≥ 10×). Its advantage needs a short, local event and a fixed base series; the merged tail still grows with N and lower thresholds.
Fig. 3 · Time per trial vs series length, one thread (log–log)
Fig. 4 · Where the time goes at N = 604,800
07Using all cores: one trial per thread
Fig. 5 · Parallel efficiency at 32 threads (median)
Trials are independent, so they are split across threads. Tail passes narrowly (0.68–0.75 by repetition). 64 threads add 1.11–1.50×, unused in the projections.
08Can the interval method be trusted?
On a 64,000-bar prefix every start was enumerated, giving exact rates. No cell fell below the coverage floor of 0.931. The exact curves are not monotone: 12 of 360 strength steps lower the rate, so bisection for a threshold has no guarantee.
Fig. 6 · Exact detection rates by enumeration
| Half-width | n per cell | Pointwise min | All 432, unadjusted | All 432, Bonferroni |
|---|---|---|---|---|
| 0.05 | 402 | 0.945 | 0.111 | 0.995 |
| 0.02 | 2,449 | 0.940 | 0.042 | 0.994 |
09Verdicts
The times behind the figure at the top, then every hypothesis with its pre-set criterion. F4 checked the projection only for the trial loop, so the end-to-end claim stays partial until Phase 2 measures it.
| Task | Series | full | shared | tail | incremental |
|---|---|---|---|---|---|
| T1 · 1 policy | 1-min quarter | 48.5 min | — | 12.1 min | 11.1 s |
| T1 · 1 policy | 1-s week | 4.0 h | — | 52.6 min | 42.9 s |
| T2 · 24 policies | 1-min quarter | 3.1 days | 3.9 h | 1.0 h | 3.0 min |
| T2 · 24 policies | 1-s week | 15.2 days | 19.4 h | 4.7 h | 12.1 min |
| Hypothesis | Criterion → result | Verdict | |
|---|---|---|---|
| G | Fast methods return the same episodes as full | 0 / 2,112 differ | passed |
| F1 | Full recomputation is not the floor | ≥ 10× criterion, result 349× | supported |
| F2 | Small-N cost models predict N = 604,800 | ≤ 20% criterion, result worst 19% | supported |
| F3 | Parallel efficiency at 32 threads | ≥ 0.7 criterion, result 0.72 | supported |
| F4 | Projection matches an end-to-end run | ≤ 15% criterion, result ≤ 4.4%, loop only | partial |
| E1 | Intervals keep coverage against exact rates | ≥ 0.931 criterion, result 0.940 | supported |
| H2 | Fastest exact CPU needs more than 1 hour | > 1 h criterion, result 43 s / 12.1 min | not supported |
| H1, H3, H4 | Policy comparison; GPU time and error | no GPU, no damage bound yet | not tested |
10What Phase 1 establishes, and what it does not
Established
- A defined target rate with controls and an exact reference
- Four bit-identical methods; the fastest 349× faster
- Both stated tasks within minutes, by a rule fixed in advance
- Rates not always monotone in strength
- CPU algorithm choice alone: T2 from 15 days to 12 minutes
Not established
- Anything about the GPU (H3, H4)
- A lower bound on CPU time
- Complete end-to-end task runs
- Generality: one asset, two periods, one machine
- Damage bounds or group-level policies (H1)
Next, in Phase 2
- Incremental CPU at 32 and 64 threads as the baseline
- A persistent task runner, timed end to end
- Trials fixed by (cell, trial id) on every device
- Larger tasks, each with criteria set before measuring
Full write-up and every limit: docs/phase1.md (opens in a new tab) · Phase 2 protocol: experiments/phase2-gpu (opens in a new tab).