1. The Limits of Manual Trading — Why I Decided to Build an Algorithm



When most people start trading stocks, they share a similar belief: read the charts, follow the news, pick a stock that looks promising, and buy it. But after a few months of actually putting money on the line, a different reality sets in. There's a wide gap between knowing something in your head and actually executing it with your hands. This is the story of how I confronted that gap, and how it eventually led me to build my own algorithmic trading system from scratch.




Why You Can't Cut Losses — And It's Not About Willpower




People often say "you can't cut your losses because you're weak-willed." But after enough real trading, you realize this isn't a willpower problem at all. The moment a person sees a loss with their own eyes, the brain produces a response remarkably similar to physical pain. Behavioral economists call this loss aversion — the psychological tendency to feel a loss far more intensely than an equivalent gain.



The real problem is that this psychological response kicks in at exactly the worst possible moment for decision-making. As losses grow larger, people cling to the thought "maybe if I just wait a little longer, it'll recover," and keep pushing back their stop-loss point until the damage becomes far worse. The opposite happens with gains — fear that "if I don't sell now, it might drop" causes people to sell far too early. The result is a pattern that's statistically the worst possible outcome: losses run long, gains get cut short.



I repeated this pattern more times than I'd like to admit while trading manually. In my head, I knew I had to "stick to the rules" — but the moment red numbers flashed on the screen, that resolve crumbled easily. This experience became the starting point for thinking seriously about algorithmic trading.




What Algorithms Can Solve — And What They Can't




The core advantage of algorithmic trading is simple: it executes predetermined rules without emotion. When a take-profit level is hit, it sells. When a stop-loss level is hit, it sells. There's no human hesitation to creep in and whisper "just a little longer."



But this isn't a magic bullet. For an algorithm to work well, the rules themselves need to be statistically sound to begin with. Mechanically executing a poorly designed rule can create losses faster and more precisely than a hesitant human ever could. So building an algorithm isn't really a coding problem first — it's the problem of translating your own trading principles into clear, numerical conditions.



As I'll cover later in this series, the first version of my grid trading strategy had a structural flaw where losses grew exponentially in the later stages. Discovering and fixing that flaw taught me that building an algorithm isn't simply "making the computer buy and sell automatically" — it's about precisely translating your trading principles into numbers.




Why I Decided to Build It Myself




There are already plenty of automated trading solutions and quant platforms on the market. I still chose to build my own from scratch, for two reasons.



First, the patterns I'd observed from my own trading — like a surging stock pulling back once before breaking through to a new high — didn't fit neatly into the templated strategies offered by off-the-shelf solutions. Second, I believed there was a kind of understanding you can only gain by writing the code yourself. If you define, line by line, exactly what conditions trigger a signal and why, you at least avoid ending up in a situation where you don't understand why a trade happened.



Korean brokerages provide OpenAPIs that let individual traders receive real-time market data and place orders automatically based on defined conditions. In the next post, I'll cover exactly what this API is, and how an individual trader can use it to build their own trading system.




Today's Investing Insight — Loss Aversion




According to Prospect Theory, published in 1979 by behavioral economists Daniel Kahneman and Amos Tversky, people feel losses roughly 2 to 2.5 times more intensely than equivalent gains. In other words, the pain of losing $100 outweighs the joy of gaining $100 by a wide margin. This asymmetry is the core theory behind why investors tend to hold losing positions far too long while selling winning positions far too early. Simply being aware of this bias when setting your trading rules can help you catch an emotional decision before you make it.



---



This post documents a personal journey of building an algorithmic trading system and is not a recommendation of any specific stock or strategy. All investment decisions and their outcomes are the sole responsibility of the investor, and past strategies do not guarantee future results.

Comments