The Psychology Behind Booms, Busts and Bad Decisions
Query optimisation is not the only place where precision matters. Investors, like developers, work with incomplete information and must make decisions under uncertainty. The difference is that engineers have compilers to catch logical errors; investors only get feedback after the trade clears. That asymmetry creates fertile ground for cognitive biases to compound, often invisibly, until a crash makes them obvious in retrospect.
Kahneman and the Architecture of Judgment
The most useful framework for understanding financial error comes from the behavioral insights of Daniel Kahneman. Kahneman's decades of research with Amos Tversky established that human cognition operates through two systems: System 1, which is fast, automatic and associative, and System 2, which is slow, deliberate and analytical. System 1 dominates everyday behaviour because it is efficient; the problem is that it substitutes easy questions for hard ones. "Is this stock likely to keep rising?" becomes "Has this stock risen recently?" without the thinker noticing the substitution. System 2 could correct this, but it is effortful and frequently skipped. The result is a systematic lean toward decisions based on recent patterns rather than probabilistic reasoning.
The Streak Problem
One of the clearest manifestations of this lean is the gambler's fallacy — the false belief that a streak is "due" to end. A coin that has landed heads ten times in a row does not have a higher probability of landing tails on the eleventh flip; each toss is independent. Yet investors consistently over-weight recent performance, expecting continuation when a stock has risen and reversal when it has fallen, neither expectation grounded in the specific dynamics of the underlying business. Kahneman's work explains why: System 1 excels at detecting patterns, and once it identifies one, it predicts its continuation. The correction — recognising that short-run market moves are largely noise — requires System 2 to interrupt, which it often fails to do under the emotional pressure of watching a position move.
Stories Over Statistics
Even when investors try to reason analytically, the narrative fallacy — our hunger for a tidy story that explains the chart — distorts the analysis. Humans are meaning-making machines: we are uncomfortable with randomness and actively construct causal stories to make sense of sequences. In markets this creates a bias toward explanatory narratives that are far neater than the underlying reality. A stock rises because of a great product launch; it continues rising because "the market finally gets it." The narrative becomes unfalsifiable: any subsequent rise confirms the story, any fall is dismissed as temporary misunderstanding. The gambler's fallacy and the narrative fallacy often reinforce each other — the story supplies the reason to expect the streak to continue.
The Halo That Blinds
Cultural and reputational factors compound both errors through letting one shining trait color the whole judgement. When a company is genuinely beloved — for its products, its brand, its founder — that positive affect transfers to every other dimension of the investment case. Strong product becomes evidence of strong management, which becomes evidence of a durable moat, which becomes evidence of a reliable earnings trajectory, none of these inferences examined independently. Brands that retail investors identify with emotionally attract premium valuations that often bear little relationship to the financial metrics underlying them.
All Four Biases in a Single Episode
The clearest recent case study is the GameStop short squeeze of early 2021. The stock's price rose from roughly $20 to nearly $500 in weeks, driven by a coordinated retail buying campaign that forced short-selling funds to cover their positions. Kahneman's dual-process failure was visible in real time: the narrative fallacy supplied a compelling David-versus-Goliath frame. The halo effect made a culturally beloved video-game retailer look like a sound investment. The gambler's fallacy had late buyers expecting the run to continue simply because it already had. The short squeeze had genuine mechanical logic — but the psychological layer determined who participated at what price, and most retail participants who bought near the peak suffered serious losses once the mechanical pressure dissipated. Understanding that these four biases compound each other, rather than operating in isolation, is the first step toward catching them before they catch your portfolio.