Backtesting Calculator — Synthetic Demo

Explore how allocation and rebalancing change a fictional portfolio. This educational demo uses generated prices, not historical stock or ETF data. Its results cannot evaluate a real investment.

Settings

$

Fictional Assets

Total: 100%
%
%
Configure your portfolio to see results

Repeatable synthetic paths; arbitrary 0.05% daily drift and ±1.5% uniform noise. All calendar days are simulated. Names do not retrieve prices. Fees, distributions, taxes and market correlations are excluded.

Use the Simulation as a Calculation Example

  1. Label one to ten fictional assets and allocate exactly 100%. Labels do not select a security or change its generated price path.
  2. Choose positive starting capital and two dates, 2–3,650 calendar days apart. Dates label the simulation; they do not retrieve historical observations.
  3. Choose no rebalancing, calendar-quarter rebalancing or calendar-year rebalancing. Rebalancing occurs at synthetic closing prices without transaction costs.
  4. Run the demo. The same asset order and settings reproduce the same path. Changing inputs clears the old result so it cannot be mistaken for the new scenario.

What These Numbers Can and Cannot Show

The starting balance, endpoint return and maximum drawdown describe this generated path. CAGR, volatility and Sharpe ratio are annualized calculation examples. They are especially sensitive to assumptions and short date ranges. They provide no evidence that a real portfolio would survive a crash or deliver the displayed return.

The model starts each fictional price at 100. It uses independent seeded uniform daily shocks, a fixed positive drift and 365 observations per year. Real assets have different calendars, distributions, correlations, jumps and changing volatility. This is not a calibrated Monte Carlo forecast or a historical backtest.

Move from Demonstration to Historical Evidence

A historical backtest needs an identified data source, adjusted prices where appropriate, a defined universe and rules for execution, fees, cash flows and rebalancing. Test sensitivity and unseen periods before interpreting an apparent edge. Read TradingView’s strategy simulation documentation for its execution and cost assumptions.

Already have closed-trade totals? Use the Backtest Result Analyzer to summarize those inputs. This page does not import trades or run Pine Script.

Frequently Asked Questions

Does this calculator use real historical prices?

No. It generates repeatable synthetic price paths. Asset names are labels, not market-data queries. No result represents a stock, ETF, historical crisis, or investment forecast.

What assumptions generate the demonstration?

Each fictional asset starts at 100. Daily arithmetic returns have a fixed 0.05% drift and uniformly distributed noise between -1.5% and +1.5%. Paths are seeded by asset order, independent of labels, and include every calendar day. These arbitrary assumptions are not fitted to markets.

What does rebalancing do here?

At the first simulated date of a new calendar quarter or year, the model resets holdings to the entered target weights using that day’s synthetic closing prices. It excludes fees, taxes, slippage, cash flows and distributions.

How are the metrics calculated?

CAGR annualizes endpoint growth using elapsed days divided by 365. Daily-return population volatility is annualized with the square root of 365. The demonstration Sharpe ratio uses arithmetic mean daily return less a 2% annual cash-rate assumption divided by daily volatility, annualized with the square root of 365. Drawdown uses simulated daily balances only.

How should I perform an actual backtest?

Use adjusted historical data and explicit execution, cost and rebalancing rules in a historical backtesting system. If you already have closed-trade totals, the Backtest Result Analyzer can summarize them. Neither historical nor synthetic results guarantee future returns.

Ready to Create Advanced Trading Strategies?

Explore Pineify’s Pine Script coding workflow. Review generated code and test it in TradingView with explicit execution and cost settings; generated code and backtests require verification.

Explore Pine Script Coding