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.

10 s1 min10 min1 h1 day10 days1-hour decision lineT1 · 1 policy1-min quarter48.5 min11.1 sT1 · 1 policy1-s week4.0 h42.9 sT2 · 24 policies1-min quarter3.1 days3.0 minT2 · 24 policies1-s week15.2 days12.1 min10 s1 min10 min1 h1 day10 days1-hour decision lineT1 · 1 policy 1-min quarter48.5 min11.1 sT1 · 1 policy 1-s week4.0 h42.9 sT2 · 24 policies 1-min quarter3.1 days3.0 minT2 · 24 policies 1-s week15.2 days12.1 min
Projected time to solution on 32 cores from measured throughput; the trial loop was checked within 5%. All four methods return identical results; only their cost differs.

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.

  1. Fastest exact method finishes in under 1 hour on 32 coresThe CPU is not the bottleneck; the GPU comparison moves to larger tasks.
  2. 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. 1

    Fix one series

    A real BTCUSDT series x: a week of 1-s bars or a quarter of 1-min bars.

  2. 2

    Inject a test event

    A rise-and-fall of length L and strength q at a start s drawn at random.

  3. 3

    Re-run the policy

    Scan, rank, select. A policy sets window lengths, threshold and merge gap.

  4. 4

    New episode inside?

    A hit only if centred in the event and absent from the unchanged series.

  5. 5

    Repeat n times

    Hits / n estimates the detection rate p(L, q | x) with a 95% interval.

TaskPoliciesCoverage over 8 × 17 cellsTrials per cellTrials
T1-curve1pointwise 95%, half-width ≤ 0.022,449333,064
T2-policy-map24all 3,264 intervals at once11,7261,594,736

03Controls: what the rate means

Lq = 0q = 8q = 128price onlyvolume only
200.00040.000400.0004
3000.00220.9540.0050.0021
25600.01230.9990.01310.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

fullscan every cell,sort each row againincrementalrecompute the cellsthe event touches, mergeinto stored orderingsinjected eventrows: window lengths (15 in the engine) · columns: starts (604,800)full scan and rank every cellincremental only cells the event touchesinjected eventrows: window lengths (15) · columns: starts (604,800)
A window overlaps the event if it starts within its own length before it, so the touched cells form a triangle; the rest keep their stored rank.
fullevery policy re-scans, re-sorts each length and selects — the reference
sharedone scan and ranking shared by all policies
tailranks only values that can still reach the threshold
incrementalrecomputes 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 eventspass
  • check_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)

0.11101001,00016k64k256k604,800ms per trial, 1 thread (log)series length N, bars (log)full1,180.55 mstail224.27 msincremental3.36 ms0.11101001,00016k64k256k604,800ms per trial, 1 thread (log)series length N, bars (log)full1,180.55 mstail224.27 msincremental3.36 ms
K = 15, one policy, L = 30, q = 16, setup excluded. Tail alone gives about 5×.Phase 1, section 3 · tables.md (opens in a new tab)

Fig. 4 · Where the time goes at N = 604,800

full1,180.55 msscan 147.1 · rank 1,025.57 · select 7.87 ms
tail224.27 msscan 147.16 · rank 70.12 · select 7.16 ms
incremental3.36 msscan 0.04 · rank 1.87 · select 1.44 ms
Ranking is 87% of a full trial; in incremental, merging (1.87 ms) and selection (1.44 ms) remain.

07Using all cores: one trial per thread

Fig. 5 · Parallel efficiency at 32 threads (median)

Phase 1, section 4 (opens in a new tab)

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

L = 6 bars00.250.50.75148163264128L = 30 bars48163264128L = 120 bars48163264128exact rate pstrength q (log)K = 15, s_min = 3K = 8, s_min = 2K = 15, s_min = 1.5default: K = 15, s_min = 2L = 6 bars00.250.50.75148163264128L = 30 bars00.250.50.75148163264128L = 120 bars00.250.50.75148163264128exact rate pstrength q (log)K = 15, s_min = 3K = 8, s_min = 2K = 15, s_min = 1.5default: K = 15, s_min = 2
Four of 24 policies, gap 60. s_min = 1.5 and 2 coincide and K = 8 nearly does, so the dashed lines lie on the default.Phase 1, section 5 · estimator_cells.csv (opens in a new tab)
Half-widthn per cellPointwise minAll 432, unadjustedAll 432, Bonferroni
0.054020.9450.1110.995
0.022,4490.9400.0420.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.

TaskSeriesfullsharedtailincremental
T1 · 1 policy1-min quarter48.5 min—12.1 min11.1 s
T1 · 1 policy1-s week4.0 h—52.6 min42.9 s
T2 · 24 policies1-min quarter3.1 days3.9 h1.0 h3.0 min
T2 · 24 policies1-s week15.2 days19.4 h4.7 h12.1 min
HypothesisCriterion → resultVerdict
GFast methods return the same episodes as full0 / 2,112 differpassed
F1Full recomputation is not the floor≥ 10× criterion, result 349×supported
F2Small-N cost models predict N = 604,800≤ 20% criterion, result worst 19%supported
F3Parallel efficiency at 32 threads≥ 0.7 criterion, result 0.72supported
F4Projection matches an end-to-end run≤ 15% criterion, result ≤ 4.4%, loop onlypartial
E1Intervals keep coverage against exact rates≥ 0.931 criterion, result 0.940supported
H2Fastest exact CPU needs more than 1 hour> 1 h criterion, result 43 s / 12.1 minnot supported
H1, H3, H4Policy comparison; GPU time and errorno GPU, no damage bound yetnot 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).