Foundations Nov 28, 2026

What Is Grey Box Trading? Black Box, White Box and the Space in Between

Vishal Dalvi
Vishal Dalvi

If you search for algo trading in India, you will keep running into three boxes. Black box. White box. Grey box.

Let's go through them one by one, in plain words.

Start with the box itself

The idea comes from engineering. A "box" is any system that takes something in and gives something out. The colour tells you how much you can see inside.

A black box shows you nothing. You see what goes in and what comes out, and that is all.

A white box shows you everything. Every rule is written down and you can follow each step.

A grey box sits in between. You understand the logic, but some part of the working is left to judgment.

In trading, the thing going in is market data. The thing coming out is a decision: buy, sell, or do nothing.

Market data goes in, a decision comes out. The colour tells you how much of the middle you can see.

Black box trading

A black box system takes its decisions with rules you cannot see. You put in money, it places trades, and you get a result. Why it bought, why it sold, why it stayed out today, you don't know.

Big institutions run systems like this, built by teams who do know what is inside. For them it is only "black" to outsiders.

For a retail trader it is different. When somebody sells you a ready-made algo and won't tell you the logic, the box is black to you, the person whose money is in it.

I have seen what happens next. Traders follow it for some time and give it up as soon as they see a few bad trades in a row.

They don't have in mind the overall statistics of the system: the win percentage, the average profit and the average loss. In my experience, most trend following strategies make losses in 7 to 8 months of the year and make profits in only 3 to 4. They are looking for a consistent money making machine.

White box trading

A white box system has rules that are fully open. "Buy when price closes above the 50-day average. Exit when it closes below." Anybody can read the rule, test it on old data and get the same trades.

The good thing is that you understand the system fully, in detail. It lets you down when a sideways market kicks in.

Grey box trading

Grey box trading puts a system and a human in the same seat, with clear jobs for each.

The system does what humans are bad at. It follows the rules every single time. It does not get scared after two losses or greedy after two wins. It does not move a stop-loss because of a feeling.

So when does the human step in? For me, it is when the system does not perform the way it is supposed to in the given market condition. For example, take a trend following system. If the market moves up a lot and the system is unable to make money, something is wrong.

Think of a pilot and an autopilot. The autopilot flies most of the journey, because it does not get tired or distracted. The pilot is still in the seat. The pilot decided the route, watches the weather, and takes over when something is wrong. Nobody calls that cheating. That is how flying is done.

The important part is when the human is allowed to act. In a good grey box approach, the thinking happens before the trade, when you are calm. During the trade, the rules run. If the human keeps jumping in halfway through a trade because of fear or hope, the box is no longer grey. It is plain discretionary trading wearing a costume.

Why the human still matters

We have said many times that in trading the bigger problem is us. Fear, hope and greed do more damage than the market does.

So it is fair to ask why we should keep the human in at all.

Because nobody can hand over what they don't understand. If you do not know why your system takes a trade, you will not sit through its losing period. You will drop it and go looking for the next one. Understanding is what lets you stay disciplined.

And markets change. No set of rules stays right forever. Somebody has to notice that, and that somebody has to be a person who understands what the rules were meant to do.

I built a system on Nifty and Bank Nifty in 2014. Its rules were written for the way the index moved in those years. By 2018 the index was no longer moving that way. The system kept following its rules perfectly, but the rules were now answering a market that was not there any more. The structure had changed, and no rule could tell me that. I had to see it myself.

The markets before and after Covid in 2020 are two completely different regimes. Retail participation surged after 2020. That surge, along with weekly expiries and the growth in options trading, has changed the microstructure of how the index moves.

What the regulator says

SEBI's framework for retail algo trading uses two of these words. It came through a circular dated 4 February 2025 and was rolled out in phases after that.

A white box algo, which SEBI also calls an execution algo, is one where the logic is disclosed and can be replicated. A black box algo is one where the logic is not known to the user and cannot be replicated.

The rules are stricter for black box. Whoever provides one has to register with SEBI as a Research Analyst and keep a research report for each algo.

"Grey box" is not a regulatory category. It is a way of working, and it is the one we teach.

Why we are called GreyBox

For most retail traders, the way professionals trade is a black box. You hear that institutions use systems. You never get to see how one is put together.

When I chose the name, my idea was simple. We will open up the black box just enough for you to build your own system.

Just enough, because we are not here to hand you a finished system. A system you did not build is still a black box to you, and you will switch it off in its first bad month. We want to show you how the parts work, so that the one you run is yours and you understand every rule in it.

That is the grey in GreyBox. The Quant is the method: test an idea with data before you trust it with money.

If you are just starting out

You do not need an algo, a broker API or any code to begin working this way. You need three habits.

  1. Write your rule before the trade. Entry, exit, stop-loss and how much you will risk.
  2. Follow it during the trade. No changes halfway.
  3. Review after a set of trades, when you are calm, and change the rule only then.

Rules first, judgment at the right time. That is the whole idea.

Doing it by hand is only the starting point. Once a rule has proved itself to you, hand it to the machine. Let it place the trades, so you don't have to sit in front of the screen all day. We are all for that.

What stays with you is the control. You decide which strategies run, how much they risk, and when to switch one off.

By then the box is no longer black to you, because you built it. And you are still the one watching the market it runs in. That is grey box trading.

Want to practise this without risking money? Try the GreyBox Trading Lab. It scores the quality of your decision, not whether the trade happened to make money.

Source for the regulatory section: Securities and Exchange Board of India, circular "Safer participation of retail investors in Algorithmic trading", SEBI/HO/MIRSD/MIRSD-PoD/P/CIR/2025/0000013, dated 4 February 2025.

This article is for education only. It is not investment advice or a recommendation to buy or sell any security or to use any trading system. Trading in securities and derivatives involves risk of loss.

Tags: Foundations