Guide
How to build your own index, step by step
To build your own index, write a rule for what gets in, choose the weights and when to reset them, then test it against the ETF you would otherwise buy, over every start date. In the example below, five drugmakers at 20% each grew $10,000 to $96,811 from 22 December 1998, against $110,823 for XLV, the health care ETF that holds all five, and fell further on the way.
What a custom index is, and the example we follow
An index is a list of holdings plus two rules: how much of each to own, and when to reset those shares. An ETF (exchange-traded fund: one share that holds many companies, traded like a stock) follows a list someone else wrote. Building your own means writing the list and rules yourself, then testing them before any money goes in.
This guide builds one index from idea to decision, with an example you can repeat: five drugmakers, tested against XLV, the health care ETF that holds all five.
Follow along: four portfolios, one start date
Portfolio What it holds Rule Our index Johnson & Johnson, Pfizer, Merck, Eli Lilly and Bristol Myers Squibb, 20% each Reset to 20% each at the end of every quarter Same five, left alone The same five, 20% each on day one Bought once, never reset Four without Lilly The same list minus Eli Lilly, 25% each Reset every quarter XLV (our benchmark) The health care companies in the S&P 500 Bought once and held Each starts with $10,000 on 22 December 1998, the first day XLV has prices, with dividends reinvested, and runs to 27 November 2026. The middle two are tests of our index, not alternatives.
Building your own index in eight steps
- 1Write the idea as a rule
- 2Choose the weights
- 3Choose when to reset
- 4Pick the benchmark
- 5Read the risk
- 6Test every start date
- 7Stress it
- 8Decide and track
Change a rule and test again
How we tested this
Step 1: Write the idea down as a rule
Turn the idea into a rule anyone could follow to get the same list: which companies qualify, how many, and on what date.
Follow along: the rule and the list
Our rule: "five large US drugmakers that were already household names at the end of 1998".
Company Ticker Share in our index Johnson & Johnson JNJ 20% Pfizer PFE 20% Merck MRK 20% Eli Lilly LLY 20% Bristol Myers Squibb BMY 20% All five were big, well-known names in December 1998: a list an investor could really have written then.
The first trap is hindsight bias: choosing holdings because you know how they did. A list of today's biggest drugmakers carries their success into the test, so it flatters you. The second is survivorship bias: a test can only include companies that still have a price history. Large 1998 drugmakers such as Warner-Lambert and Schering-Plough were later bought by rivals, so even an honest list leans toward survivors. Write the rule as of your start date, and note what it leaves out.
Step 2: Choose how much of each to own
Weighting sets each holding's share of the money.
Two ways to size the holdings
Equal weight
- Same share for every holding
- No company starts in charge
- Needs regular resets
- Small companies count as much as big ones
Market-cap weight
- Share follows company size
- How most index ETFs are built
- Needs no resets
- The biggest companies dominate
Market-cap weight means each company's share follows its total stock market value, as in XLV and most index ETFs. Equal weight gives every holding the same share. A tilt is fixed shares you pick yourself, which adds your judgment to what you test (equal weight vs market cap, tested).
Follow along: the weight choice
We use equal weight, 20% each. Without resets, the winners' shares grow on their own, so the index slowly turns into a bet on whichever company did best. In our engine's check, that version now holds more than half its money in Eli Lilly, which started with a fifth.
Step 3: Choose when to reset the weights
Rebalancing means selling some of what has grown and buying what has lagged, so the shares go back to the ones you chose. Common rules: monthly, quarterly, yearly or never (how often to rebalance, tested). In some years the reset rule alone changed what the same five companies returned.
| 1999 | 2000 | 2001 | 2002 | 2003 | 2004 | 2005 | 2006 | 2007 | 2008 | 2009 | 2010 | 2011 | 2012 | 2013 | 2014 | 2015 | 2016 | 2017 | 2018 | 2019 | 2020 | 2021 | 2022 | 2023 | 2024 | 2025 | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Five drugmakers, 20% each | −8.5% | +34.3% | −15.8% | −21.1% | +10.0% | −10.4% | −2.2% | +16.9% | +8.4% | −19.2% | +11.1% | +3.3% | +23.0% | +13.0% | +32.2% | +18.9% | +9.9% | +2.8% | +13.2% | +16.4% | +15.8% | +7.9% | +28.0% | +19.0% | −6.4% | +8.9% | +20.0% |
| Same five, never rebalanced | −8.6% | +29.7% | −14.5% | −18.8% | +5.7% | −5.5% | −3.0% | +14.5% | +7.7% | −18.7% | +11.0% | +1.9% | +18.6% | +11.8% | +33.5% | +17.5% | +7.9% | +3.9% | +15.9% | +9.4% | +15.1% | +9.1% | +27.2% | +17.7% | +9.7% | +14.7% | +33.6% |
| Four without Lilly, 25% each | −4.4% | +31.3% | −16.2% | −22.1% | +8.9% | −8.6% | −3.6% | +22.9% | +9.0% | −18.9% | +15.6% | +3.2% | +22.5% | +10.2% | +38.8% | +14.0% | +6.0% | +6.1% | +12.0% | +10.7% | +15.3% | +1.7% | +19.5% | +15.3% | −19.6% | +2.2% | +14.8% |
| XLV | +19.5% | −11.6% | −0.8% | −0.7% | +14.9% | +1.3% | +6.4% | +7.1% | +7.2% | −23.3% | +19.5% | +3.3% | +12.4% | +17.4% | +41.4% | +25.1% | +6.8% | −2.8% | +21.8% | +6.3% | +20.5% | +13.3% | +26.0% | −2.1% | +2.1% | +2.5% | +14.5% |
Full calendar years only. Full period: Indices Lab backtest, total return, mixes rebalanced quarterly, single funds held throughout, 22 December 1998 to 27 November 2026. Hypothetical results: past performance does not predict future returns.
Follow along: reset every quarter vs never
Year Our index (quarterly) Same five, left alone XLV 2000 +34.3% +29.7% −11.6% 2008 −19.2% −18.7% −23.3% 2022 +19.0% +17.7% −2.1% 2023 −6.4% +9.7% +2.1% 2025 +20.0% +33.6% +14.5% In 2023 the same five companies fell under one rule and rose under the other. The quarterly reset kept trimming Lilly back to 20% as it climbed; the untouched version let it grow. The reset rule is part of the design, not housekeeping.
Step 4: Pick the benchmark your index has to beat
A benchmark is the yardstick. Use the fund you would buy if you did not build your own: for five drugmakers, a health care ETF, not the whole market. CAGR (compound annual growth rate) is the steady yearly rate that turns the start value into the end value (how CAGR works). Over the full period, our index ended behind the ETF that already holds its five companies.
- Five drugmakers, 20% each $96,811
- Same five, never rebalanced $116,840
- Four without Lilly, 25% each $62,726
- XLV $110,823
Full period: Indices Lab backtest, total return, mixes rebalanced quarterly, single funds held throughout, 22 December 1998 to 27 November 2026. Hypothetical results: past performance does not predict future returns.
Follow along: what $10,000 became
Portfolio End value CAGR Gap vs XLV, a year Our index $96,811 8.5% −0.5 points Same five, left alone $116,840 9.2% +0.2 points Four without Lilly $62,726 6.8% −2.2 points XLV $110,823 9.0% Our index trailed XLV, the untouched version ended slightly ahead, and the four without Lilly far behind.
Step 5: Read the risk, not just the return
Max drawdown is the largest fall from a high to a later low (max drawdown explained); the longest time under water is how long an investor waited to get back to a previous high. Volatility measures how much returns swing; the Sharpe ratio is return per unit of swing (higher is better). Our index fell further and stayed down far longer than XLV.
- Five drugmakers, 20% each worst fall 51.6% (29 December 2000 to 3 March 2009), longest time below a previous high 11.5 years
- Same five, never rebalanced worst fall 48.8% (29 December 2000 to 3 March 2009), longest time below a previous high 11.6 years
- Four without Lilly, 25% each worst fall 48.9% (29 December 2000 to 3 March 2009), longest time below a previous high 11.0 years
- XLV worst fall 39.2% (10 December 2007 to 9 March 2009), longest time below a previous high 5.4 years
Full period: Indices Lab backtest, total return, mixes rebalanced quarterly, single funds held throughout, 22 December 1998 to 27 November 2026. Hypothetical results: past performance does not predict future returns.
Follow along: the worst fall and the longest wait
Portfolio Max drawdown Longest under water Volatility Sharpe Our index 51.6% 11.5 years 19.7% 0.51 Same five, left alone 48.8% 11.6 years 19.7% 0.55 XLV 39.2% 5.4 years 17.9% 0.57 Our index peaked at the end of 2000, hit its low in March 2009 and only got back to its old high in July 2012. With five companies, each one's own trouble (an expiring patent, a failed drug, a lawsuit) hits a fifth of the money; XLV spreads it across many more.
Step 6: Test every start date, not one
One start date can flatter or punish any design. A rolling window test starts a new investor every month and compares the index with the benchmark over the following 5, 10 or 20 years. The chart shows every 10-year window for our index against XLV.
Five drugmakers, 20% each finished ahead of XLV in 38.4% of 216 rolling 10-year windows (window ends by month). The last window Five drugmakers, 20% each won ended November 2026.
Full period: Indices Lab backtest, total return, mixes rebalanced quarterly, single funds held throughout, 22 December 1998 to 27 November 2026. Hypothetical results: past performance does not predict future returns.
Follow along: how often each finished ahead of XLV
Portfolio vs XLV 5-year windows ahead 10-year windows ahead 20-year windows ahead Calendar years ahead Our index 44.9% of 276 38.4% of 216 35.4% of 96 44.4% Same five, left alone 30.8% of 276 24.1% of 216 41.7% of 96 48.1% Our index finished ahead of XLV in fewer than half of the windows of every length. The untouched version, which ended ahead over the full period, was ahead in only 24.1% of 10-year windows: in our engine's check it was still behind XLV at the end of 2025 and only moved ahead during 2026.
Step 7: Stress it: split the history, then remove the best holding
Split the history in half, then remove the best performer and run it again to see how much rests on one pick. In the first half, all three versions of our index trailed XLV.
- Five drugmakers, 20% each $13,794
- Same five, never rebalanced $12,854
- Four without Lilly, 25% each $14,864
- XLV $19,355
First half: Indices Lab backtest, total return, mixes rebalanced quarterly, single funds held throughout, 22 December 1998 to 7 December 2012. Hypothetical results: past performance does not predict future returns.
Follow along: two halves, and the index without Lilly
Portfolio CAGR, first half CAGR, second half 10-year windows ahead of XLV Our index 2.3% 15.0% 38.4% Four without Lilly 2.9% 10.9% 12.0% XLV 4.8% 13.3% Our index's second-half lead over XLV depends on one company. Without Lilly, the other four trailed XLV in the second half as well, finished ahead in none of the 96 twenty-year windows, and their last 10-year win ended in July 2018.
If removing one holding turns a good result into a poor one, your index is really a bet on that holding.
Step 8: Decide, then track it against the benchmark
Fix or drop the index if any line fails.
Before you put money in your own index
- Rule written as of the start date
- Weights and reset rule chosen on purpose
- Compared with the ETF you would otherwise buy
- Worst fall and longest wait you could live with
- Every start date tested, not one
- Still holds up without the best holding
- Costs and taxes counted
Follow along: what the test says about our index
Five drugmakers at 20% each swung more, fell further and waited longer than XLV, and ended a little behind it. Leaving the weights alone ended slightly ahead, only because one company grew to more than half the index.
What this example can't show: trading costs and taxes from the quarterly resets, the drugmakers that were bought along the way, other start dates for the full-period figures, and the future. Once it is live, compare it with the benchmark once a year, change the rules only for a reason you would have written down at the start, and re-test from the same start date if you do (how to backtest a portfolio).
Questions
What is a custom index?
A list of holdings you choose, with your own rules for how much of each to own and when to reset the shares. An index ETF follows a list someone else wrote; a custom index follows yours.
Can I build my own ETF?
Launching an ETF is a regulated business run by fund companies. What an investor can do is hold the stocks directly with their own list and rules, which some brokers call custom or direct indexing, and test that list first.
How many stocks should my own index hold?
There is no magic number, but fewer holdings means each one matters more. In this test, five drugmakers fell 51.6% at worst against 39.2% for XLV. Removing your best holding and testing again shows how much rests on it.
Should my index use equal weight or market-cap weight?
Equal weight stops one company from taking over; market-cap weight follows the market's own sizes and needs no resets. Test both against the same benchmark; our equal weight vs market cap guide does this for RSP and SPY.
How often should I rebalance my own index?
In our rebalancing test of a stock and bond mix, monthly, quarterly and yearly resets ended close together, while never resetting let the winners take over. In this example the rule mattered most in single years such as 2023.
About this page. Figures on this page come from Indices Lab’s own data, powered by EODHD, and every number is recalculated after each market close; the text is reviewed by a person before it is published. Indices Lab is a research and educational tool: everything here is hypothetical and informational, not investment advice and not a recommendation to buy or sell any security. Past performance does not predict future results. See our methodology.