Mastering the Custom Index Builder

Construct Your Own Weighted Stock Baskets, Chart Cumulative Returns, and Track Performance & Risk Metrics

COMPLETE GUIDE

Following along? Open the live page

Finmagine — free to explore • premium for full access • no app needed

Open Index Builder → US Version →
Last Updated: June 2026  |  Reading Time: ~8 minutes  |  Level: Beginner–Intermediate
📊 Custom Index Learning Hub
Learn how to build, backtest, and track your custom stock indexes

What You Will Learn

The Custom Index Builder is an analytical backtesting tool. It lets you construct a basket of up to 10 NSE stocks, assign weights to each, and simulate the historical performance of your custom portfolio. This guide teaches you how to construct, analyze, and save these indexes.

  1. How the Index Builder works and where the underlying pricing data comes from — available separately for India (NSE) and US stocks.
  2. Pre-built Theme Baskets — one-click ready-made 5-stock baskets by sector theme, 12 for India and 10 for US.
  3. How to distribute weights (Equal weighting vs. Custom weighting models).
  4. Understanding monthly constant-weight rebalancing and its performance implications.
  5. Analyzing metrics like Total Return, CAGR, best/worst month, and individual stock returns.
  6. Saving and managing custom indexes for permanent tracking.
Tip: Rebalancing monthly back to target weights captures gains from outperformers and re-invests in underperformers. This rebalancing behavior creates deviations compared to a buy-and-hold portfolio.
What is the Custom Index Builder?
An interactive tool to construct a custom-weighted basket of up to 10 NSE stocks and simulate historical returns starting from a base value of ₹10,000.
How many stocks can I add to a custom index?
You can add between 1 and 10 stocks. Baskets are limited to 10 stocks maximum to keep calculations clean and focus on high-conviction ideas.
How does the "⚖️ Equal Weight" button work?
Clicking it distributes weights evenly across all stocks in your basket so the total sums to exactly 100%. (e.g. 4 stocks = 25% each).
What weight validation is required before building?
The sum of all stock weights in the basket must equal exactly 100% (within a tolerance of ±0.5%). If it does not, the "Build Index" button remains disabled.
What is the starting base value of the custom index?
The index is simulated starting from a base value of ₹10,000. Historical chart values plot progress relative to this initial ₹10,000 investment.
How is the index return computed over time?
It uses a constant-weight monthly rebalancing model on historical monthly close prices. At the end of each month, the index value is redistributed back to your target weights.
How does monthly rebalancing differ from Buy-and-Hold?
Buy-and-Hold lets winning stocks grow to dominate the portfolio. Rebalancing sells winning portions monthly to buy underperforming ones, keeping your risk/sector weights constant.
What is the difference between Total Return and CAGR?
Total Return is the cumulative percentage return over the entire period. CAGR is the Compound Annual Growth Rate (annualised return). Periods < 1 year show " < 1Y" for CAGR.
What do the Best Month and Worst Month metrics represent?
They show the maximum single-month gain and loss experienced by the custom index during the historical period. Excellent for evaluating portfolio volatility.
How many custom indexes can I save?
Premium users can save up to 20 custom indexes. If you reach the limit, you can delete old configurations from the Saved Indexes panel to free up slots.
How do I load a saved index configuration?
Scroll to the "📂 Saved Indexes" section at the bottom, find your index, and click "Load". It automatically populates the basket, weights, period, and builds the chart.
How do I delete a saved index?
Click the trash icon (🗑) next to the load button in the "Saved Indexes" panel. Confirm the prompt, and the index configuration is permanently deleted from your account.
What causes an "insufficient_overlap" error?
It occurs if the selected stocks do not have overlapping historical price data (fewer than 2 common months in the DB). This happens when comparing very newly listed IPOs.
What happens if a stock in a saved index is delisted or missing?
The API filters out missing symbols and automatically re-normalises the weights of the remaining active symbols to sum to 100%, preventing script failure.
Is the Custom Index Builder available to free tier users?
No. Building and saving custom indexes requires intensive database aggregation and calculations, making it restricted exclusively to Premium subscription tier users.
What is a "Pre-built Theme Basket"?
A ready-made, equal-weighted 5-stock basket for a specific sector theme (e.g. "Private Banking Leaders" or "Big Tech"). Clicking "Use This Basket →" instantly populates your basket, sets the weights and period, and builds the chart — the same one-click flow as loading a saved index, just pre-curated instead of one you built yourself.
Can I edit a Theme Basket after loading it?
Yes. A theme basket loads into the exact same editable basket used for manual selection — you can remove or swap a stock, add up to 5 more (10-stock cap), or change the weights before clicking Build Index. It's a starting point, not a locked configuration.
Does the Custom Index Builder work for US stocks too?
Yes — /us/custom-index/ is a separate but identical version of the tool for US-listed stocks, with its own 10 Pre-built Theme Baskets (Big Tech, Semiconductors, Money Center Banks, etc.) and a $10,000 base value instead of ₹10,000. Everything else — weighting, rebalancing, saving, the 10-stock cap — works the same way.
Step 1

Introduction to Custom Index Builder

The Custom Index Builder is a powerful backtesting tool designed to let you simulate and track how a weighted portfolio of your high-conviction ideas would have performed historically.

Instead of viewing individual stock charts, the builder aggregates the price data of up to 10 stocks, applies weights, and plots a single unified cumulative return chart starting from a baseline of ₹10,000 (or $10,000 on the US version).

The tool is available separately for each market — /custom-index/ for NSE stocks and /us/custom-index/ for US stocks — with identical mechanics on both, so everything in this guide applies to either version unless noted.

Core Concept: Monthly Constant-Weight Rebalancing

The builder uses a constant-weight rebalancing model. At the end of each month, the portfolio's simulated value is redistributed back to your target weights. This captures profits from outperformers and re-invests in underperforming assets, differing from a pure buy-and-hold portfolio where winning stocks accumulate to dominate the asset weights.

Step 2

🎯 Pre-built Theme Baskets — Start in One Click

Above the builder, a "🎯 Pre-built Theme Baskets" panel lists ready-made, equal-weighted 5-stock baskets by theme — useful when you want to explore a sector idea immediately instead of hand-picking stocks first. Click Use This Basket → on any card and it instantly populates your basket, sets the period, and builds the chart — the identical flow as loading one of your own saved indexes.

India (/custom-index/) — 12 themesUS (/us/custom-index/) — 10 themes
IT Services Leaders, Private Banking Leaders, Pharma & Healthcare, Auto & Auto Ancillaries, FMCG StaplesBig Tech, Semiconductors, Money Center Banks, Healthcare & Pharma, Auto & EV
Energy & Power, Metals & Mining, Cement & Building Materials, Capital Goods & InfraEnergy Majors, Consumer Staples, Payments & Fintech, Cloud & Enterprise SaaS
Consumer Discretionary, Insurance & Financial Services, Digital & New AgeAirlines & Travel
These are starting points, not fixed recipes: a theme basket loads into the same editable basket as manual selection — you can swap out a stock, add up to 5 more (up to the 10-stock cap), or re-weight before clicking Build Index. Using a basket doesn't lock you into its exact 5 stocks or equal weights.
Step 3

Building Your Stock Basket

Adding stocks and distributing weights is designed to be quick and intuitive:

Pro Tip: Setting custom weights lets you mimic real-life portfolios (e.g. allocating 40% to your anchor stock and 10% each to smaller satellite positions).
Step 4

Analyzing Performance Metrics

After clicking Build Index, the page renders a cumulative return chart alongside five key performance metrics:

Total Return
The cumulative percentage return over the entire chosen period (1Y, 3Y, 5Y, Max).
CAGR
Compound Annual Growth Rate — the annualised return of your basket. Shows " < 1Y" for short periods.
Best Month
The single month with the highest percentage gain during the backtest.
Worst Month
The single month with the largest percentage decline, highlighting downside volatility.
Period
The total number of months of overlapping historical data simulated.

Below the chart, a **Holdings Breakdown** table displays each stock's assigned weight alongside its absolute return over the simulated period. This allows you to identify which holdings were the primary performance drivers.

Note on Historical Overlap: If you select newly listed IPO stocks alongside older companies, the backtester will automatically constrain the simulation to the **overlapping period** where price history exists for all chosen symbols. If the overlap is fewer than 2 months, the index cannot be built and will return an `insufficient_overlap` error.
Step 5

Saving & Managing Your Custom Indexes

Once you are satisfied with a custom index configuration, you can save it permanently to your account:

  1. In the **Save this Index** panel, enter a descriptive name (e.g., "High-Growth IT Basket" or "Dividend Anchors").
  2. Click **Save**. The configuration is saved to the database, and the listing is refreshed.
  3. Saved indexes appear in the **📂 Saved Indexes** panel at the bottom of the page, showing the date created, period, and list of holdings with target weights.
  4. Click **Load** on any saved item to restore its configuration and rebuild the chart.
  5. Click the trash icon (🗑) to delete old index configurations (users can save up to **20 indexes**).

Ready to Analyse Indian Stocks Like a Pro?

Finmagine gives you 30+ computed financial ratios, sector benchmarks, FII/DII flows, the Finmagine Score, and AI-powered analysis — all in one place.

Analyse a Stock → Create Free Account
← All Feature Guides