Portfolio Backtester: Backtest Trading Strategies on Indian Stocks

Build a portfolio, set your weights, pick a benchmark, and see how it would have performed over any historical period. No coding required. Just add stocks and click Analyze.

Why Backtest Before You Invest?

An investor who backtests 10 ideas and deploys only the 2 that showed consistent alpha is in a fundamentally better position than one who deployed all 10 on conviction alone.

The real value of backtesting is in what you DON'T invest in.

Most investors build a portfolio based on conviction, tips, or gut feeling, then find out whether it works only after their money is at risk. Backtesting reverses that sequence: you test the idea on historical data first, see the results, and then decide whether to invest.

A strategy that has consistently underperformed its benchmark across multiple time periods is unlikely to suddenly start working. Knowing that before you invest is worth the 5 minutes it takes to run a backtest.

Test Before You Risk
See how your portfolio idea would have performed in real market conditions before committing capital.
Kill Bad Ideas Cheaply
A strategy that consistently underperformed is unlikely to suddenly start working. Find out before you deploy real money.
Benchmark Against Reality
Compare your stock picks against Nifty 50 or sector indices. If you can't beat the benchmark, why not just buy the index?

How to Use the Portfolio Backtester

Five steps from idea to data-backed conviction. The entire process takes less than 5 minutes.

1

Choose your benchmark Required

Select Nifty 50 for broad market comparison, or a sector index (Nifty Bank, Nifty Pharma) if your portfolio is sector-concentrated. Results show performance RELATIVE to this.

2

Set rebalancing frequency

"Never / Buy & Hold" lets weights drift with the market. Monthly, quarterly, or annual resets weights periodically. More frequent rebalancing can improve risk-adjusted returns but adds transaction costs.

3

Set the analysis period

Use 5-10 years to cover multiple market cycles. A strategy that works only in a bull market is a directional bet, not a robust strategy. Avoid starting at obvious bottoms (March 2020).

4

Add stocks and set weights Core Step

Click "+ Add Stock" and search any NSE stock. Assign a weight (%). Use "Distribute Equally" for equal-weight. Total must sum to 100%. See strategy templates below for ideas.

5

Click Analyze Portfolio Results

The backtester runs against historical NSE data and generates: CAGR, Sharpe ratio, max drawdown, alpha, beta, equity curve vs benchmark, and more.

Pro Tip

Run the same portfolio with different rebalancing frequencies (never vs quarterly vs annual) to see how much rebalancing actually matters for your strategy.

Common Test

Take your current portfolio, enter the exact stocks and weights, and backtest over 5 years. This shows whether your picks have historically beaten Nifty.

Start Simple

Don't overcomplicate. Start with 5-8 stocks, equal weight, 5-year period. Add complexity once you understand the baseline results.

Understanding Your Backtest Results

After you click Analyze, the backtester generates these metrics. Here is what each one means and what "good" looks like.

CAGR
Return

Compound Annual Growth Rate. Your annualized return. Compare directly to benchmark CAGR. If yours is 14% and Nifty is 12%, you added 2% alpha per year.

0%8%12%18%+
Sharpe Ratio
Risk-Adjusted

Return per unit of risk. Above 1.0 is good. Above 1.5 is very good. Below 0.5 means too much risk for the return.

<0.5 Weak1.0 Good1.5+ Great
Max Drawdown
Risk

Worst peak-to-trough decline. A -35% means your portfolio fell 35% from its high. This is the pain you would have lived through.

-10% Mild-25%-40%+ Severe
Alpha
Skill

Excess return above benchmark, risk-adjusted. Positive = your picks added value. Negative = index fund would have been better.

Negative0Positive
Beta
Sensitivity

How much your portfolio moves vs benchmark. Beta 1.2 = 20% more volatile than Nifty. Amplifies gains AND losses.

<0.8 Defensive1.0 Market>1.2 Aggressive
Sortino Ratio
Downside

Like Sharpe, but only penalizes downside. High Sortino with moderate Sharpe = big upside, contained downside. Good profile.

<1.0 Weak1.5 Good2.0+ Excellent

Common Backtesting Mistakes to Avoid

A backtest is only as good as how honestly you run it. These are the traps that make bad strategies look good on paper.

Survivorship Bias

Testing only on stocks that exist today ignores companies that were delisted or went bankrupt. Your "best 20" portfolio would have looked different 5 years ago.

Overfitting

Tweaking picks until the backtest looks perfect. The more you optimize for the past, the less likely it works in the future.

Ignoring Transaction Costs

Monthly rebalancing looks great frictionless, but brokerage, STT, and impact costs add up. Real-world costs may eat the entire edge.

Too Short a Test Period

A 1-year backtest captures one regime. Use at least 5 years to cover bull and bear cycles both.

Cherry-Picking Start Dates

Starting at March 2020 (market bottom) makes everything look amazing. Start from a peak (Jan 2008, Oct 2021) to see how your strategy handles adversity. That's the real test.

Frequently Asked Questions

Kalpi LogoKalpi Logo

For more info contact us

info@kalpi.ai

Research

  • Indices
  • Sectors
  • IPO Tracker
  • FII/DII Tracking
  • Market Events
  • RRG Graph

Portfolios

  • Portfolio Analyser
  • Portfolio Backtester
  • Strategy Builder
  • Ready Made Basket
  • Static Basket
  • Seasonality

Resources

  • Blogs
  • How to use Kalpi
  • Docs
  • FAQs

Company

  • About Us
  • Home
  • Pricing
  • For Institutions
  • Contact

Legal

  • Terms & Conditions
  • Privacy Policy
  • Refund Policy
  • Disclaimer

Join our Exclusive Community

WhatsApp

Social

Top Stocks

  • Reliance Industries
  • Tata Consultancy Services
  • HDFC Bank
  • Infosys
  • ICICI Bank
  • Bajaj Finance

Popular Stocks

  • State Bank of India
  • Bharti Airtel
  • ITC Limited
  • Larsen & Toubro
  • Asian Paints
  • Titan Company

Top Indices

  • Nifty 50
  • Nifty 100
  • Nifty 500
  • Midcap 150
  • Smallcap 250
  • Microcap 250

Top Sectors

  • Banking
  • Information Technology
  • Pharmaceuticals
  • Automobiles
  • FMCG
  • Metals

Data & Analytics

  • Market Breadth
  • My Alerts
  • My Portfolios
  • My Strategies
  • My Live Strategies
  • My Watchlists

Copyright © 2026 Kalpi | All Rights Reserved | Disclaimer and Privacy Policy