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.
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.
How to Use the Portfolio Backtester
Five steps from idea to data-backed conviction. The entire process takes less than 5 minutes.
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.
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.
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).
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.
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.
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.
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.
Worst peak-to-trough decline. A -35% means your portfolio fell 35% from its high. This is the pain you would have lived through.
Excess return above benchmark, risk-adjusted. Positive = your picks added value. Negative = index fund would have been better.
How much your portfolio moves vs benchmark. Beta 1.2 = 20% more volatile than Nifty. Amplifies gains AND losses.
Like Sharpe, but only penalizes downside. High Sortino with moderate Sharpe = big upside, contained downside. Good profile.
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.