abtrade
Beginner guide

Algorithmic trading, from scratch.

Every strategy starts the same way — someone notices what looks like a pattern. The real question is never whether the story sounds good; it's whether it survives real data, real costs, and the cold test of chance. This guide takes you from that first hunch to thinking like a quant, in plain language.

It starts with a hunch

Picture this. You watch the market for a few weeks and spot something: stocks that jump 5% at the opening bell often keep drifting higher through the day. Feels like an edge. So you start trading it by gut — some days you buy, some days you hesitate — and after a month you're up a little. Was that skill, or just a good month? Trading by gut can never answer that. It's tangled up with emotion, memory plays tricks, and you can't re-run the experiment. That's the wall discretionary trading hits.

What makes it algorithmic

Now write the hunch as an exact rule: every day, buy the five biggest gap-ups at 9:15 and sell them all by 3:30. No judgment, no exceptions. A computer can follow it — which means it can be tested on years of history in seconds and run the same way every single day. That's algorithmic (or systematic) trading: strategies precise enough to be code. The magic isn't the automation — it's that a rule you can write down is a rule you can test honestly, without fooling yourself. That's the only kind of strategy abtrade works with.

The simplest trade: owning a slice of a company

Start with the basics. A share is a small piece of a company — buy it low, sell it higher, keep the difference. Betting a stock will rise is going long. You can also profit when a stock falls: borrow shares, sell them now, buy them back cheaper later, return them, and pocket the gap. That's going short. Long and short are the two primary colours; everything more exotic mixes from here.

Derivatives: contracts built on top of the market

A derivative is a contract whose value comes from — derives from — something else, usually a stock or an index. Two reasons they exist: leverage (control a large position with little cash) and hedging (insurance against a move you fear). The simplest is a future: an agreement to buy or sell the underlying at a set price on a set date. Long a Nifty future and Nifty rises, you gain; it falls, you lose — both ways, amplified. Powerful and unforgiving: leverage multiplies losses exactly as fast as gains.

Options: the right, not the obligation

Options are where it gets interesting — and where most beginners get hurt. An option is the right, but not the obligation, to buy or sell the underlying at a fixed price (the strike) before a deadline (expiry). For that right the buyer pays the seller a fee — the premium. Two kinds (call / put) × two sides (buy / sell) give four basic positions. Here's each, with the same ₹1400 stock so you can feel the difference:

Buy a CallBullish
The right to BUY at a fixed price. You want the stock to rise.
Reliance is ₹1400. You buy the ₹1400 call for a ₹20 premium. It climbs to ₹1500 → the call is worth ₹100, you net +₹80. It sits below ₹1400 → it expires worthless and you're out just the ₹20, never a rupee more.
Max profit
Large — grows with every rupee above the strike.
Max loss
Capped at the ₹20 premium.
Buy a PutBearish
The right to SELL at a fixed price. You want the stock to fall.
Same ₹1400 stock. You buy the ₹1400 put for ₹20. It drops to ₹1300 → the put is worth ₹100, you net +₹80. It stays above ₹1400 → the put expires worthless and you lose only the ₹20.
Max profit
Large — grows as the stock falls.
Max loss
Capped at the ₹20 premium.
Sell a CallBearish / neutral
You collect the premium, betting the stock WON'T rise above the strike.
You sell the ₹1400 call and pocket ₹20 up front. Reliance stays below ₹1400 → you keep the whole ₹20. But it rockets to ₹1500 → you owe the ₹100 difference, netting −₹80, and it only gets worse the higher it climbs.
Max profit
Capped at the ₹20 premium collected.
Max loss
Large / unlimited — grows as the stock rises.
Sell a PutBullish / neutral
You collect the premium, betting the stock WON'T fall below the strike.
You sell the ₹1400 put and collect ₹20. Reliance holds above ₹1400 → the ₹20 is yours. It crashes to ₹1300 → you're forced to buy high, a ₹100 loss, netting −₹80.
Max profit
Capped at the ₹20 premium collected.
Max loss
Large — grows as the stock falls.
The whole game in one idea
A buyer risks a small, known premium for a shot at a big payoff. A seller collects that premium up front but shoulders the large — sometimes unlimited — risk. Nobody's giving money away; they're pricing probability. Knowing who's on which side of that trade is most of what options are about.

Where beginners fool themselves

Knowing the instruments is the easy half. The hard half is not lying to yourself about whether your rule actually works. These are the traps that separate a real edge from an expensive illusion:

Overfitting
Tuning a strategy until it fits history's noise instead of a real pattern. The tell-tale sign: dazzling backtest, dismal live results. Try enough variations on the same data and a lucky-looking one is almost guaranteed.
Costs & slippage
A backtest that ignores brokerage, STT, exchange fees and the spread you actually pay is fiction. Plenty of 'edges' are real on paper and gone after costs. abtrade models them so you see the net truth.
Beta vs. alpha
Beta is how much you simply moved with the market; alpha is the return your rule added beyond that. A '+20%' year in a market that rose 18% is mostly beta — only the extra 2% is skill.
Significance (t-stat)
Could this result be luck? A t-stat above ~2 is the usual bar for 'probably not random' — but it needs enough trades, and gets fooled when you've tried many strategies.
Out-of-sample
The honest test: how a strategy does on data it was never tuned on. A backtest can be curve-fit to the past; forward-tracking from the day you deploy can't be. Story vs. record.

The one rule that matters most

A backtest tells you what would have happened. It never tells you what will. Treat every gorgeous backtest as a suspect, not a promise — and ask first: is this edge real, or did I get lucky on a short stretch of history?

That's why abtrade leads with sample size, significance, and out-of-sample tracking instead of a big green number. The number is easy. The honesty is the hard, valuable part.

How you'll work here

  1. 1Describe an idea in plain English — e.g. 'buy the 5 biggest gap-ups at the open, exit by close.'
  2. 2Run it on real NSE + BSE data. abtrade checks it for lookahead bias automatically.
  3. 3Read the honest scorecard — skill vs. market, t-stat, drawdown, and realistic costs — with an AI risk read.
  4. 4Improve it, version it, then deploy it to be forward-tracked on live data from that day on.