BLACK LABELAcademy
← Our Failures

Never prune the data your engines learn from, and never use a banned feed: archive bars append-only so the system warm-starts from history instead of booting cold

intermediate6 min read · updated 2026-06-20

Market & numbers — every figure sourced

warmup_blind_window600 secondsest: Engine config from our own incident: WARMUP_SECONDS=600 — engines run blind for ~10 minutes after every restart because they archive bars but do not replay them on boot

Never prune the data your engines learn from, and never use a banned feed

The signal-generating engines in this system learn from market history: backtests, edge-proving, and warmup all depend on a continuous, trustworthy record of price bars. Two cheap-looking decisions can quietly destroy that record — deleting old data to "save space," and pulling history from a convenient-but-untrusted feed. Both are forbidden here, and the reason is the same: the data your system learns from is not disposable infrastructure. It is the product. This entry covers what we tried, what broke, the fix, and how to apply the rule anywhere you keep a learning corpus.

What we tried

Two tempting shortcuts kept resurfacing:

Both feel like harmless plumbing. Neither is.

What broke

The fix

1. Make the store physically append-only. The canonical bars table uses an idempotent insert that refuses to mutate existing rows:

```sql

INSERT INTO bars (symbol, ts, open, high, low, close, volume)

VALUES (...)

ON CONFLICT (symbol, ts) DO NOTHING;

```

`ON CONFLICT ... DO NOTHING` leaves any pre-existing row exactly as it was and raises no error, which makes re-ingesting the same window safe and idempotent (PostgreSQL INSERT docs). Crucially, choose `DO NOTHING`, not `DO UPDATE`: `DO UPDATE` would let a later, possibly-wrong write clobber a good bar. The conflict key `(symbol, ts)` is the immutability guarantee.

2. Ban retention/prune crons on the learning corpus. There is no `DELETE FROM bars` in production — the only deletes that exist are tests cleaning up their own rows. Append-only logs treat the data as a permanent, sequential record you can re-consume after a crash rather than a buffer you trim (QuestDB: append-only storage; Write-Ahead Log). Keep a second permanent copy too — each engine appends its own `bars_log.csv` — so the corpus survives a database mishap.

3. Pin the trusted feed; allow no fallback to the banned one. The real feed (here, WealthCharts via the Chrome CDP bridge) is the only source, enforced in config rather than left to runtime choice: `DATA_FEED=chrome`, `DISABLE_YAHOO=true`, and no Yahoo seed for warmup. A "fallback feed" is not a safety net — it is a path through which untrusted data enters the permanent store. Forbid it explicitly.

4. Warm-start from the history you already kept. This is the payoff. On boot, replay stored bars during the existing warmup window instead of waiting blindly. Replaying a log to reconstruct current state is exactly what append-only storage is for (Azure Event Sourcing), and for large histories a snapshot plus a short tail of recent bars keeps rehydration fast. Done right, an engine restart costs near-zero blind time because it rehydrates from `bars` before the first live tick.

Apply it

Sources

© 2026 Black Label · Education, not financial or legal advice. Every number is sourced or labeled an estimate. Subscribe for $30/month