When zero isn't zero
Stopping false high-risk alerts so the real ones get noticed.
Project: Automated trading system (personal) · built with Claude under my direction
The problem
The system kept raising high-risk alerts that weren't real. Alerts nobody trusts get ignored — which is how real problems get missed.
What I found
When a price lookup failed, the failed read was being counted as a price of zero. A position “worth zero” looks like a disaster, so the alert fired.

The fix
- Added a retry for failed price reads.
- Added a last-good-value guard: if a read still fails, use the last real price instead of zero.
- Backed the change with 12 new tests.
Two more like it
- A control panel showed safety switches as OFF while they were running. I had the display corrected so the screen matches what the system does.
- After an upgrade, one monitoring alert could never turn red. I found what it was comparing against and fixed it.
How the system is run
It started with a 10-day paper-trading trial before going live at one-tenth size, with daily caps, kill switches and shadow-first rollouts (new behavior is watched before it's allowed to act).
Takeaway
Monitoring is only useful when it reports accurately in both directions — no false alarms and no missed ones.