DEV Community

maymay5692
maymay5692

Posted on

The Real Goal of Building a Trading Bot: Removing Yourself from the Loop

The Real Goal of Building a Trading Bot: Removing Yourself from the Loop

Disclaimer: Not financial advice. I trade with small amounts and have lost money. This article discusses behavioral finance concepts, not guaranteed strategies.

I built a crypto trading bot to make money. After months of running it, I've realized the money is almost beside the point. The real value is something I didn't expect: the bot removes me from the decision-making loop, and that turns out to be worth more than any prediction algorithm.

Here's what I mean.

The 8-Loss Streak

Week one of live trading. Eight consecutive losing trades. Every single one closed red.

At $33 in capital, the financial damage was a few cents per trade. But here's what happened inside my head:

Trade 5 (loss): "Maybe I should switch strategies."

Trade 6 (loss): "The backtest was probably overfitting."

Trade 7 (loss): "What if I manually override just this one trade?"

Trade 8 (loss): "I should double the position size on the next one to make it back."

That last impulse — doubling down after losses — has a name. It's called revenge trading. And it's one of the three things that kill trading accounts.

I didn't act on any of those impulses. Not because I'm disciplined. Because the bot doesn't have an input field for "I'm frustrated, let's go bigger." The bot checked the moving averages, saw no buy signal, and did nothing. It didn't know about my losing streak. It didn't care.

The streak ended when a trend finally emerged. Trade 9 was a winner that covered all eight losses and then some. Exactly how a trend-following strategy with a 35% win rate is supposed to work.

If I had been trading manually, I probably would have revenge-traded on trade 6, oversized on trade 7, and been done before trade 9 ever happened.

The Three Killers

Behavioral finance research has cataloged dozens of cognitive biases that affect trading. But in practice, three of them do most of the damage:

1. The Disposition Effect — Selling Winners, Holding Losers

Kahneman and Tversky showed that people feel losses about 2.5 times more intensely than equivalent gains. In trading, this manifests as:

  • Selling winners too early — A trade goes up 2% and you grab the profit because you're afraid of giving it back.
  • Holding losers too long — A trade is down 3% and you refuse to sell because "it might come back."

The result: your winners are small and your losers are big. The exact opposite of what a profitable strategy needs.

My EMA Crossover bot has a 35% win rate but a 3.2:1 risk-reward ratio. The average win is +3.5%, the average loss is -1.1%. That only works if you let winners run and cut losers fast. A human doing this manually would have to fight the Disposition Effect on every single trade.

The bot doesn't fight it. It doesn't have it. When the moving averages cross, it exits. No internal debate about "maybe it'll come back."

2. Revenge Trading — Chasing Losses

After a loss, the emotional impulse is to "make it back" on the next trade. This usually means:

  • Increasing position size
  • Taking trades that don't meet your criteria
  • Switching strategies mid-stream

Research from Barber and Odean found that retail traders who traded most frequently earned annual returns 6.5 percentage points lower than those who traded least. The frequent traders weren't finding more opportunities — they were revenge trading.

The bot trades the same size every time. It doesn't know whether the last trade won or lost. It evaluates the current signal with zero memory of past pain.

3. The Freeze — Doing Nothing When You Should Act

The flip side of revenge trading. After a painful loss, some traders freeze. They see a perfectly valid signal, hesitate, and miss it. Then the missed trade turns out to be the big winner that would have covered everything.

This happened to me before I had the bot. I'd see a setup, remember the last loss, and think "I'll wait for a better one." The better one never came, or I hesitated on that one too.

The bot doesn't hesitate. Signal fires, order executes. No gap between analysis and action.

What the Research Says

The impact of behavioral biases on trading performance isn't theoretical. Some numbers:

  • Disposition Effect cost: Odean (1998) found that investors who held losers and sold winners earned 3.4% less annually than the market. The held losers continued to underperform by an average of 1% over the following year.

  • Overtrading cost: Barber and Odean (2000) showed that the most active retail traders underperformed the market by 6.5% annually after costs.

  • Emotional decision cost: A Dalbar study consistently finds that the average equity investor underperforms the S&P 500 by 1.5-3% annually, primarily due to poorly timed buy/sell decisions driven by emotion.

These aren't flaws in strategy selection or market analysis. They're flaws in execution — the gap between knowing what to do and actually doing it under emotional pressure.

A bot closes that gap to zero.

The Bot as Bias Removal Device

Here's the reframe that changed how I think about my trading bot:

The bot's primary function isn't prediction. It's bias removal.

The EMA Crossover strategy is simple — almost boring. Two moving averages, a cross, buy or sell. There's nothing sophisticated about the signal generation. A beginner could understand it in five minutes.

But the execution is where the value lives:

Human Trader Bot
Sells winners early (Disposition Effect) Holds until exit signal
Holds losers hoping for recovery Exits at first reversal signal
Increases size after losses (revenge) Same size every trade
Freezes after painful loss Executes every valid signal
Checks portfolio 20 times a day Checks once per hour, acts only on signal
Skips trades when "feeling uncertain" No feelings to skip on

The prediction accuracy of the strategy is the same whether a human or a bot executes it. But the net result is different because the human leaks returns through behavioral errors.

Robert Carver, former portfolio manager at Man Group's AHL and author of Systematic Trading, puts it well: the value of systematic trading isn't finding better signals — it's ensuring consistent execution of adequate signals. A mediocre strategy executed perfectly will beat a great strategy executed emotionally.

What This Changed for Me

Before the bot, I tracked my trades manually. I had a spreadsheet. I followed the same EMA Crossover rules. In theory, my results should have been identical to the bot's backtest.

They weren't. I was about 1.5% per month worse than the backtest suggested. Why?

  • I skipped two trades because "the market felt weird"
  • I exited one winner 24 hours early because I was nervous about a news event
  • I held one loser for an extra day because "it was so close to breaking even"

Four behavioral errors in one month. Each one small. Together, they wiped out most of my edge.

The bot has been running the same strategy for months now. It doesn't skip trades. It doesn't exit early. It doesn't hold late. The results are closer to the backtest — not identical (slippage, fees, market conditions differ), but much closer than my manual execution ever was.

The Honest Limitation

The bot removes my biases. It doesn't remove its biases.

A backtest can be overfit. A strategy can be regime-dependent. Parameter choices reflect the builder's assumptions. The bot executes faithfully, but if the underlying strategy is flawed, the bot will faithfully execute a flawed strategy.

I wrote about this in my previous article — none of my 49 backtested strategies survived statistical correction. The DSR analysis showed that after testing 49 strategies, even my best performer (SR 1.30) couldn't be statistically distinguished from luck.

So the bot isn't a magic box. It's a consistent box. Consistency is valuable when the strategy has any edge at all. But proving that the edge is real — that's the harder, unsolved problem.

If Fighting Your Emotions on Every Trade Sounds Exhausting

There's a reason I started sending my bot's signals to a free Telegram channel. The same signals the bot trades — BTC/USDT, SOL/USDT, ETH/USDT — delivered daily, with the indicator values and consensus logic explained.

For those who want the full indicator breakdowns, individual strategy votes, and circuit breaker status in real time, there's a premium tier.

Not everyone wants to build their own bot. Some people just want the signals without the emotional tax of staring at charts. That's a valid choice.

The Real Goal

I started building a trading bot to make $100 a month. The bot currently makes under $2 a month on $39 in capital. By that metric, it's a failure.

But by the metric of "has it improved my decision-making?" — unambiguously yes. It removed me from the loop on trades where my presence was actively harmful. It turns out that for a small trader with limited capital, removing behavioral errors is worth more than any fancy prediction algorithm.

The bot's edge might be small. It might not even be statistically significant. But whatever edge exists, the bot captures 100% of it. I was capturing maybe 60%, and leaking the rest through fear, impatience, and the very human desire to "do something" when the right answer was "do nothing."

Small edge, full capture beats large edge, partial capture. Every time.


Links

References: Kahneman & Tversky (1979), Odean (1998), Barber & Odean (2000), Carver "Systematic Trading" (2015). Built with Python, ccxt, and Claude Code.

Top comments (0)