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 →
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.
  2. How to distribute weights (Equal weighting vs. Custom weighting models).
  3. Understanding monthly constant-weight rebalancing and its performance implications.
  4. Analyzing metrics like Total Return, CAGR, best/worst month, and individual stock returns.
  5. 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.
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 NSE stocks, applies weights, and plots a single unified cumulative return chart starting from a baseline of ₹10,000.

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

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 3

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 4

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