Free tool · No signup · Hypothetical results
Portfolio backtesting tool
Pick a few stocks and how much to put in each, and see how the portfolio would have done over the past five years: the growth, the worst fall along the way and how it compares with the S&P 500.
StockEducation Editorial Team · Updated · 9 min read · How we check our tools
How would my portfolio have performed historically?
A backtest applies a chosen portfolio mix to historical prices and calculates how it would have performed. Look closely at the worst fall as well as the final return because a severe loss may have caused an investor to abandon the plan. The free StockEducation Portfolio Backtesting Tool tests allocations over the available period and can compare buy and hold with trend following. It reports returns, drawdowns and comparison charts. Results depend on the assets, dates and assumptions selected. They leave out some real costs and taxes and do not show future performance.
The tool
Test a portfolio on the past five years
Output Provider data, time shown in the tool
Before you start: Results use five years of daily prices; if a ticker fails to load, swap it and run again.
Portfolio Backtester
See what would have happened if you had invested five years ago
Enter each stock’s ticker (e.g. AAPL for Apple) and what percentage of your money goes into it. They do not need to add up to 100 as the tool will balance them for you.
Buy and Hold: Put your money in on day one and leave it for five years.
Trend-Following: Automatically buys when prices are rising and sells when they start falling.
Compare Both: Shows you how both strategies would have performed so you can compare them directly.
This is your starting amount, split across your stocks based on the percentages above.
No completed backtest available.
Would this strategy have actually made this money?
No. These results are hypothetical.
No real money was at risk and no trades were placed.
Because nothing was executed, these results ignore the gap between buy and sell prices, delays in filling orders, brokerage, and tax.
Backtests are also built with hindsight, using data and choices that were not available at the time.
No claim is made that any real account would have achieved these results, or would achieve them in future.
Would this strategy have actually made this money?
No. These results are hypothetical.
No real money was at risk and no trades were placed.
Because nothing was executed, these results ignore the gap between buy and sell prices, delays in filling orders, brokerage, and tax.
Backtests are also built with hindsight, using data and choices that were not available at the time.
No claim is made that any real account would have achieved these results, or would achieve them in future.
Add your stocks, pick a strategy, enter your starting amount, then click Show Me What Would Have Happened.
Educational content only. Historical results are hypothetical and do not predict future returns. This tool does not provide personal financial, trading or investment advice.
How to use it (three steps)
Enter each stock’s ticker and its share of your money, choose a strategy and a starting amount, then press Show Me What Would Have Happened. Results take a few seconds. Not sure where to start? Load an example.
- 1Enter each ticker and its share, choose a strategy and a starting amount
- 2Press Show Me What Would Have Happened and wait a few seconds
- 3Change one weight or swap one ticker and run it again
Your result in words
Hypothetical backtestLoad an example if needed, then press Show Me What Would Have Happened to see the result in words.
Compared with your pinned result
Compare two plans
Keep or share this result
Saved numbers and images stay on this device. A copied link holds only the tool inputs, nothing else.
What is a portfolio backtest?
A backtest applies a set of investments and rules to past prices to see what would have happened. With $10,000 split evenly between Apple and Microsoft five years before October 15, 2026, buying and holding would have grown to about $20,672, against $17,310 for the same money in an S&P 500 fund. Along the way it fell as much as 32.8% from a peak. Backtests show how a portfolio behaved, including the bad stretches, but they are built with hindsight and do not predict the future.1
Checked against Investor.gov · FINRA · see sources
- Backtest. Past prices applied to a portfolio and rules.
- Max drawdown. The biggest fall from a peak.
- Yardstick. Always compare with an S&P 500 fund.
- Example. Apple and Microsoft: $10,000 to $20,672, with a 32.8% fall.
- Trend rules. Avoid some falls, miss some rises.
- Hindsight. Past winners are not future winners.
Reading the resultsThe two strategiesWhy backtests misleadTest yourself
Part 1 of 3 · Reading the results
What do the backtest results mean?
The tool shows the ending value, the total change, the worst fall and a year by year table, next to an S&P 500 fund for comparison.
The key numbers
| Result | What it means |
|---|---|
| Ending value and total change | What the starting amount grew to, in dollars and percent |
| Max drawdown | The biggest fall from a peak to a later low. It shows how painful the ride was. |
| S&P 500 (SPY) | The same money in an S&P 500 fund over the same dates |
| Year by year | Each calendar year’s return for each strategy and the S&P 500 |
All results are hypothetical and use reported daily prices.
Why does max drawdown matter so much?
A portfolio that doubled but fell 33% along the way asked you to sit through seeing $10,000 drop toward $6,700 before recovering. Many investors sell at that point and miss the recovery. Knowing the worst fall helps you judge whether you could have held on.
How do the examples compare?
| Portfolio | Buy and hold | Trend following | S&P 500 fund |
|---|---|---|---|
| Apple and Microsoft | $20,672 | $12,662 | $17,310 |
| Amazon and Alphabet | $19,824 | $18,948 | $17,310 |
| Nvidia and Coke (KO) | $58,130 | $48,572 | $17,310 |
From this tool on October 16, 2026. Past results, chosen with hindsight; not a forecast.
Look at the worst fall before the ending value. Could you have held on?
Part 2 of 3 · The two strategies
What is the difference between the strategies?
The tool can compare simply holding with a rule that tries to avoid downtrends.
Buy and hold versus trend following
- Buy and hold: invest on day one and never sell.
- Trend following: starts in cash, buys when the 50 day average price rises above the 200 day average, and sells when it falls back below.
- Compare both: shows the two side by side, with the S&P 500 fund as a yardstick.
Trend rules can soften big falls, but they also sit in cash during some rises. In the Apple and Microsoft example, trend following ended at $12,662 against $20,672 for holding.
What about rebalancing and dividends?
The tool keeps the starting split and never rebalances, and it does not reinvest dividends separately, charge fees or apply tax. Real results would differ.
A rule that avoids falls also misses some rises. Test both.
Part 3 of 3 · Why backtests mislead
Why can a backtest be misleading?
Backtests are useful for learning how portfolios behave. They are easy to over trust.
The common traps
- Hindsight. It is easy to pick stocks that we now know did well.
- One period. Five years is a short window; a different five years can tell a different story.
- Missing costs. No spreads, fees, taxes or delays are included.
- Data gaps. Returned coverage can be shorter than five years, and some tickers may not load.
Past performance does not guarantee future results. Use a backtest to understand risk, not to choose stocks because they won last time.
Turn the lesson into a plan. The portfolio allocation calculator shows an example split between stocks, bonds and cash, and why it shifts with time.
Open the allocation calculator Free, no signup.A backtest shows what happened, not what will.
Mistakes to avoid
Three mistakes to avoid, and what to do instead
Mistaking the past for the future
A portfolio that won over the last decade was built with hindsight. Backtests show behavior, not what comes next.
Testing only good years
Include a crash. The drawdown tells you whether you could actually have held on.
Ignoring costs and taxes
Backtests usually skip fees, spreads and taxes, which lower real results.
Quick check
Three quick questions and one why
1. A portfolio rises from $10,000 to $15,000, falls to $9,000, then ends at $14,000. What was its max drawdown?
2. In the example, why did trend following end lower than buy and hold?
3. Why is picking last decade’s winners for a backtest a problem?
Why: why compare every backtest with an S&P 500 fund?
A low cost S&P 500 fund is the simplest alternative most investors have. If a portfolio did not beat it, or beat it only with a much bigger fall, the extra effort and risk may not have been worth it.
Common questions
Portfolio Backtesting Tool FAQ
How far back does the backtest go?
About five years of shared daily prices for every holding and SPY. Returned coverage can be shorter.
Why did my ticker fail to load?
Prices come from a data provider, and some symbols may not load. Try a large U.S. company, or try again later.
Do my weights need to add up to 100?
No. The tool balances them for you.
Are dividends included?
Not separately. The tool uses reported daily prices and does not reinvest dividends on its own.
Can I save or share a backtest?
Yes. Save my numbers keeps your inputs on this device, and Copy link to these numbers opens the same tickers and weights.
You have seen how a portfolio behaves. Now learn how to build one that fits you.
A free account saves your course progress and opens the $1,000,000 practice simulator, where you can run a real portfolio forward with virtual money before any of your own is at stake.
Free, no card. Lessons and tools stay free to use without an account.
Backtesting on one card, and where to go next
- Step 1 · DoneHow backtesting works
See it on one card
- Backtest. Past prices applied to a portfolio and rules.
- Max drawdown. The biggest fall from a peak.
- Yardstick. Always compare with an S&P 500 fund.
- Example. Apple and Microsoft: $10,000 to $20,672, with a 32.8% fall.
- Trend rules. Avoid some falls, miss some rises.
- Hindsight. Past winners are not future winners.
- 2Step 2 · NowPlan your mix
- 3Step 3Follow the learning pathThe learning pathFree
Learn the rest in the right order
Lessons, videos, tools and quizzes, ordered so each step builds on the last, from market basics to building a portfolio.
Start the learning path
Want the full sequence? See the course outline →
Sources and assumptions
- FINRA: Market timing. Why rules that jump in and out of the market are hard to make work.
- Investor.gov (U.S. Securities and Exchange Commission): Asset allocation and diversification. Why the mix of investments drives risk.
How the tool works: it requests about five years of reported daily prices from Financial Modeling Prep through StockEducation’s server, on dates shared by every holding and SPY. Buy and hold invests the starting amount on day one at the entered weights with no rebalancing. Trend following starts in cash and uses a 50 day and 200 day moving average crossover. Max drawdown is the largest percentage fall from a peak to a later low. Dividends are not reinvested separately; fees, slippage and tax are excluded. Example results on this page came from the tool on October 16, 2026, for the window October 15, 2021 to October 15, 2026.
Page history. October 22, 2026: page rebuilt around the unchanged live tool. Worked examples were produced with this tool on the date given beside each one.
StockEducation provides general education, not personal financial, tax or legal advice. Results are illustrations based on the assumptions you enter, not forecasts or promises of any return. Investing involves risk, including the loss of money you invest.
Sources and reference material
Primary sources and original reference material for the concepts discussed on this page.
- SEC Form N-1A, Item 26: Average annual total return methodology
- Investor.gov: Compound interest calculator and assumptions
- FINRA: Evaluating stocks and financial ratios
References added 14 October 2026.
