Portfolio Backtest
Portfolio Backtest replays one or more portfolio configurations on historical data. It combines allocations, strategies, cashflows, rebalancing rules, and optional tax-aware accounting in one analysis.
Access: Public. Tax-aware engine requires sign in.
Open Portfolio Backtest →When To Use It
Use this tool when the question is about how a portfolio configuration would have behaved over a historical window. The result includes the full time series, summary metrics, and supporting tables for that analysis.
For distributional outcomes and failure-rate analysis across many simulated paths, use Monte Carlo instead. See Historical Backtest vs Monte Carlo below for a comparison.
Portfolio Model
| Level | What It Stores | Where It Rebalances |
|---|---|---|
| Portfolio | One or more allocations, portfolio-level cashflows, and portfolio-level rebalancing settings. | Between allocations when portfolio rebalancing is enabled. |
| Allocation | One strategy and its target portfolio weight. | Inside the strategy when the strategy itself holds multiple positions. |
| Strategy | Conditions, positions, signals, and strategy-level rebalance rules. | Within the active condition. |
Main Inputs
- Starting principal: initial portfolio value.
- Date range: historical sample used in the run.
- Price mode: total-return or raw-price return construction.
- Allocations and strategies: the holdings and rules being tested.
- Portfolio rebalancing: how the top-level allocation split is maintained.
- Cashflows: recurring or one-time contributions and withdrawals.
Editing A Portfolio
- Add or remove allocations at the portfolio level.
- Edit each allocation's weight and linked strategy.
- Open the strategy editor to add positions, signals, conditions, and strategy-level rebalancing.
- Load a Library strategy or Library portfolio when you need to reuse an existing building block.
See Strategy Gallery and Signals for the reusable rule and indicator model used inside the editor.
Rebalancing
Portfolio Backtest has two separate rebalance layers:
- Strategy-level rebalancing: restores weights within the active positions of a strategy.
- Portfolio-level rebalancing: restores the top-level split between allocations.
Both layers can use time-based or threshold-based policies. See Rebalancing Comparison for the detailed mode descriptions.
Glidepath Portfolios
A glidepath portfolio changes its target allocation over time. This models the common practice of shifting from growth-oriented to income-oriented holdings as the investment horizon shortens (for example, a target-date retirement fund).
- Static vs glidepath: toggle glidepath mode in the Advanced editor when a portfolio has two or more allocations.
- Milestones: each milestone specifies a date and the target weight for every allocation. The engine uses stepwise resolution: the most recent milestone on or before the current date determines the target weights.
- Dates must be strictly increasing. The milestone weights for each date must sum to 100%.
- Initial allocation rule: if the first milestone falls after the backtest start, the initial sleeve weights from the portfolio editor are used until that milestone takes effect. If a milestone is on or before the start date, its weights override the initial allocation.
Example: a portfolio with two allocations (SPY, AGG) and two milestones shifts from 80/20 on 2010-01-01 to 40/60 on 2020-01-01. In a 2005-2025 backtest the initial weights would be 80/20 (first milestone applies from 2010), then 40/60 from 2020 onward.
Cashflows
- Recurring cashflows: scheduled contributions or withdrawals.
- One-time cashflows: dated events applied once inside the backtest window.
- Sign convention: positive values contribute capital and negative values withdraw capital.
Read The Results
- Equity curve: cumulative value through time.
- Drawdown chart: peak-to-trough loss path.
- Metric table: summary statistics for return, risk, and benchmark-relative behavior.
- Return tables: yearly, monthly, or daily breakdowns of realized returns.
- Allocation and trading views: supporting charts and tables for how the portfolio moved through time.
Tax-Aware Engine
Tax-aware engine runs the same portfolio settings through a lot-level tax engine. The tax profile controls filing status, income, state, account type, lot selection, and optional loss-harvesting settings.
See Tax-Aware Backtest for the accounting assumptions and output interpretation.
Ticker Modifiers
Positions can use ticker modifiers when the backtest should use a transformed series rather than the base ticker.
Regression Analysis
The Regression tab runs an OLS regression of each non-benchmark portfolio's returns against the benchmark's returns. It provides a full set of diagnostics for evaluating how much of a portfolio's behavior is explained by benchmark exposure.
- Alpha: the intercept of the OLS regression, representing return generated beyond what beta exposure explains. Reported as both a per-period value and an annualized value.
- Beta: the slope coefficient measuring the portfolio's sensitivity to the benchmark. A beta of 1.0 means the portfolio moves in lockstep with the benchmark; higher values indicate amplified sensitivity.
- R-Squared: the fraction of portfolio return variance explained by the benchmark. Values closer to 1.0 indicate that the benchmark is a strong explanatory factor.
- Correlation: the Pearson correlation coefficient between portfolio and benchmark returns.
- Tracking error: the annualized standard deviation of the return difference between the portfolio and the benchmark. Lower values mean the portfolio tracks the benchmark more closely.
- Information ratio: the annualized excess return divided by the tracking error. A higher value indicates better risk-adjusted outperformance.
Select daily or monthly frequency to change the return interval used in the regression. Monthly aggregation uses geometric compounding of daily returns. The scatter plot shows the fitted regression line; the residual chart surfaces deviations from the linear model.
Compare A Portfolio Against A Benchmark
- Open Portfolio Backtest.
- Configure your portfolio with the target allocations and strategies.
- In the benchmark section, enter a ticker such as SPY, VTI, or a custom blend.
- Run the backtest. The equity curve, drawdown chart, and metric table include both the portfolio and benchmark series.
- Review benchmark-relative metrics: excess return, tracking error, information ratio, and capture ratios appear in the metric table.
Historical Backtest vs Monte Carlo
| Dimension | Portfolio Backtest | Monte Carlo |
|---|---|---|
| Input | One historical return path | Many simulated return paths |
| Output | Single time series, metrics, and charts | Distributional outcomes, percentile bands, and success rates |
| Best for | Exact historical behavior of a specific configuration | Range of possible outcomes and failure-rate analysis |
| Limitation | One path is one sample. Different date ranges can give different conclusions. | Simulated paths depend on the return model and its assumptions. |
Use Portfolio Backtest when you need detailed historical attribution, tax-aware accounting, or strategy-level diagnostics. Use Monte Carlo when you need to evaluate withdrawal sustainability, outcome distributions, or tail risk across many scenarios.