The Loss That Was Never There

One morning, my trading bot’s monthly report told me it had lost almost everything — a drawdown of nearly 99%, in a matter of weeks. My stomach dropped before my brain caught up.

It hadn’t lost anything. The money was all still there. What I was staring at wasn’t a loss; it was my own code failing to count — and it sent me chasing a catastrophe that had never happened.

The number that made my stomach drop

The report was unambiguous. Month-to-date, the account was down to a sliver of where it had started. Every instinct said do something: tighten risk, cut size, pull the plug. A number that large doesn’t invite analysis — it demands reaction.

And that is the trap, because reacting to a number you haven’t verified is exactly how a measurement bug becomes a real one. I was one panicked decision away from damaging a perfectly healthy account in order to “save” it from a loss that existed only in a column of my own arithmetic.

What the code was actually measuring

The flaw was almost embarrassingly simple. My accounting tracked exactly one thing: the cash balance. When the bot bought an asset, the money left the cash column — correctly — but nothing put the value of what it had just bought back onto the books. So the instant it deployed most of the account into a position, the ledger watched the cash disappear and recorded it as a near-total loss.

The position was right there. Fully intact. Worth what had just been paid for it. The code simply wasn’t looking at it.

In other words, the bot treated buying as losing. Spend ninety percent of your cash on an asset and, to a ledger that only counts cash, you have just lost ninety percent of your money. The -99% wasn’t a market event or a bad trade. It was the account staring at its own holdings and refusing to recognize them as worth anything.

A wrong ruler poisons every measurement

Here is why this was worse than a cosmetic display glitch. Almost every number you care about in a trading system descends from a single quantity: equity, the total value of the account. Drawdown is a function of equity. Returns, the meaning of a win rate, risk limits, the Sharpe ratio you will one day brag about or despair over — all of them inherit their truth from how you define what the account is worth.

Define that one quantity wrong and every metric downstream doesn’t merely shift; it becomes fiction. My drawdown chart was vivid, detailed, and entirely imaginary. A broken ruler doesn’t hand you slightly wrong answers — it hands you confident, precise, wrong ones, which are far more dangerous than obviously-broken ones because they look exactly like truth.

Why I believed a number I never checked

In an earlier post I wrote about almost believing an absurdly good result, because some greedy part of me wanted it to be real. This was the mirror image, and it taught me the symmetry the hard way: fear short-circuits verification even faster than greed does.

A flattering number at least leaves you a little time to admire it before you check. A terrifying one doesn’t. It pushes you straight from seeing to acting, skipping the one step — verifying — that would have saved the day. Greed makes you gullible slowly. Fear makes you gullible instantly. Both end in the same place: trusting a number you never audited.

Chasing a catastrophe that didn’t exist

The real damage was never the bug. It was what I did in response to it. For days I treated the phantom loss as real and went hunting for the strategy flaw that must have “caused” it. I second-guessed sizing. I tightened limits that did not need tightening. At one low point I came close to loosening safety checks just to stop them from reacting to losses that were never happening — proposing to fix a measurement bug by disabling the guards that exist for real ones.

That is the quiet menace of a broken ledger: it does not sit still being wrong. It actively recruits you into bad decisions, because every reaction feels justified by the number in front of you. You can do real harm to a healthy system while sprinting to repair damage that lives entirely in your accounting.

The fix: count what you own

The repair was a single idea — mark to market. Equity is not the cash sitting idle; it is the cash plus the current value of everything the account is holding. A buy is a transfer: money becomes asset of equal worth at the moment of purchase, not a loss. Once the ledger valued open positions, the -99% evaporated, because it had never described anything real. The account had been fine the entire time. Only its self-image was broken.

It is worth sitting with how small that fix was against the size of the panic it ended. A few lines to value what the account already owned, and an entire fictional catastrophe simply disappeared.

Trust your ruler before you trust your results

The lesson I kept is the unglamorous twin of every flashy one: before you can trust a result — good or bad — you have to trust the instrument that produced it. A strategy evaluated through broken accounting isn’t being evaluated at all. It’s being described by a random number generator in a lab coat.

So measurement comes first now, ahead of strategy, ahead of optimization, ahead of all the parts that feel like the real work. When a system shows me something dramatic, my first question is no longer “what did the strategy do?” It is “do I actually believe this number?” More often than is comfortable, the drama turns out to be in the ruler.

A bot that can’t count what it owns will lie to you in the most convincing way there is — with precision. And some of the most expensive losses are the ones you panic into chasing before you have checked whether they were ever real.

— No signals, no returns, not investment advice.