Skip to content
Practical guide

Build a strategy, test it, and read the result correctly

Strategy Lab converts explicit rules into a reproducible weekly simulation. This guide explains what each control changes, what every result means, and which limitations must remain visible before you trust a historical result.

Open Strategy LabLast reviewed 9 October 2026
Start here

Six-step workflow

  1. 01Choose fixed or custom periodsUse a verified template for fixed, repeatable periods or Custom Strategy to set explicit return, SMA, volatility, and high lookbacks.
  2. 02Define the investable universeSelect the market universe, minimum price, history requirement, and optional sector filter. These settings decide which stocks can be considered.
  3. 03Set eligibility and rankingEligibility removes stocks that fail your rules. Ranking orders only the stocks that remain. They perform different jobs.
  4. 04Set portfolio assumptionsChoose position count, allocation method, concentration limits, rebalance frequency, regime behavior, costs, and test period.
  5. 05Validate before runningResolve blocking errors and read every data warning. A runnable strategy can still carry material research limitations.
  6. 06Run, inspect, and compareRead return and risk together, inspect individual rebalances, then compare a small number of sensible variants over the same period.
Builder

What each control changes

SectionPurposeHow to use it
UniverseDefines the stocks that existed in the test candidate pool.Begin with Nifty 500 for a diversified, more liquid baseline. Minimum weekly bars must cover the longest indicator warm-up.
EligibilityApplies pass or fail gates before ranking.Use all rules for strict conjunction and any rules for alternatives. Custom-period factors expose a W field for the completed-week lookback.
RankingOrders the stocks that passed eligibility.Weights are relative. Parameter and weight combinations are stored with the run, but testing many combinations after seeing results creates overfitting risk.
PortfolioConverts ranks into positions and weights.Set position count and stock or sector caps before viewing results. Equal weight is the clearest baseline.
RebalanceControls how often the portfolio can change.More frequent rebalancing responds faster but usually increases turnover, costs, and sensitivity to the fill assumption.
Regime and exitsReduces exposure or removes holdings when trend conditions weaken.The Nifty 500 regime is a market-risk gate. Risk-off exposure controls how much remains invested. A rank buffer reduces unnecessary churn.
SimulationSets period, capital, costs, and the Sharpe risk-free rate.Use realistic per-side costs and test complete market cycles. Do not choose the period only because it flatters the strategy.
Eligibility is not ranking. A stock must first pass eligibility. Ranking then decides which qualifying stocks enter when more stocks pass than the portfolio can hold.
Return2-104 weeks
SMA4-52 weeks
Volatility4-52 weekly returns
Distance from high4-260 weeks
Execution model

How the simulation works

Decision date: rules are evaluated using a completed weekly close and information available to the engine at that decision point.

Modeled fill: portfolio changes use the following completed weekly close as an approximation. It does not claim that a real order could fill at that price or size.

Warm-up: the engine derives the requirement from every fixed and custom lookback. Volatility needs one extra close because N weekly returns require N+1 observations.

Costs: the configured basis-point cost is charged per side. Real brokerage, taxes, spread, slippage, gaps, and market impact can be higher.

Reproducibility: each completed run stores its strategy definition, engine version, run ID, warnings, and data fingerprint.

Results chart

Read the path, not only the ending value

Strategy and benchmark

Both lines start from the same capital. The gap shows cumulative relative performance over the selected window.

Drawdown panel

This shows the percentage fall from the portfolio's prior peak. Long or deep drawdowns reveal risk hidden by CAGR.

Regime shading

Risk-on and risk-off bands show which market-state rule was active. Confirm that exposure changed as intended.

Rebalance markers

Markers identify portfolio decision cycles. Hover near one to inspect eligible stocks, turnover, additions, and removals.

Range and zoom

Use 1Y, 3Y, 5Y, or All, then zoom with the controls or mouse wheel. Drag horizontally to inspect a specific period.

Crosshair and export

Hover for date-level values. Export PNG for review or CSV for independent calculation and record keeping.

Scorecard

What every result metric means

MetricInterpretation
CAGRAnnualised compounded growth over the complete test period. It is not the average of yearly returns.
Total returnThe percentage change from initial capital to final portfolio value across the full simulation.
Maximum drawdownThe largest peak-to-trough portfolio decline. Smaller is better when comparing otherwise similar strategies.
Sharpe ratioReturn above the selected risk-free rate divided by volatility. Use it only as one risk-adjusted comparison measure.
VolatilityAnnualised variability of weekly portfolio returns. Higher volatility usually means a less stable path.
Final valueThe simulated ending value after modeled transaction costs, based on the chosen initial capital.
TradesThe number of modeled buy and sell transactions generated by the rebalance process.
CostsTotal modeled transaction costs. Taxes, bid-ask spread, market impact, and real slippage may not be fully represented.
Average exposureThe average percentage of capital invested. Low exposure can reduce both gains and losses and must be considered when comparing CAGR.
Average turnoverThe average percentage of the portfolio changed at each rebalance. High turnover makes execution assumptions more important.
RebalancesThe number of portfolio decision cycles completed during the test.
Weeks investedThe number of weekly periods in which the strategy had market exposure.

CAGR spread: strategy CAGR minus benchmark CAGR. Positive means historical outperformance over the same test window.

Drawdown difference: strategy maximum drawdown minus benchmark maximum drawdown. A negative number means the strategy had the smaller historical drawdown.

Worked example

How to interpret one result

Assume a run reports 18% CAGR, 35% maximum drawdown, 0.72 Sharpe, 62% average exposure, and 48% average rebalance turnover, while Nifty 500 reports 14% CAGR and 28% drawdown.

What looks favorableThe strategy compounded 4 percentage points faster while being invested only 62% on average.
What needs cautionIts worst decline was 7 percentage points deeper, and 48% turnover can make real execution materially worse.
What to inspect nextCheck whether returns depend on one short period, whether drawdown clusters in risk-off regimes, and whether small rule changes destroy the result.
What you cannot concludeYou cannot conclude that the strategy will earn 18% in the future or that its real drawdown will stop at 35%.
Compare and Runs

Test alternatives without changing the question

Compare accepts two or three strategies. The first selected strategy supplies the shared period, initial capital, costs, and benchmark; each strategy keeps its own eligibility, ranking, portfolio, regime, and exit rules. Comparison curves are normalised to 100 so their paths are directly comparable.

Runs is the private audit ledger for signed-in users. Use the run ID, engine version, and data fingerprint to distinguish a real rerun from a visually similar strategy definition.

Before trusting a result

Reliability checklist

  • The rules have an economic or behavioral reason, not only a good chart.
  • The test covers rising, falling, and sideways markets.
  • Costs and rebalance frequency are realistic for the selected universe.
  • Performance is not produced by one stock, sector, or short interval.
  • CAGR remains acceptable after considering drawdown and exposure.
  • Turnover and concentration remain practical for real liquidity.
  • Small parameter changes do not collapse the result.
  • The final version is frozen before a forward shadow test.
Research limits

Do not mistake a backtest for a forecast

Current data grade is C. Weekly history is based on currently listed stocks and therefore carries survivorship bias. Delisted or historically ineligible securities may be missing.

Factor coverage is enforced. The live Factor coverage panel is authoritative. Limited or blocked factors, including uncertified point-in-time fundamentals, cannot be used in a runnable public strategy.

Avoid overfitting. Repeatedly changing rules or sweeping many lookbacks after seeing the result turns the backtest into a search for historical luck. Freeze periods first, inspect nearby values for stability, and test the final definition forward.

Execution is approximate. Weekly fills can hide gaps, illiquidity, limit moves, spread, taxes, and market impact, especially outside liquid large-cap stocks.

No metric is a recommendation. Strategy Lab is a self-directed research tool. It does not assess suitability or instruct you to buy, sell, hold, size, or rebalance any security.

How to Use Strategy Lab and Understand Backtest Results | IndiaPulse