NiveshBuddy Learn
Using NiveshBuddyBeginner

Running & Understanding Backtests

A backtest replays your rules against history, one rebalance at a time. This is how it decides when to trade, how the results page is laid out, and why a single CAGR can describe two years that felt nothing alike.

10 min readUpdated

What You’ll Learn

By the end of this article, you’ll understand:

  • What a backtest replays, and what it leaves out
  • Why signals come from one day's close and trades from the next
  • Why a backtest picks from each universe as it stood at the time
  • How the results page is organised, and which tab answers what
  • Why one CAGR can describe two very different years
  • How Backtest History keeps every run of a strategy, and what Save As and Customize cost
  • The four things a backtest cannot tell you

What a backtest actually is

A backtest replays your strategy against history, one rebalance at a time. On each scheduled date it re-runs universe, eligibility, ranking and selection using only the data available on that date — end-of-day prices adjusted for corporate actions, from 2021, as far back as your plan allows. Nothing is decided in the moment: if the rules said hold fifteen stocks on a day the market fell four percent, it held fifteen. It tests the rules, not you.

After Run Backtest, the result shows pending, then running, then fills in. A Quick Strategy runs free; a Custom Strategy Builder backtest spends one Strategy credit when you press Run Backtest.

When it decides to trade

This is where a carelessly built backtest can quietly lie to you.

One rebalance, on a strategy that rebalances on Mondays

  1. Friday's closeThe rules are evaluated against that day's end-of-day data
  2. Signals generatedWhich holdings leave, which candidates enter
  3. Monday's closeThose trades are filled at Monday's official closing price
Signals and trades sit on different days on purpose. Nothing acts on a price it has not already seen close.

Acting on the same close the signal came from would use information the rules could not have had in time — look-ahead bias, which flatters results without looking wrong on screen. So trades are never filled intraday or the instant a signal appears, but at the scheduled rebalance close. A strategy rebalancing on the 1st reads the previous trading day's close and trades at the 1st's.

Which stocks it can pick

A NiveshBuddy backtest picks from each universe as it stood on every rebalance date, not from today's list, and reads Trade-to-Trade status the same way. A company in the Top 200 in 2022 that later dropped out still counts in 2022; one that joined in 2025 isn't picked before then.

Today's list would leave out companies that faded (survivorship bias) and let the strategy buy today's winners early (look-ahead bias). Two consequences:

  • A universe can only be tested from the date its membership history is verified. An earlier start is refused, so the builders offer only universes whose history covers the full data range.
  • A simulation never had the problem. It moves forward a day at a time, on that day's list.

Six figures and a takeaway

The example is Midcap Climbers, a hypothetical Custom strategy — the top fifteen of the Mid Cap 150 on 6- and 12-month momentum, rebalanced monthly — tested 3 Nov 2021 to 3 Nov 2026 (the builder's Custom period). It shows how to read the page; it is not a strategy to copy.

The Midcap Climbers results header: the description "Top 15 from the Mid Cap 150 · Monthly on 1st · 200 SMA · 6M/12M ROC · Vol. Adj. Returns · TSL 20%", the four action buttons and ⋮, the six cards (Score 71/100 Strong, CAGR 15.70%, Benchmark 5.96%, Alpha +9.75%, Drawdown −29.04% Max / −6.92% Avg, Sharpe 0.86), the five tabs, and the Key takeaway with the lines set out below, ending "Includes a 0.1% cost on each entry and exit; excludes tax on gains and slippage." and a link to ask Claude or ChatGPT
The first thing a finished backtest shows you
CardWhat it shows
Score71/100 with the band Strong — the product's own summary, combining return quality, risk control, risk-adjusted return and consistency. A place to start a review, not a verdict to adopt
CAGRCompound annual growth rate: the strategy's average yearly growth over the window: 15.70%
BenchmarkThe Top 50 benchmark's CAGR over the same window: 5.96%, so "compared to what?" is answered before you scroll
AlphaThe gap between the two: +9.75%
DrawdownThe deepest fall below a previous high (Max, −29.04%) and how far below it the portfolio sat on an average day (Avg, −6.92%)
SharpeRisk-adjusted return: 0.86

Below the tabs, the Key takeaway puts the result into words. It describes this one backtest over one window; none of it is advice about whether a strategy suits you.

Key takeaway lineHere
HeadlineGrew faster than the Top 50 benchmark, with moderate falls.
What ₹5 lakh became, with its CAGR against the Top 50 benchmark's over the same dates₹10.36 lakh from 3 Nov 2021 to 3 Nov 2026; 15.70% against 5.96%
The worst fall, and the longest stretch below a previous high29.04%, from ₹5.24 lakh on 15 Nov 2021 to ₹3.72 lakh on 20 Jun 2022; 283 days
The Sharpe in wordsSharpe 0.86: moderate
When fewer than half the trades won: how the result was madeWins 44% of trades; the average win is 2.3× the average loss, so a few big winners carry the result.
When something deserves a warningSuch as Spent over a year below a previous high at one point.

On a computer, four buttons show; the rest are in ⋮ (More actions):

ActionWhereWhat it does
Explain ResultsButtonReplays a short guided tour of this page
CustomizeButtonReopens it in the Custom Strategy Builder with every setting editable; the re-run spends one Strategy credit
Explore VariationsButtonStarts an Experiment from this strategy, on plans that include Experiments
Start SimulationButtonBegins a forward-looking Simulation — a deliberate step; a backtest never becomes one on its own
Save As⋮ menuCopies the strategy under a new name. Free
Export⋮ menuDownloads an HTML report of the result
Rename⋮ menuChanges the strategy's name
Delete⋮ menuDeletes the strategy

On a phone only Start Simulation (and, on most phones, Explain Results) stays out of the ⋮ menu.

Five tabs, five questions

TabThe question it answers
OverviewWhat did the journey look like?
PerformanceHow good was it, and how evenly?
TradesWhat actually happened, trade by trade?
ConfigurationWhat exactly was tested?
Backtest HistoryHow does this run compare with earlier runs of the same strategy?

What each metric means, and how it misleads alone, is in Understanding Investment Performance & Risk Metrics.

Overview: the shape of the journey

The Overview tab: an Equity Curve with range buttons 1Y, 3Y and ALL and a Benchmark dropdown on Top 50 (default), Strategy against Benchmark (Top 50) from November 2021 to November 2026 on a ₹3 L to ₹12 L scale; the strip Top 50 over this period: Total return +33.5%, CAGR 6.0%, Max drawdown −16.5%, Strategy ahead by 9.7% a year; and a Drawdown Curve for both, the strategy's deepest close to −30% in mid-2022
The same result told twice — once as growth, once as pain

The Equity Curve plots the strategy against the Top 50 benchmark; its range buttons depend on the test's length (this five-year one offers 1Y, 3Y and ALL; a two-year one would have no 3Y).

Benchmark controlWhat it does
Benchmark dropdownTop 50 (default), Top 200 or Top 500; swaps the comparison line on both charts. For a Mid Cap 150 strategy, a broader index compares it with more than the fifty largest companies
The strip under the Equity CurveThe chosen index over the same dates: Top 50 over this period: Total return +33.5% · CAGR 6.0% · Max drawdown −16.5% · Strategy ahead by 9.7% a year
What stays on the Top 50The Score, Benchmark and Alpha cards, Returns by Period and the Key takeaway; a note under the cards says so while another index is chosen

The Drawdown Curve shows how far below its previous peak the strategy was at each moment. It ended well ahead of the Top 50, yet fell close to 30% in its first year against the benchmark's 16.5% — what holding it felt like.

Performance: where the average comes apart

Key Metrics sets out eighteen figures in four groups — Growth, Risk & Drawdowns, Quality of Returns and Portfolio Behavior — each with an ⓘ; How to read this result walks through them worst stretch first, then growth, consistency, evidence, and costs and limits. Returns by Period shows the last 1, 3 and 5 years against the Top 50 benchmark: whether the strategy kept working.

The Performance tab: Key Metrics in four groups with a How to read this result link — CAGR 15.70%, Total Return 107.34%, Best / Worst Month 13.38% / −12.76%, Max / Avg Drawdown −29.04% / −6.92%, Longest Drawdown Days 283 days, Top 1/2/3 Weight 42.2/78.6/86.0%, Sharpe Ratio 0.86, Win Ratio 44.4%, Gain / Pain Ratio 1.16, Total Trades 358, Max / Avg Cash 56.7% / 3.4% among them; Returns by Period ending 3 Nov 2026 (1 year 5.08% vs −7.58% for Benchmark (Top 50); 3 years 19.27% vs 7.38% a year; 5 years 15.70% vs 5.96% a year); and Monthly Returns tiles (56% positive months, 5 of 6 positive years, streaks of 6 months) above a 2021–2026 heatmap. November 2021 and November 2026 are starred as part months.
Four groups of metrics, and the grid that takes them apart

Monthly Returns is the most revealing part: consistency tiles (56% of months positive, five of six years) and a heatmap of every month with an Annual column, where a headline figure comes apart.

The same strategy, two years apart

2023

  • The rules, unchanged
  • Eight positive months of twelve
  • A best month of +10.87%, in December

+46.13%

annual return

2025

  • The same rules, still unchanged
  • Seven positive months of twelve
  • January alone gave back 12.76%

+6.42%

annual return

Across the whole window the page reports a Total Return of 107.34% and a CAGR of 15.70% — a smooth annual rate that neither year resembles.

Same rules, nearly as many positive months, and one annualised number stands in for both. Read any headline return as an average of years that may have looked nothing alike.

Trades: what actually happened

The Trades tab: a Trade Log of 373 rows with a search box, Columns and Export CSV; the open Columns menu lists S.No., Stock, Quantity, Entry Date, Entry Signal Date, Entry Price / Amount, Exit Date, Exit Signal Date and Exit Price / Amount, the two signal dates unticked; the first trades, MINDTREE, TATAPOWER, MPHASIS and TATAELXSI, entered 3 Nov 2021 and exited 1 Dec 2021
Every decision the rules made, listed — and the columns you can add

The Trade Log lists every trade's dates, prices, return and status, with search and Export CSV. Columns adds hidden ones, among them Entry Reason and Exit Reason (why — a rank drop, a stop being hit), Holding Period, Return (Net% /Abs) and Transaction Cost.

This backtest made 358 completed trades (the 373 rows include positions open at the end) at a 0.1% cost on every entry and exit; the default is zero. The net-return column shows what costs took — re-running with a cost you would pay is a cheap sanity check.

Configuration: what was actually tested

The Configuration tab, Strategy Parameters, in four cards. Universe & Filters: Mid Cap 150, Market Cap ₹1,000 Crores+, Liquidity ₹1 Crore+, Penny Stocks and T2T Stocks Excluded, Rebalance Monthly · 1st. Technical Rules: 200 SMA, ROC Filters 6M and 12M ranked on their average, Volatility Adjusted Returns, Super Trend Balanced, 52-Wk High within 25%. Portfolio Settings: 15 stocks, Exit Rank 30, Exit Delay None, Reinvest (no capping), Trailing 20% stop loss. Backtest Settings: ₹5,00,000, 3 Nov 2021 → 3 Nov 2026, Transaction Cost (each entry & exit) 0.10%, Created and Last Updated 4 Nov 2026
What was tested, echoed back in four cards

The Configuration tab echoes the settings in the builder's four groups — what was actually tested, not what you meant to: the period, the starting amount and Transaction Cost (each entry & exit), a figure you set, not a NiveshBuddy fee.

Backtest History: every run of the strategy

Each re-run — after a Customize, say — becomes the Current result; earlier ones are kept.

The Backtest History tab with the older run open: a banner "Viewing the backtest from 4 Nov 2026, an earlier version of this strategy. Simulations and edits use the current version." with Back to current; that run's cards: Score 72/100 Strong, CAGR 16.34%, Benchmark 5.96%, Alpha +10.38%, Drawdown −29.31% Max / −6.81% Avg, Sharpe 0.88; then Select 2 to 3 completed backtests to compare, Compare selected, and two Completed runs from 4 Nov 2026 listing Stocks / Exit rank, Rebalance Monthly, 200 SMA and ROC 6M · 12M — Current (15 / 30, +15.7%) and Viewing (15 / 25, +16.3%)
Two runs of one strategy — the earlier one opened for viewing

Each row lists Stocks / Exit rank, Rebalance, Moving Averages and ROC Filters. Here only Exit Rank changed, 25 to 30, and the older run has the higher CAGR (16.34% against 15.70%): a re-run becomes Current whether or not it scores higher.

An opened older run is marked Viewing, under a banner: simulations and edits use the current version; the ⋮ menu then offers only Save As and Export, and Back to current returns you. Tick two or three completed runs and press Compare selected to see on Compare Results what a single change did.

What a backtest cannot tell you

Four honest boundaries

It is not a prediction

A backtest says what the rules would have done in conditions that have already happened. It says nothing about whether those conditions return, and historical results do not guarantee future performance.

It counts only the cost you entered

Transaction Cost is yours to set — charged on each entry and each exit — and it defaults to zero. It is the only cost the model takes. Slippage, market impact, taxes and how your broker actually fills an order are not modelled. The gap between a backtest and a real account lives largely here.

It ran on one date range

Change the period and the answer changes. With history from 2021, a window can easily be dominated by one kind of market, which is why one result is evidence and not proof.

A good result can be an accident

The more rules you stack, the easier it is to find a combination that happens to fit the past. A strategy you can explain in a sentence is easier to trust than one that merely scored well.

A backtest is evidence about a rules-based approach; what you do with a strategy remains your decision.

Key takeaways

  • A backtest replays your specification against history one rebalance at a time, using only the data available on each date — history from 2021, bounded by your plan.
  • Signals come from the prior trading day's close and trades are filled at the rebalance day's close — never intraday — to prevent look-ahead bias.
  • A backtest picks from each universe as it stood on every rebalance date, so companies that later dropped out still count and later winners aren't picked early.
  • The Score and its band are the product's summary of one result, a place to start a review rather than end one.
  • The Benchmark card is the Top 50 over the same window. The charts' Benchmark dropdown can show the Top 200 or Top 500; the cards, Returns by Period and the Key takeaway stay on the Top 50.
  • The Key takeaway is generated from this one backtest and describes what happened; it is not advice about what suits you.
  • Overview shows the shape, Performance the evenness, Trades what happened, Configuration what was tested, Backtest History how runs compare.
  • The Monthly Returns heatmap is where a headline figure comes apart: 2023 returned 46.13% and 2025 6.42%, and one CAGR stands for both.
  • Transaction Cost is yours to set, charged on each entry and each exit, and defaults to zero — the Trade Log's net-return column shows what it took.
  • Save As is free; Customize re-runs the strategy as a Custom backtest and spends one Strategy credit. Earlier runs stay in Backtest History.