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

Quick Answer

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.

Reviewed by Associate Professor Charles Lo, CPA, PhD — Academic Reviewer Last reviewed

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.

    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.

    4

    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.

    5

    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.

    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.

    6

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

    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.

    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.

    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.

    Up nextPart 1
    Next ↓