Free tool · No signup · Hypothetical results

Portfolio backtesting tool

See how a mix of stocks would have done over five years, including its worst fall, next to an S&P 500 fund.

StockEducation Editorial Team · Updated · 14 min read · How we check our tools

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.

Try a portfolio

Portfolio Backtester

See what would have happened if you had invested five years ago

Your Stocks

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.

Your split:

Strategy and Starting Amount

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.

Source and assumptions: Financial Modeling Prep reported daily prices on dates shared by every holding and SPY. Fixed starting allocations; no periodic rebalancing, separate dividend reinvestment, fees, slippage or tax. The 50/200-day crossover starts in cash. Data can be incomplete or delayed. Full method.

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.

  1. 1Enter each ticker and its share, choose a strategy and a starting amount
  2. 2Press Show Me What Would Have Happened and wait a few seconds
  3. 3Change one weight or swap one ticker and run it again

Your result in words

Hypothetical backtest

Load an example if needed, then press Show Me What Would Have Happened to see the result in words.

    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.

    Quick answer

    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

    $10,000 became$20,672
    S&P 500 fund$17,310
    Worst fall from a peak−32.8%
    Trend following instead$12,662

    Checked against Investor.gov · FINRA · see sources

    Key takeaways
    • 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.

    1

    The key numbers

    What each result tells you
    ResultWhat it means
    Ending value and total changeWhat the starting amount grew to, in dollars and percent
    Max drawdownThe 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 yearEach calendar year’s return for each strategy and the S&P 500

    All results are hypothetical and use reported daily prices.

    2

    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.

    3

    How do the examples compare?

    $10,000, 50/50, five years to October 15, 2026
    PortfolioBuy and holdTrend followingS&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.

    4

    Why does a 33% fall need a 49% gain to recover?

    Because the recovery starts from a smaller number. If $10,000 falls 33% to $6,700, getting back to $10,000 means gaining $3,300 on $6,700, which is about 49%. A 50% fall is worse: $10,000 drops to $5,000 and needs a 100% gain to return to where it started. Losses and gains are not symmetrical.

    That is why the tool shows max drawdown next to the ending value. Two portfolios can end at the same $20,000 after five years, but one might have dipped 15% on the way and the other 45%. The second needed a much bigger rebound just to break even, although drawdown depth alone does not tell you how long it stayed below its prior peak.

    Compare the drawdown with the S&P 500 fund over the same dates as well as the ending value. A portfolio that beat the index by a little while falling far harder took on extra risk for that small edge.

    The rule

    Look at the worst fall before the ending value. Could you have held on?

    Marks Part 1 done

    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.

    5

    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.

    6

    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.

    7

    Why can a hold with no rebalancing turn into one big bet?

    The tool sets your weights on day one and never resets them, so the winner keeps growing as a share of the portfolio. The NVIDIA and Coca-Cola example above uses two real companies with very different historical price paths. Even with an equal starting split, the faster-growing holding becomes a larger share. To measure the drift, divide each holding’s ending value by the portfolio’s ending value; the original 50/50 weights no longer describe the exposure.

    That drift can boost a historical result while increasing exposure to the winner. A real investor who rebalanced each year back to 50/50 would generally have ended with a different result; rebalancing does not guarantee a smoother ride or a better return.

    Trend following has its own cost. Its signal compares a 50 day and a 200 day average, so it reacts after a move has started. If it sells at $100 after a drop and the price rebounds before the next buy signal at $108, the stock rose 8% while the strategy was out. Ignoring interest and costs, the same cash now buys about 7.4% fewer shares; that is missed upside, not an automatic 8% cash loss. Several of those in a choppy market add up.

    The rule

    A rule that avoids falls also misses some rises. Test both.

    Marks Part 2 done

    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.

    8

    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.

    Your turn

    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.
    9

    If a portfolio won the last five years, will it win the next five?

    History says that is unlikely to be a reliable bet. S&P Dow Jones Indices tracks how often winning funds keep winning. In its year end 2025 persistence report, only 4.5% of large-cap active funds that were above median in 2021 stayed above median in each subsequent year through 2025, fewer than the roughly 6.25% that random chance would predict.4 That study concerns fund persistence, not the odds for a particular stock portfolio. It illustrates why selecting past winners is not a reliable forecasting method.

    The SEC puts it directly: back tested performance is hypothetical and does not reflect actual performance, and past performance cannot predict future results.3

    A better use of the tool is to pick a portfolio you would have chosen five years ago, before you knew the outcome, and study how deep its falls were. Then ask whether you would have held on through the worst of them, because that is the part a backtest can teach and a forecast cannot.

    The rule

    A backtest shows what happened, not what will.

    Marks Part 3 done

    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

    0 of 3 answered

    1. A portfolio rises from $10,000 to $15,000, falls to $9,000, then ends at $14,000. What was its max drawdown?

    Answer: B, −40%.The biggest fall from a peak: $15,000 to $9,000 is a 40% drop.

    2. In the example, why did trend following end lower than buy and hold?

    Answer: B, it sat in cash during part of the rise.Trend rules move to cash in downtrends and can miss rebounds.

    3. Why is picking last decade’s winners for a backtest a problem?

    Answer: B, it uses hindsight.You already know they won. That makes the result look better than any real decision could have been.
    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

    What is a portfolio backtest?

    A backtest applies a set of investments and rules to past prices to see what would have happened. For example, this tool shows that $10,000 split evenly between Apple and Microsoft five years before October 15, 2026 would have grown to about $20,672 by buying and holding, with a worst fall of 32.8% along the way. Backtests are useful for seeing how a portfolio behaved, especially in bad stretches, but the results are hypothetical and chosen with hindsight.

    Are backtests reliable for predicting future returns?

    No. A backtest shows one path the market actually took, and the next five years will be different. The SEC notes that back tested performance is hypothetical and that past performance cannot predict future results. Backtests also tend to look better than reality because they leave out trading costs and taxes and because people test stocks they already know did well. Use them to understand risk, such as the size of past falls, rather than to forecast returns.

    What is max drawdown?

    Max drawdown is the largest percentage fall from a peak to a later low during the test period. If a portfolio grows from $10,000 to $15,000, drops to $9,000 and then recovers, its max drawdown is 40%, the fall from $15,000 to $9,000. It matters because a deep fall is when many investors sell. A 33% drawdown needs about a 49% gain to recover, and a 50% drawdown needs 100%.

    Why compare my backtest with the S&P 500?

    Because a low cost S&P 500 fund is the simplest alternative most investors have. The index holds 500 leading U.S. companies covering about 80% of available market value. If your portfolio did not beat it, or beat it only with a much deeper fall, the extra effort and concentration may not have paid off. In this tool’s Apple and Microsoft example, holding beat the S&P 500 fund’s $17,310, but with a 32.8% drop along the way.

    What is hindsight bias in backtesting?

    It is picking investments for a test because you already know they did well. Testing last decade’s biggest winners will almost always produce impressive results, but nobody could have known to choose them at the start. This is the most common way backtests mislead beginners. A fairer test is to choose a portfolio you would have built at the start date, such as a broad mix, and see how it behaved through the bad years too.

    Does buy and hold beat trend following?

    It depends on the period, but in the tool’s examples buying and holding ended higher every time. With Apple and Microsoft, holding reached $20,672 while trend following ended at $12,662. Trend rules sell after prices fall below a moving average and buy back after they rise, so they can soften a long crash but often miss sharp rebounds. FINRA notes that strategies which jump in and out of the market are hard to make work.

    How far back does this backtesting tool go, and are dividends included?

    It requests about five years of reported daily prices from Financial Modeling Prep, using only dates shared by every holding and SPY, so coverage can be shorter. Dividends are not reinvested separately, and fees, spreads, slippage and taxes are excluded. Buy and hold never rebalances after day one. Some tickers may fail to load from the data provider; large U.S. companies such as Apple, Microsoft and Coca Cola worked when this page was written.

    Do my weights need to add up to 100?

    No. The tool balances the weights you enter, so 60 and 40, 3 and 2, or 120 and 80 all produce the same 60/40 split. Each holding’s share is its weight divided by the total of all weights. The split is set on the first day and never rebalanced, so a holding that grows faster than the others will take up a larger share of the portfolio by the end of the test.

    Next steps

    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
    1. Step 1 · DoneHow backtesting works
      See it on one card
      1. Backtest. Past prices applied to a portfolio and rules.
      2. Max drawdown. The biggest fall from a peak.
      3. Yardstick. Always compare with an S&P 500 fund.
      4. Example. Apple and Microsoft: $10,000 to $20,672, with a 32.8% fall.
      5. Trend rules. Avoid some falls, miss some rises.
      6. Hindsight. Past winners are not future winners.
    2. 2
      Step 2 · NowPlan your mix

      See an example split between stocks, bonds and cash.

      Open the allocation calculator Free, no signup.
    3. 3
      Step 3Follow the learning path
      The 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

    1. FINRA: Market timing. Why rules that jump in and out of the market are hard to make work.
    2. Investor.gov (U.S. Securities and Exchange Commission): Asset allocation and diversification. Why the mix of investments drives risk.
    3. Investor.gov (SEC): Investor bulletin on performance claims. Back tested performance is hypothetical, and past performance cannot predict future results.
    4. S&P Dow Jones Indices: SPIVA U.S. Persistence Scorecard, year end 2025. Top performing funds rarely stay on top.
    5. S&P Dow Jones Indices: S&P 500. The benchmark the tool compares against: 500 leading companies, about 80% of available U.S. market value.
    6. FINRA: Active vs. passive investing. Why a low cost index fund is the usual yardstick, and the trading costs that backtests leave out.

    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 24, 2026: V11 layout and expanded guide integrated, preserving the working price connection, calculations, controls and clearly dated historical examples.

    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.

    Up nextPart 1
    Next ↓