Backtest showed nine lakh profit, bug fix turned it into a loss

The YouTube videos all start the same way. Someone in a rented car, or a hotel balcony, telling you the market is a machine that prints money if you just know the system. Buy at the open, sell the breakout, let the algorithm do the work while you sleep. They show a screen full of green.

I wanted to believe it. So I did the thing almost none of them actually do. I built the machine and tested it honestly.

This is what happened.

The setup

I am not a trader. No interest in it, no patience for learning the jargon or the math. Math was never my favourate, but I can build. So instead of learning to trade, I built an agent to trade for me. Call it Kubera. A bot wired into a real broker account, real Indian stocks, real prices, running on its own server.

The plan was simple and exactly what the videos sell. Opening range breakout. The stock makes its first move in the first few minutes. Five large-cap stocks and small fixed bet. Directives which were clear so that the AI does what i ask it to do

Then, before risking a single rupee, I made it prove itself on years of past data. That last step is where every YouTube strategy quietly dies.

What we tried

I did not test one strategy. I tested eighteen.

Opening range breakout. Then the same with filters for bad days, for trend, for volume. Mean reversion. Gap fade. Moving-average crossovers. Pivot bounces. RSI extremes. Bollinger, Donchian, MACD, Keltner, anchored VWAP. Every textbook idea you have ever seen in a thumbnail with a red arrow on it.

Each one was run across eighteen stocks. Each of those across multiple time windows, train on one stretch of history, test on the next, slide forward, repeat. This is called walk-forward testing. It is the difference between “it worked once” and “it works.”

The rule for survival was plain. To pass, a strategy had to make money in every test window. Not on average. Every one.

Eighteen trading strategies tested every way, zero survived
Eighteen strategies, hundreds of test runs. Nothing survived.

Zero survived.

The best of the losers was a gap-fade that made money in one window out of two, and still ended in the red by a hundred and twenty five rupees. The classic opening range breakout, the one the videos love most, was the single worst performer. It lost over seven thousand rupees in testing. Adding mid-cap stocks to find “less efficient” markets did not help. The losses just got bigger.

So the headline strategy was dead. Proven twice, by two independent runs.

The part that nearly fooled me

Then I tried swing trading. Holding for days instead of minutes. And something lit up.

The backtest came back glowing. The top strategy showed a net profit of nine lakh eighty three thousand rupees. A seventy nine percent win rate. Profitable in all four test windows. This was the green screen. This was the video.

For about a day I thought we had it.

Then I went back and read the code line by line.

Backtest showed nine lakh profit, bug fix turned it into a loss
The strategy “made” nine point eight lakh. One bug fix turned it into a loss.

There was a bug. A small one. The part of the code that tracks the highest price a stock has hit was never resetting between trades. An old peak from years ago sat frozen in memory, above every new trade, and the maths quietly used it to fake perfect exits at impossible prices. Same-day wins of a hundred percent. Trades that opened and closed on the same date at a price that never existed.

The entire edge was the bug.

I fixed it. One function, reset between positions. Ran it again. The same strategy that “made” nine point eight lakh now lost one lakh sixty thousand. The seventy nine percent win rate fell to thirteen.

The profit was never real. It was a typo with a confident face.

This is the thing the videos never show you. Not because they are hiding a working system. Because most of them never tested theirs hard enough to find the bug. They saw the green screen, made the video, and moved on.

What it actually costs

Here is the other number nobody puts in the thumbnail.

Even if a strategy had worked, I had already done the honest maths on the prize. A genuinely good year on a small account like this is maybe two to six thousand rupees of profit. A bad year, a loss of five hundred to fifteen hundred.

The server to run the bot costs five to ten thousand rupees a year.

Cost to run the bot was larger than the best-case profit
In a good year, the best case, the machine makes less than it costs to run.

Read that again. In a good year, the best case, the machine might make less than it costs to keep the machine running. The expected value was negative before a single trade was placed. The house edge here was not the market. It was my own electricity bill.

What came out

The account is still sitting at zero rupees. I never funded it. The bot never made or lost a single rupee of real money, because the honest testing killed every strategy before it could.

That sounds like failure. It is the opposite. The whole point of building Kubera was to protect me from the exact trap the videos set. The one where you fund the account on a backtest that looks like nine lakh, go live, and find out in real time that it was thirteen percent.

So the outcome is this. Three weeks of building. Eighteen strategies. Hundreds of test runs. One beautiful illusion caught one day before it could cost me anything. Net real loss, zero.

The market did not beat me. The testing did. And that is the only reason I still have my money.

The actual lesson

The money videos are not lying about whether markets can be beaten. Some people beat them. They are lying by omission, about what beating them actually requires, and about how rare it is, and about how much of what looks like edge is just a bug nobody bothered to find.

The work was never the problem. Building the bot was the easy, fun part. The hard part was being willing to read my own code and let it tell me the green screen was fake.

Most people are not willing. That is the whole business model.

I built the machine they sell. It told me to keep my money in my pocket. Best trade I never made.

I did all this paperless with old datasets and asking AI to take decisions, unlike others, neither i am full time trader or can claim that this test defines anything. Probably you are a geek and making millions behind your computed using something completely different. Please reach out to me and let me know. I am seeker and everything which has anything to rise onself, i am open to it.

Leave a Comment