⚖ Backtest Your Rebalancing Strategy

Does Disciplined Rebalancing Beat Buy-and-Hold in Your Actual Portfolio — After Tax?

v1.3.0 BACKTEST TAB INDIA

🌟 Finmagine Portfolio Manager — Now on the Chrome Web Store

Multi-broker tracker: Indian & global stocks, MFs, ETFs • Decision Journal, History Chart, Corporate Actions • Free

Install Free →
Published March 20, 2026  |  Article 9 of 10  |  Finmagine Portfolio Manager Series  |  ⏱ 20 min read

🎙 Multimedia Learning Hub

Learning overview and 30 interactive flashcards covering every aspect of backtesting your rebalancing strategy

What You Will Learn

The Backtest tab in Finmagine Portfolio Manager answers the question that matters most: given your actual portfolio, your actual buy prices, and your actual Indian tax situation — would disciplined rebalancing have created more wealth than simply holding everything unchanged?

Core Concepts Covered:

⚖ Four Scenarios
  • Buy & Hold baseline
  • Threshold Rebal (Gross & Net)
  • Calendar Rebal (Net)
🏭 Tax Model
  • LTCG at 13% + ₹1.25L exemption
  • STCG at 20.8%
  • FY-by-FY tax breakdown
📊 Lot Selection
  • FIFO vs HIFO explained
  • When each method wins
  • Tax drag quantified
🔍 Reading the Output
  • NAV chart interpretation
  • Summary cards explained
  • Rebalancing events log
The Backtest tab is available free in Finmagine Portfolio Manager. Visit finmagine.com/portfolio-manager.php to install the Chrome extension and run your first backtest.

🎥 Video Guide — Coming Soon

🎥

A video walkthrough of the Backtest tab — setting up your first simulation, reading the NAV chart, and interpreting the tax breakdown — is in production. Check back soon.

Visit Portfolio Manager Hub

🎧 Audio Deep Dive — Coming Soon

🎧

An audio deep dive covering rebalancing theory, Indian tax implications, FIFO/HIFO decision-making, and the full backtest workflow is being produced. Subscribe to the Finmagine WhatsApp community to be notified when it drops.

Join WhatsApp Community

Test Your Knowledge — 30 Flashcards

This article includes 30 Q&A flashcards covering every key concept — from the four scenario definitions to FIFO/HIFO decision-making to interpreting the NAV chart. Jump to the flashcard section below.

Jump to Flashcards ↓

1. The Question Every Investor Asks

You have been holding your portfolio for several years. Some positions have grown dramatically — Titan now makes up 22% of your portfolio when you originally allocated 12%. SBI Life has barely moved and sits at 4% when you wanted 8%. Every time you open a finance blog or watch a YouTube video about portfolio management, the advice is the same: "rebalance regularly." But nobody answers the question that actually matters:

The real question: Given my actual portfolio, my actual buy prices, my actual tax situation under Indian capital gains laws — would disciplined rebalancing have generated more wealth than simply holding everything and doing nothing?

Generic rebalancing calculators answer a hypothetical question with hypothetical numbers. They take a theoretical 60/40 portfolio, apply historical index returns, and show you that rebalancing beats hold. But your portfolio is not a theoretical construct. It has specific stocks, specific lot sizes, specific purchase dates, specific cost bases. And critically — it has a tax situation that is entirely unique to you.

The Finmagine Portfolio Manager Backtest tab answers the real question. It reads your actual trades from the Holdings tab, fetches historical monthly closing prices from Yahoo Finance for every stock in your portfolio, simulates four distinct strategies from the start date of your choice, applies Indian capital gains tax (LTCG at 13% including cess, STCG at 20.8% including cess) to every single rebalancing transaction using your chosen lot selection method, and plots how ₹1,000 invested at the start would have grown under each strategy.

No spreadsheet gymnastics. No theoretical assumptions about which stocks you held. The backtest runs on the positions you actually own, using the prices you actually paid, under the tax laws that actually apply to you.

This guide walks through every element of the Backtest tab — the configuration panel, the four scenario lines, the summary cards, the tax year breakdown table, and the rebalancing events log. By the end, you will know not just how to read the backtest output but how to act on it.

Before you begin: The Backtest tab works best when your Holdings tab has at least 12 months of real trade history. If you entered only current holdings without purchase dates, some lot-level tax calculations may be approximated. For the most accurate results, ensure every buy transaction is recorded with its actual date and price.

2. What Is Rebalancing?

Rebalancing is the act of returning your portfolio to a set of predetermined target weights after market movements have caused it to drift. The underlying logic is straightforward: if you decided that Reliance Industries should constitute 15% of your portfolio based on your conviction, business analysis, and risk tolerance, then after a year of strong Reliance performance that has pushed it to 24%, you are now carrying almost double the Reliance exposure you originally wanted. Rebalancing corrects that drift.

The Mechanics

Consider a simple three-stock portfolio at inception:

Stock Target Weight Initial Value After 1 Year Actual Weight Drift
HDFC Bank 40% ₹4,00,000 ₹4,80,000 35.8% −4.2%
Titan 35% ₹3,50,000 ₹5,95,000 44.3% +9.3%
Infosys 25% ₹2,50,000 ₹2,65,000 19.7% −5.3%

After one year, Titan has surged and now makes up 44.3% of the portfolio — well above its 35% target. HDFC Bank and Infosys have drifted below their targets. To rebalance back to the original targets, you would sell approximately ₹1.25 lakh worth of Titan and deploy the proceeds into HDFC Bank (₹57,000) and Infosys (₹68,000).

Why It Feels Counterintuitive

Rebalancing creates a deep psychological conflict in the investor's mind, and this is precisely why it is so rarely done consistently. You are being asked to:

Yet the theoretical case for rebalancing is compelling: by systematically trimming what is expensive and adding to what is relatively cheaper, you are enforcing a buy-low-sell-high discipline that most investors fail to execute emotionally. The question is whether this discipline generates enough extra return to justify the capital gains tax you pay every time you sell.

Two Rebalancing Philosophies

Threshold Rebalancing: Rebalance whenever any stock's actual weight deviates from its target weight by more than a set percentage (e.g., 5%). Triggered by market events — could happen once a month in volatile markets or not at all for a year in a sideways market.
Calendar Rebalancing: Rebalance on a fixed schedule regardless of how much the portfolio has drifted — typically quarterly. Simple, predictable, requires no monitoring.

Threshold rebalancing is more efficient in theory — you only act when the drift is large enough to matter. Calendar rebalancing is simpler in practice but can trigger unnecessary transactions when the portfolio has barely moved. The Backtest tab tests both approaches head-to-head, on your actual portfolio, after accounting for the tax drag that turns theoretical gains into real-world returns.

3. The Four Scenarios Explained

The Backtest tab simulates four distinct scenarios simultaneously. Each is represented as a line on the NAV chart, and each answers a specific question about your portfolio's history.

Buy & Hold
Never rebalanced. The pure baseline. Weights are set at the start date and drift freely as prices move. No selling, no taxes, no transaction friction. This is what you would have if you bought everything on day one and never looked at the portfolio again.
Grey line — the floor
Threshold Rebal (Gross)
Rebalance whenever drift exceeds threshold. Taxes are ignored — gains from sales are fully reinvested as if there were no tax liability. This is the theoretical ceiling of rebalancing: what you could achieve in a zero-tax world. The gap between this line and the Net line is the pure cost of capital gains taxation.
Light green dashed — theoretical max
Threshold Rebal (Net) ★
Same threshold rebalancing but with taxes paid on every rebalancing sale before proceeds are reinvested. LTCG at 13% (including cess) after the ₹1.25 lakh annual exemption. STCG at 20.8% (including cess) with no exemption. This is your real-world return — the number that actually matters.
Solid green — your actual return
Calendar Rebal (Net)
Rebalance at the end of every quarter (March, June, September, December) regardless of drift, after taxes. Compare this against Threshold Net to see whether smarter drift-triggered timing adds value over mechanical quarterly rebalancing.
Amber line — quarterly discipline

Why These Four? The Three Questions They Answer

The four scenarios are not arbitrary. They are structured to answer exactly the questions that matter to a long-term Indian equity investor:

Three Questions, Three Comparisons

  • Hold vs Threshold Net: Is rebalancing worth doing at all? If Net is lower than Hold after all those taxes, the answer is no — stay the course and do nothing.
  • Threshold Gross vs Threshold Net: How much did taxes actually cost you? The gap between these two lines, expressed as a percentage of the Gross line's gains, is the tax drag. This quantifies something most investors only vaguely sense.
  • Threshold Net vs Calendar Net: Is smart, drift-triggered rebalancing better than blindly rebalancing every quarter? If Threshold Net is higher, timing matters. If Calendar is close or higher, simplicity wins.
The ★ scenario: Threshold Rebal (Net) is highlighted as the primary metric because it represents the most realistic version of disciplined rebalancing — triggered by actual drift, taxed correctly, reinvesting what remains. If this number beats Buy & Hold, rebalancing has earned its place in your process.

4. Setting Up Your First Backtest

The configuration panel appears at the top of the Backtest tab. There are five parameters to set before running the simulation. Understanding each one — and why it matters — is essential to getting results you can actually act on.

4.1 Start Date

The start date defines where the simulation begins. The backtest re-values your portfolio at the chosen start date, sets initial weights from that valuation, then tracks what happens from there.

Important about custom dates: If you select a date before some of your holdings existed in the portfolio, those stocks are excluded from that run. The backtest always works only with stocks that were held on the start date.

4.2 Threshold %

The threshold is the drift tolerance — the maximum allowed deviation between a stock's actual portfolio weight and its target weight before a rebalancing event is triggered. A threshold of 5% means: if a stock is targeted at 15% but its actual weight rises to 20.1% or falls to 9.9%, the simulation rebalances the entire portfolio back to targets.

Threshold Behaviour Typical Rebalancing Frequency Best Suited For
3% Very active, reacts to minor drift Monthly–bimonthly Portfolios with tight conviction weights where even 3% drift feels uncomfortable
5% (default) Balanced — catches meaningful drift without overtrading Quarterly–semi-annually Most long-term equity portfolios
10% Relaxed — only acts on significant drift Semi-annually–annually Larger portfolios where transaction cost efficiency matters
15–20% Near-passive, only catches major dislocations Annually–rarely Testing whether any rebalancing at all adds value vs complete buy-and-hold

A practical approach: run the backtest at 5% first to see the baseline result, then experiment with 3% and 10% to understand the sensitivity. Portfolios with high inter-stock correlations (e.g., multiple banking stocks) tend to benefit from higher thresholds because correlated stocks drift together and reduce the benefit of frequent rebalancing.

4.3 Lot Method

When the simulation needs to sell a stock to rebalance, it must decide which specific lots (batches of shares at different purchase prices) to sell first. The lot method controls this decision and has a direct impact on tax efficiency.

Full detail on FIFO and HIFO is in Section 9. Here is the quick summary:

Best practice: Run the backtest with both FIFO and HIFO. Compare "Total Tax (Threshold)" between the two runs. Choose the lot method that results in lower total tax paid while still maintaining acceptably close returns to buy-and-hold.

4.4 Limited History Handling

Not all stocks in your portfolio have price data going back to your chosen start date. Recently listed companies (IPOs from 2022 onwards), stocks you tracked on Screener.in that are not well-covered by Yahoo Finance, or companies that were relisted after restructuring may have incomplete historical data.

The exclusion count is reported in the backtest results footer — "Excluded: 3 stocks". If many of your holdings are excluded, the backtest is comparing a different portfolio than the one you actually hold. In that case, try a more recent start date that covers all your holdings, or switch to "Use Available".

4.5 Target Weights

Target weights define what you want each stock to be as a percentage of your portfolio. Every rebalancing event in the simulation brings actual weights back toward these targets.

Reset to current allocation is a convenient starting point — it sets targets equal to your portfolio's current actual weights. This is useful for a baseline run: "if I had been maintaining today's allocation consistently, would rebalancing have helped?"

However, the most meaningful use of the Backtest tab is to set targets that reflect your investment thesis rather than your current state. A few principles:

Expert technique: Run two backtest scenarios — one with targets set to current allocation (what you have), and one with targets reflecting your ideal allocation (what you want). The difference in outcomes tells you the cost (or benefit) of your portfolio's historical drift away from your ideal.
Finmagine Portfolio Manager Backtest configuration panel showing start date chips, threshold slider, FIFO/HIFO toggle, limited history options, and target weights table
The Backtest configuration panel — start date, threshold %, lot method (FIFO/HIFO), limited history handling, and the target weights editor. Every parameter here directly shapes the simulation output.

5. Reading the NAV Chart

The NAV chart is the centrepiece of the Backtest tab. It plots the normalised growth of your portfolio under each of the four scenarios, starting from ₹1,000 at the chosen start date. The Y-axis is the NAV (Net Asset Value), and the X-axis is the timeline in months.

Why ₹1,000?

Normalising every scenario to ₹1,000 at the start date serves one crucial purpose: it makes all four scenarios directly comparable regardless of your actual portfolio size. Whether your portfolio started at ₹5 lakhs or ₹50 lakhs, the four lines begin at the same point, and the vertical distance between them represents pure strategy differences — not absolute rupee amounts.

What Each Line's Shape Tells You

The chart is interactive — hovering over any point shows the exact NAV value and the corresponding calendar date for all four scenarios simultaneously. But the shape of the lines is often as revealing as the final values:

The Gap Between Dashed Green and Solid Green

The visual gap between the Gross line (dashed green) and the Net line (solid green) is one of the most valuable outputs of the entire backtest. This gap represents pure tax drag — the capital gains taxes you pay every time a threshold rebalancing event triggers a sale. Watch how this gap evolves over time:

Backtest NAV chart showing four scenario lines: Buy and Hold (grey), Threshold gross (dashed green), Threshold net (solid green), Calendar net (amber) — all normalised to ₹1,000 at start
The NAV chart with all four scenarios running from the same ₹1,000 start. The gap between the dashed green line (Threshold gross) and the solid green line (Threshold net ★) is your tax drag — the real cost of rebalancing in a taxable account. Note the "Powered by Finmagine" watermark in the bottom-right corner.

6. Understanding the Summary Cards

Below the NAV chart, eight summary cards present the key metrics of the backtest in a scannable format. Each card focuses on one number that answers a specific question.

Buy & Hold CAGR
21.5%
The baseline. Holding everything unchanged from start date.
Threshold Gross CAGR
25.6%
Theoretical max — rebalancing without any tax friction.
Threshold Net CAGR ★
22.9%
Real-world rebalancing return after all capital gains taxes.
Calendar Net CAGR
19.3%
Quarterly rebalancing net of taxes. Beats hold? Does smart timing help?
Total Tax (Threshold)
₹1.84L
Cumulative capital gains tax paid across all threshold rebalancing events.
Total Tax (Calendar)
₹2.21L
Cumulative capital gains tax paid across all quarterly rebalancing events.
Tax Drag
10.5%
(Gross − Net) ÷ Gross × 100. What % of rebalancing benefit was consumed by taxes.
Rebalancing Events
18 / 20
Threshold triggered 18 times. Calendar ran 20 times (5 years × 4 quarters).

How to Read the Summary Cards Together

The cards are designed to be read as a story. Work through them left to right:

  1. Start with Hold vs Threshold Net: Is rebalancing adding value at all? In the example above, 22.9% vs 21.5% — a small but real advantage. Rebalancing earned its keep.
  2. Check Gross vs Net: 25.6% gross but only 22.9% net. Tax drag consumed 2.7 percentage points of CAGR. Is that too much? See the Tax Drag card: 10.5% of the theoretical benefit was lost to taxes. Whether that is acceptable depends on how much the gross outperformance justified the rebalancing effort.
  3. Compare Threshold Net vs Calendar Net: 22.9% vs 19.3%. Threshold rebalancing — triggered by actual drift — significantly outperformed mechanical quarterly rebalancing. Smart timing mattered in this case.
  4. Look at Total Tax: ₹1.84 lakh for threshold vs ₹2.21 lakh for calendar. Threshold rebalancing paid less total tax because it triggered fewer, more targeted events than the rigid quarterly calendar. This explains why Calendar underperformed despite similar market exposure.

The Footer Row

Below the eight cards, a footer row provides the backtest metadata: Start Date (when the simulation began), Months (total simulation duration), Starting Portfolio Value (actual rupee value at start date), Threshold % (the drift tolerance used), Lot Method (FIFO or HIFO), and Excluded (count of stocks removed due to insufficient price history). Always check the exclusion count — if it is high, the backtest is testing a materially different portfolio than your actual one.

Backtest summary cards showing Buy & Hold CAGR +6.8%, Threshold Rebal CAGR gross +20.7%, Threshold Rebal CAGR net +20.3%, Calendar Rebal CAGR +19.7%, Total Tax Threshold ₹4,34,120, Total Tax Calendar ₹6,49,998, Tax Drag 7%, Rebalancing Events 1 threshold 9 calendar
The eight summary cards at a glance. In this example, disciplined threshold rebalancing (net of tax) delivered +20.3% CAGR vs +6.8% for buy-and-hold — while calendar rebalancing generated ₹6,49,998 in tax vs ₹4,34,120 for threshold rebalancing, illustrating why smarter triggering matters.

7. The Tax Year Breakdown Table

The Tax Year Breakdown table (visible for both Threshold and Calendar scenarios) provides an annual ledger of exactly how much capital gains tax the simulation paid, broken down by LTCG and STCG, for each Indian financial year. This is where the backtest transitions from an investment performance tool to a genuine tax planning aid.

Column-by-Column Explanation

Column Definition What It Tells You
Tax Year Indian FY (April 1 – March 31), e.g., "FY26" = Apr 2025–Mar 2026 Aligns with ITR filing — you can see which FYs had taxable events
LTCG Realized Total profit from shares held > 12 months, sold during rebalancing in that FY Higher LTCG = older shares being sold; likely to qualify for 12.5% rate
Exempt (₹1.25L) Amount of LTCG shielded by the Section 112A annual exemption Resets every April 1 — shows how much of your exemption was "used" each year
LTCG Tax (LTCG Realized − Exempt) × 12.5% × 1.04 cess = effective 13% Actual tax liability on long-term equity gains
STCG Realized Total profit from shares held ≤ 12 months, sold during rebalancing in that FY High STCG suggests your portfolio has many young positions or you set a low threshold
STCG Tax STCG Realized × 20% × 1.04 cess = effective 20.8% The expensive tax category — rebalancing should minimise STCG sales where possible

Sample Tax Year Breakdown (Illustrative)

Tax Year LTCG Realized Exempt (₹1.25L) LTCG Tax STCG Realized STCG Tax Total Tax
FY22 ₹2,14,000 ₹1,00,000 ₹14,820 ₹38,000 ₹7,904 ₹22,724
FY23 ₹1,82,000 ₹1,25,000 ₹7,410 ₹22,000 ₹4,576 ₹11,986
FY24 ₹3,60,000 ₹1,25,000 ₹30,550 ₹15,000 ₹3,120 ₹33,670
FY25 ₹4,80,000 ₹1,25,000 ₹45,500 ₹8,000 ₹1,664 ₹47,164
Total ₹12,36,000 ₹4,75,000 ₹98,280 ₹83,000 ₹17,264 ₹1,15,544

What to Learn from the Tax Year Table

The tax breakdown table reveals patterns that can directly improve your rebalancing strategy going forward:

Important caveat on LTCG rates: The simulation applies 13% effective LTCG (12.5% + 4% cess, post-Budget 2024) to all LTCG transactions. Transactions before August 2024 in real portfolios were subject to 10.4% (10% + 4% cess, with ₹1 lakh exemption). The backtest uses the current rate throughout for consistency and simplicity. This means the backtest slightly overstates tax burden for pre-2024 LTCG events.
Tax Year Breakdown table showing LTCG Realized, Exempt ₹1.25L, LTCG Tax, STCG Realized, and STCG Tax columns by Indian financial year
The Tax Year Breakdown table, broken down by Indian financial year (April–March). Each row shows LTCG realised, the ₹1.25L annual exemption consumed, LTCG tax paid, STCG realised, and STCG tax paid. A high STCG tax row signals an opportunity to raise the threshold or switch to HIFO.

8. The Rebalancing Events Log

The Rebalancing Events Log is an accordion list that records every individual rebalancing transaction the simulation executed. It is the most granular output in the backtest — you can see exactly when each event was triggered, what was sold, what was bought, and how much tax was paid.

Event Header Row

Each collapsed event row shows three pieces of information at a glance:

Mar 2022 Threshold Titan: dev +8.2% above target
Jun 2023 Calendar Q1 Quarterly rebalancing — all drifts reset

Expanded Event Detail

Clicking any event row expands it to show the full transaction detail for that rebalancing:

Mar 2022 Threshold Titan: dev +8.2%
SELL Titan Company ₹1,18,400  |  Gain ₹61,200 (LTCG)  |  Tax ₹4,810
SELL Infosys ₹44,000  |  Gain ₹12,800 (STCG)  |  Tax ₹2,662
BUY HDFC Bank ₹92,500
BUY SBI Life Insurance ₹62,228
Net cash deployed after tax: ₹1,55,128 reinvested (₹7,472 paid as tax)

Why Calendar Events Sometimes Show the Same Month as Threshold Events

Calendar rebalancing always occurs at the end of March, June, September, and December. Threshold rebalancing can occur at the end of any month when a drift breach is detected. It is possible (and relatively common) for a threshold event to be triggered in the same month as a scheduled calendar event — for example, a stock drifts past threshold in late June, triggering a threshold event at June month-end, which coincides with the Q1 calendar event. In this case, the log will show two events for June: the Threshold event (which ran first) and the Calendar event (which found minimal drift remaining after the threshold event and executed minimal or no transactions).

Using the events log strategically: Scroll through the events log looking for events where STCG taxes are disproportionately large. These are opportunities to switch to HIFO or raise the threshold to defer the rebalancing event until positions age into the LTCG category.
Rebalancing Events Log showing accordion rows — each row shows the month, Threshold or Calendar tag, trade count, and total tax for that event
The Rebalancing Events Log — every simulated rebalancing event in chronological order. Each row shows the month, whether it was a Threshold or Calendar trigger, how many sells and buys were executed, and the total tax paid. Click any row to expand the full per-stock trade detail.

9. FIFO vs HIFO — Which Should You Choose?

The choice between FIFO and HIFO is not merely a technical setting in the Backtest tab — it is one of the most consequential tax decisions an Indian equity investor can make, and most investors have never thought about it at all. This section explains both methods in plain English, works through a detailed numerical example, and provides a decision framework.

The Core Logic

When you hold multiple lots of the same stock (bought at different times and different prices) and the simulation needs to sell some shares to rebalance, it must choose which lots to sell first. Indian tax law allows you to choose. Your choice determines:

Detailed Worked Example: HDFC Bank

Your portfolio holds three lots of HDFC Bank accumulated over different periods:

Lot Shares Buy Price Buy Date Holding Period Gain Category
Lot A 50 shares ₹1,200/share Jan 2022 (3+ years ago) 37 months LTCG
Lot B 30 shares ₹1,600/share Mar 2023 (2 years ago) 24 months LTCG
Lot C 20 shares ₹1,900/share Nov 2024 (4 months ago) 4 months STCG

Current price: ₹2,000/share. The simulation needs to sell ₹30,000 worth of HDFC Bank = 15 shares.

Under FIFO (sell Lot A first — oldest)

Detail Value
Shares sold15 shares from Lot A (bought at ₹1,200)
Sale proceeds15 × ₹2,000 = ₹30,000
Cost basis15 × ₹1,200 = ₹18,000
Capital gain₹30,000 − ₹18,000 = ₹12,000
Holding period37 months → LTCG
FIFO Tax (assuming ₹1.25L exemption used up)₹12,000 × 13% = ₹1,560

Under HIFO (sell Lot C first — highest cost price)

Detail Value
Shares sold15 shares from Lot C (bought at ₹1,900)
Sale proceeds15 × ₹2,000 = ₹30,000
Cost basis15 × ₹1,900 = ₹28,500
Capital gain₹30,000 − ₹28,500 = ₹1,500
Holding period4 months → STCG
HIFO Tax₹1,500 × 20.8% = ₹312

In this specific example, HIFO pays only ₹312 in tax versus FIFO's ₹1,560 — an 80% tax saving on this single transaction. HIFO wins decisively here because Lot C was bought very close to the current price, generating a tiny gain that happens to be STCG. The absolute tax amount is far smaller than the LTCG on the cheap Lot A.

When FIFO Wins

HIFO's advantage erodes in certain scenarios:

The definitive answer: There is no universally superior method. The right choice depends on your FY's LTCG position (is the ₹1.25L exemption available?), the age and cost structure of your specific lots, and whether you expect to hold positions for many more years. The Backtest tab's most powerful use for FIFO/HIFO analysis is to run the simulation twice — once with each method — and compare the "Total Tax (Threshold)" metric in the summary cards. Choose the method that produced lower total tax while maintaining similar final NAV.
Backtest NAV chart with FIFO lot method — showing threshold net, threshold gross, calendar net, and buy-and-hold lines
FIFO — oldest lots sold first. More gains qualify as LTCG (13%), but absolute gain per lot is typically larger since the cheapest shares are sold first.
Backtest NAV chart with HIFO lot method — showing threshold net, threshold gross, calendar net, and buy-and-hold lines with different tax outcome
HIFO — highest-cost lots sold first. Minimises the gain per sale, reducing the immediate tax bill — but may generate more STCG if high-cost lots are recent.

Run the backtest twice — once with each method — and compare "Total Tax (Threshold)" in the summary cards to find which works better for your specific lot structure.

10. Practical Interpretation Guide

Running the backtest produces numbers. Translating those numbers into investment decisions requires understanding what each pattern means and what action it suggests. Here are the five most common output patterns and their implications:

Pattern 1: Threshold Net > Buy & Hold

Meaning: Disciplined rebalancing added real value even after taxes. The act of systematically trimming winners and adding to laggards generated a higher return than passive holding.

Action: Continue rebalancing at the current threshold. This is the outcome that vindicates the discipline. Consider whether a slightly higher threshold (e.g., moving from 5% to 7%) would have produced similar results with less tax friction — run that test too.

Pattern 2: Threshold Net < Buy & Hold

Meaning: Taxes and transaction friction are overwhelming the rebalancing benefit. You would have been better off not rebalancing at all over this period.

Action: Try the following in sequence: (1) Switch lot method — if you used FIFO, try HIFO. (2) Raise the threshold — try 10% or 15% to reduce the frequency of rebalancing events. (3) Check how many stocks were excluded — if many young stocks were excluded, the backtest may not reflect your actual portfolio. (4) Try a different start date — a start date after a market peak can skew results toward buy-and-hold.

Pattern 3: Gross >> Net with Large Tax Drag (>15%)

Meaning: Rebalancing would have created substantial value in theory but taxes are consuming a disproportionate share of that value. Tax drag is the primary constraint.

Action: Prioritise tax efficiency. Switch to HIFO if on FIFO. Raise the threshold significantly to allow more drift before triggering. Consider whether some of the rebalancing could be accomplished by deploying fresh capital into underweight positions rather than selling overweight ones — new investments do not generate capital gains tax.

Pattern 4: Calendar Net > Threshold Net

Meaning: Mechanical quarterly rebalancing outperformed smarter drift-triggered rebalancing. This often happens in strongly trending markets where the portfolio's mean reversion characteristics favour acting on a schedule rather than waiting for a 5% drift.

Action: Try a lower threshold (e.g., 3%) which will trigger more frequently and may better approximate the calendar cadence. Also check the "Rebalancing Events" count — if Threshold only triggered 8 times over 5 years while Calendar ran 20 times, the threshold may have been set too high for your portfolio's volatility characteristics.

Pattern 5: High Exclusion Count

Meaning: Several stocks in your portfolio lack price history back to the start date. The backtest is simulating a materially different (smaller) portfolio than your actual one. Results may not be representative.

Action: Either use a more recent start date that covers all holdings, or switch limited history handling from "Exclude" to "Use Available". If the excluded stocks represent more than 15–20% of your current portfolio value, treat the backtest results with caution.

11. What Backtest Cannot Tell You

The Backtest tab is a powerful analytical tool, but intellectual honesty demands acknowledging what it cannot do. Treating backtest results as predictive would be a serious mistake. Here are the key limitations:

Transaction Costs

The simulation does not deduct brokerage commissions, STT (Securities Transaction Tax), or exchange transaction charges from rebalancing sales and purchases. For long-term investors using discount brokers, these costs are typically 0.1–0.3% of transaction value — small but not zero. In portfolios where the backtest shows Threshold Net only marginally outperforming Buy & Hold, transaction costs in real execution might eliminate that advantage entirely. For large portfolios (above ₹50 lakhs), the absolute transaction cost on a ₹5 lakh rebalancing event could be ₹5,000–₹15,000.

Dividends

Yahoo Finance monthly closing prices for Indian equities are not reliably adjusted for dividends. For stocks with meaningful dividend yields (HDFC Bank, Coal India, ITC), the actual total return is higher than the price return captured in the backtest. All four scenarios are affected equally by this limitation, so the relative comparison between strategies is largely unaffected. However, absolute CAGR figures in the backtest will be modestly understated for dividend-paying portfolios.

Intra-Month Timing

All rebalancing events execute at month-end closing prices. In reality, you would rebalance at whatever price was available on the day you acted. A stock that hit its threshold on the 5th of the month but was simulated at the 30th price could have a materially different outcome in the simulation versus reality. This is a standard limitation of all monthly-frequency backtests and is generally accepted as a minor source of noise rather than systematic bias.

Tax-Loss Harvesting

The backtest does not implement tax-loss harvesting — the practice of realising paper losses to offset taxable gains. In reality, a sophisticated investor would use accumulated losses in some positions to reduce the capital gains tax on rebalancing sales elsewhere. The backtest therefore potentially overstates the tax burden of rebalancing strategies in portfolios that carry some underwater positions.

Future Returns

This is the most important limitation: a backtest that shows rebalancing added 1.5% CAGR over the past 5 years says nothing about whether rebalancing will add 1.5% CAGR over the next 5 years. Market regimes change. Indian equities from 2020 to 2025 experienced a powerful post-COVID recovery followed by moderate FII outflows — a specific regime that may not repeat. The backtest is a diagnostic tool, not a forecasting tool.

Mutual Funds and Global Equity

The Backtest tab currently supports only Indian equities. Holdings in the IN_MF (Indian mutual fund), GL_EQ (global equity), and GL_MF (global mutual fund) asset classes are excluded from the backtest simulation. The backtest runs exclusively on your IN_EQ holdings. If Indian equities represent only a portion of your total portfolio, the backtest results reflect that subset, not your overall portfolio strategy.

The right mindset: Use the Backtest tab to understand your portfolio's historical behaviour, identify tax inefficiencies in your rebalancing approach, and stress-test whether rebalancing would have added value given your specific holdings. Do not use it to justify a rebalancing strategy based solely on past performance. The best investment strategies are ones you can maintain consistently — if the backtest results give you conviction in a disciplined rebalancing process, that psychological benefit may be worth as much as the numerical one.

Article Series

📚 Finmagine Portfolio Manager — Complete Article Series

12. Flashcards — Test Your Understanding (30 Q&A)

Click any card to reveal the answer. These cover every major concept in the article — useful for review or sharing with fellow investors in your community.

Q1. What data source does the Backtest tab use for historical prices?
Yahoo Finance monthly closing prices. They are fetched via the background service worker (CORS-free), cached locally for 6 hours to avoid repeated API calls, and cover each stock from the earliest available date.
Click to reveal ↓
Q2. Why are all four NAV lines normalised to ₹1,000 at the start date?
Normalisation makes all four scenarios directly comparable regardless of absolute portfolio size. Whether your portfolio was worth ₹5 lakh or ₹50 lakh at inception, the Y-axis shows how ₹1,000 of that portfolio grew under each strategy. Absolute rupee differences between lines represent pure strategy differences.
Click to reveal ↓
Q3. What is FIFO lot selection?
First In, First Out — the oldest shares (by purchase date) are sold first when rebalancing requires a sale. Since older shares are more likely to have been held for over 12 months, FIFO tends to generate long-term capital gains (LTCG) taxed at the lower 13% rate rather than STCG at 20.8%.
Click to reveal ↓
Q4. What is HIFO lot selection?
Highest In, First Out — shares purchased at the highest price per share are sold first. This minimises the capital gain per share on each sale (selling near your cost basis = small gain = less tax per transaction). Especially effective when your most recent purchases are at the highest prices and are close to the current market price.
Click to reveal ↓
Q5. What is tax drag in the Backtest context?
(Gross final NAV − Net final NAV) ÷ Gross final NAV × 100. It measures what percentage of the theoretical rebalancing benefit (over buy-and-hold) was consumed by capital gains taxes. A 10% tax drag means taxes eroded 10% of the value that disciplined rebalancing created in a zero-tax scenario.
Click to reveal ↓
Q6. What are the four scenarios in the Backtest tab?
1. Buy & Hold (grey) — baseline, no rebalancing. 2. Threshold Rebal Gross (dashed green) — drift-triggered rebalancing without tax. 3. Threshold Rebal Net (solid green) — same but after taxes. 4. Calendar Rebal Net (amber) — quarterly rebalancing after taxes.
Click to reveal ↓
Q7. What is threshold rebalancing?
Rebalancing is triggered whenever any stock's actual portfolio weight deviates from its target weight by more than a set percentage (the threshold). For example, with a 5% threshold, if a stock targeted at 15% grows to 20.1% or falls to 9.9%, the entire portfolio is rebalanced back to all target weights.
Click to reveal ↓
Q8. What is calendar rebalancing?
Rebalancing on a fixed schedule regardless of how much the portfolio has drifted — in the Backtest tab, this means at the end of every quarter (March, June, September, December). Simple and predictable but potentially triggers unnecessary transactions when portfolio drift is minimal.
Click to reveal ↓
Q9. What effective tax rate does the simulation apply to LTCG?
13% effective rate: 12.5% capital gains tax + 4% health and education cess (12.5% × 1.04 = 13%). Applied to LTCG above the ₹1.25 lakh annual exemption under Section 112A. This rate reflects post-Budget 2024 changes.
Click to reveal ↓
Q10. What effective tax rate does the simulation apply to STCG?
20.8% effective rate: 20% capital gains tax + 4% health and education cess (20% × 1.04 = 20.8%). Applied to all short-term capital gains from shares held 12 months or less. There is no annual exemption for STCG.
Click to reveal ↓
Q11. What does the ₹1.25 lakh LTCG annual exemption mean in the backtest?
Under Section 112A, the first ₹1.25 lakh of LTCG realized in any financial year (April–March) is tax-free. The simulation tracks cumulative LTCG per FY and applies the exemption before calculating tax. The exemption resets to zero every April 1.
Click to reveal ↓
Q12. What does "Inception" mean as a backtest start date?
The earliest trade date across all active holdings in your portfolio. Using Inception gives the longest possible history and the most statistically significant result because it includes the maximum number of market cycles and rebalancing events.
Click to reveal ↓
Q13. What does "Excluded: 3 stocks" in the backtest footer mean?
Three stocks in your portfolio lack sufficient historical price data for the chosen start date and were removed from the simulation. The remaining portfolio was scaled to 100% for the backtest. A high exclusion count means the backtest is testing a different portfolio than your actual one — results should be treated with caution.
Click to reveal ↓
Q14. What is the primary question the Threshold Net scenario answers?
"Would disciplined, drift-triggered rebalancing — after paying all applicable Indian capital gains taxes on every rebalancing sale — have generated more wealth from my actual portfolio than simply buying and holding everything unchanged?" It is the real-world metric that determines whether rebalancing is worth doing.
Click to reveal ↓
Q15. What does the Threshold Gross scenario tell you that Threshold Net does not?
Threshold Gross shows the theoretical maximum return from rebalancing in a zero-tax world. Comparing it with Threshold Net isolates the pure cost of capital gains taxation. If Gross significantly outperforms Hold but Net does not, tax drag is the main enemy — not the rebalancing strategy itself.
Click to reveal ↓
Q16. In the Rebalancing Events Log, what does the deviation annotation mean?
For Threshold events, "dev +8.2%" means the triggering stock's actual portfolio weight exceeded its target weight by 8.2 percentage points (not 8.2% price movement). For example, a stock targeted at 15% that reached 23.2% shows dev +8.2%.
Click to reveal ↓
Q17. Why might Calendar Net outperform Threshold Net in some portfolios?
In strongly trending markets, threshold rebalancing may act too slowly — waiting for 5% drift means missing the optimal rebalancing moment. Calendar rebalancing acts at fixed intervals regardless of drift, which can better capture mean reversion in trend-following markets. This is most common with lower-volatility portfolios where 5% drift rarely triggers.
Click to reveal ↓
Q18. What is the psychological conflict at the heart of portfolio rebalancing?
Rebalancing requires selling your best-performing stocks (which feels like leaving money on the table) and buying your worst-performing ones (which feels like throwing good money after bad). Both actions contradict natural investor instinct, which is to buy more of what is working and reduce exposure to what is not. Rebalancing enforces buy-low-sell-high discipline mechanically, overriding emotion.
Click to reveal ↓
Q19. What is the "Use Available" option for limited history handling?
Stocks are included from the date their price data begins rather than being excluded entirely. Before that date, the portfolio operates without those stocks. This is messier but closer to reality for portfolios that added newer listings over time. The tradeoff is that the portfolio composition changes mid-simulation, making early-period results less comparable to later periods.
Click to reveal ↓
Q20. Does the Backtest tab support mutual fund holdings?
No. The Backtest tab currently supports only Indian equities (IN_EQ asset class). Holdings in IN_MF (Indian mutual funds), GL_EQ (global equity), and GL_MF (global mutual funds) are excluded from the simulation. The backtest runs exclusively on your Indian equity positions.
Click to reveal ↓
Q21. What does "Reset to current allocation" do in the target weights setup?
It sets each stock's target weight equal to its current actual weight in your portfolio. This creates a baseline test: "if I had been maintaining today's allocation consistently throughout the backtest period, would rebalancing have helped?" It is a good starting point but should be supplemented by a run using your conviction-based target weights.
Click to reveal ↓
Q22. What is the CAGR formula used by the Backtest tab?
CAGR = (Final NAV / Starting NAV)^(12 / Total Months) − 1. Since all scenarios start at ₹1,000, it simplifies to (Final NAV / 1000)^(12 / Months) − 1. The starting NAV is always ₹1,000 and the period is measured in months for precision.
Click to reveal ↓
Q23. Why does the backtest potentially overstate the tax burden for pre-2024 LTCG events?
The simulation applies the current 13% LTCG rate (12.5% + 4% cess, post-Budget 2024) to all LTCG transactions throughout the backtest period. Before August 2024, the actual LTCG rate was 10.4% (10% + 4% cess) with a ₹1 lakh exemption instead of ₹1.25 lakh. Using the current rate throughout means taxes on pre-2024 events are overstated by approximately 2.6 percentage points per rupee of gain.
Click to reveal ↓
Q24. What does a widening gap between Gross and Net lines over time indicate?
Compounding tax drag. Each year's taxes reduce the base that earns returns in subsequent years, and this effect compounds — the percentage gap grows even if the annual tax payment remains constant. This is the primary argument for HIFO (to reduce each year's tax payment) or higher thresholds (to reduce the frequency of taxable rebalancing events).
Click to reveal ↓
Q25. How can you use the Tax Year Breakdown table to identify tax-loss harvesting opportunities?
The table shows FY-by-FY LTCG and STCG realized. In FYs where LTCG is close to or exceeds the ₹1.25 lakh exemption, you can identify years where harvesting available losses (from underperforming positions) would have offset taxable gains. The backtest shows the tax liability; identifying positions with paper losses at the same time requires checking against your holdings data.
Click to reveal ↓
Q26. What does a Threshold Rebalancing Event log entry show when expanded?
The full transaction detail: SELL rows listing each stock sold with rupee value, capital gain amount, gain category (LTCG/STCG), and tax paid; BUY rows listing each stock purchased with rupee value; and a footer showing net cash deployed after tax — how much went back into stocks vs how much was paid to the government.
Click to reveal ↓
Q27. Why is deploying fresh capital often better than selling to rebalance?
New investments into underweight positions bring actual weights back toward targets without triggering capital gains tax, since no sale is made. Rebalancing through fresh capital (buying more of the laggards) rather than selling winners is a zero-tax rebalancing strategy that the backtest cannot fully model but that real investors should always consider first.
Click to reveal ↓
Q28. What does "Total Tax (Threshold)" vs "Total Tax (Calendar)" typically show about efficiency?
Threshold-based rebalancing typically pays less total tax than calendar-based rebalancing over the same period because it acts less frequently and only when drift is meaningful. Calendar rebalancing triggers at every quarter-end regardless of drift, often generating taxable events even when the portfolio is only slightly off-target — paying tax unnecessarily.
Click to reveal ↓
Q29. Why do the NAV lines tend to re-cross (Net overtaking Hold) after market corrections?
During a correction, stocks that rallied above target were trimmed (sold near the top) during earlier rebalancing events, freeing cash that was deployed into cheaper laggards. After the correction, those cheaper additions recover faster than the buy-and-hold portfolio which is concentrated in the fallen winners. The rebalanced portfolio's diversification benefit becomes apparent during recoveries.
Click to reveal ↓
Q30. What is the single most important limitation to remember when acting on backtest results?
Past performance does not predict future performance. A backtest showing rebalancing added 1.5% CAGR over 5 years reflects a specific market regime and a specific set of stocks. The next 5 years may feature a different regime — prolonged one-directional trends, higher volatility, or sector rotations — where the same strategy performs differently. Use the backtest as a diagnostic and confidence-building tool, not as a forward projection.
Click to reveal ↓

Run Your First Backtest Today

The Backtest tab is available in Finmagine Portfolio Manager — a free Chrome extension that works with your Screener.in portfolio. Add your holdings, open the Backtest tab, and find out whether rebalancing would have worked for you — with your actual stocks, your actual buy prices, and your actual tax situation.

Install Portfolio Manager Free →

Finmagine Portfolio Manager

Per-broker stop-loss discipline, live prices, XIRR, Index Beat, Charts — for Indian Equities, US Stocks, Mutual Funds & Global ETFs. Local-first portfolio tracking, optional cloud backup.

Learn More about Portfolio Manager →

Also From Finmagine

📊 Introducing Portfolio Manager

Per-broker stop-loss discipline, live XIRR, Index Beat & multi-asset tracking in one Chrome extension.

📈 Introducing Finmagine Trader

The one-click NSE momentum scanner — Stage 2, Near High, VCP, IPO Breakout across every NSE stock.

📉 XIRR & Index Beat

Are you actually beating Nifty 50 and Nifty 500? Annualised returns that account for when you invested, not just how much.

← Back to Portfolio Manager Hub
← Back to Blog Hub