InvestTester
🇺🇸  en🇧🇷  pt-br🇪🇸  es🇫🇷  fr🇯🇵  ja🇨🇳  zh
  • Portfolio
  • Algo Trading
  • AI
  • Docs
  • API
  • WatchlistBlogComparisonsAssets
  • Platform
  • Tickers
  • Portfolio
  • Algo Trading
  • Results
  • Methodology
  • Alternatives
  • API and MCP
DocsTickersMarket TickersTicker ModifiersBrazilian Tickers: SELIC, IPCA and BondsUS Tickers: T-bills and TIPSEuropean Tickers: Euro Cash and BondsAsian Tickers: Japanese and Chinese BondsPortfolio BacktestAlgo TradingBacktest ResultsMonte Carlo SimulationMethodologyPortfolio Visualizer AlternativesAPI, MCP and AI Agents

Monte Carlo Simulation

A backtest shows one path: what happened. The Monte Carlo tab asks what could happen next if the future had days like the days of the run, in another order. It builds 1,000 possible paths for the next 10 years and shows where most of them go.

How it works:

  • The returns: the material is the daily returns of the run. They are the returns of the whole portfolio or strategy, after its trades and rebalancing, with the deposits taken out, so a deposit does not count as a gain.
  • One path: a path starts at the final balance of the run. For each future day, one day of the run is drawn at random and its return is applied. The same day can be drawn many times. A month has 21 trading days, and a path has 120 months.
  • 1,000 paths: the draw is repeated 1,000 times. At each month, the 1,000 values are put in order and the chart shows three of them.
  • The lines: Median is the value in the middle: half of the paths are above it. Optimistic is the value that only the best 10% of the paths pass. Pessimistic is the value that the worst 10% stay below. So 8 of 10 paths are between the two outer lines.
  • The line under the chart: the number of simulations, the number of daily returns of the run, and the share of the paths that end below the current balance.

How to read it:

  • The lines are not paths. No simulation follows the Optimistic line for 10 years: each line joins the value of that rank at each month, so the lines are smooth and real paths are not.
  • The distance between the outer lines is the uncertainty. It grows with time, and it is wider for a volatile portfolio.
  • The percent in the popup of a point is the change from the current balance.
  • The same run always gives the same chart, because the random draw starts from a fixed seed.

Limits:

  • Only the range you chose: the paths can only repeat days of the run. A range of a few good months projects 10 good years, and a range with no crash has no crash. Use a long range, with good and bad years. The tab needs at least 20 days of returns.
  • The days are independent: the draw loses the order of the days, so it does not keep a bad day after a bad day, or calm and nervous periods. Real markets have both, so a real result can be outside the outer lines more often than 2 times in 10.
  • No new money and no costs: the paths have no deposits or withdrawals, and no fees, taxes or inflation. For a strategy, the paths assume that it keeps giving returns like those of the run.
  • Not a forecast: the chart shows what the returns of the past could give. The future can be different from every path.
InvestTester | Created by Tpessia
support@investtester.com