Portfolio and Multi-Asset Backtesting
Portfolio backtests simulate many positions with capital limits, sizing and rebalancing. Learn the key design choices, constraints, metrics and pitfalls.
Testing a rule on one asset is only the start. Real portfolios hold many positions, share limited capital, face constraints and rebalance over time. A portfolio backtest simulates all of this together: which assets to hold, how much of each, when to rebalance and what it all costs. Factor strategies, sector rotation, trend following across futures markets and multi strategy portfolios all require portfolio level testing to give realistic results.
Key design choices#
| Choice | Options | Lesson |
|---|---|---|
| Universe | Which assets can be traded on each date | Survivorship and Selection Bias |
| Signal | Ranking or scoring each asset | Combining Signals |
| Selection | Top N, threshold, long short | |
| Weighting | Equal, market cap, volatility scaled, optimised | Equal, Value and Volatility Weighting |
| Rebalancing | Monthly, weekly, threshold based | Rebalancing |
| Constraints | Position limits, sector limits, leverage, liquidity | Risk, Position, Loss and Drawdown Limits |
| Costs | Commissions, spreads, impact, borrow | Costs and Slippage in Backtests |
A simple example#
Universe management#
- Use point in time constituents: index members on each historical date.
- Handle delistings with final returns, including bankruptcies, often near minus 100%.
- Apply liquidity filters using past volume, so the strategy does not hold untradable stocks.
- Track corporate actions for splits, dividends, mergers and spin offs. See Corporate Actions, Delistings and Rolls in Backtests.
Constraints#
| Constraint | Why |
|---|---|
| Maximum position size | Limit concentration. See Concentration Risk |
| Sector and country limits | Avoid unintended bets |
| Participation limits | Trade no more than a share of daily volume |
| Leverage and margin | Stay within account limits |
| Short availability | Some stocks cannot be borrowed |
| Turnover limits | Control costs |
Portfolio metrics#
Beyond returns and Sharpe ratio, portfolio backtests should report:
- Turnover and total costs.
- Exposures: market beta, sectors, factors. See Factor Models.
- Concentration: largest positions and effective number of holdings.
- Drawdowns and recovery times. See Maximum Drawdown.
- Capacity: how returns change with assets under management. See Alpha Capacity and Crowding.
- Attribution: what drove returns. See P&L and Performance Attribution.
Common pitfalls#
| Pitfall | Effect |
|---|---|
| Survivorship bias | Overstated returns |
| Ignoring cash and margin limits | Positions that could not have been funded |
| Equal weighting illiquid stocks | Unrealistic small cap exposure |
| Rebalancing at the same prices used for signals | Look ahead bias. See Look-Ahead Bias |
| Unmodelled costs of high turnover | Fake profits |
Long short portfolios#
Long short backtests add complications: short positions need borrow availability and fees, short sale proceeds may earn interest, and gross exposure (long plus short) drives costs and risk. A market neutral portfolio should be checked for remaining beta, sector and factor exposures, since a portfolio that looks neutral by dollar amount can still carry hidden market risk. See Short Selling and Alpha and Beta.
Benchmarks#
Compare portfolio results with a relevant benchmark, such as an equal weight version of the same universe, not just a broad index. A strategy that beats the S&P 500 but trails an equal weighted small cap index may simply be capturing a size tilt rather than skill. See Size Factor.
Frequently asked questions#
What is a portfolio backtest?#
A simulation of a strategy across many assets at once, including selection, sizing, rebalancing, constraints and costs.
Why are portfolio backtests harder than single asset backtests?#
Because they require point in time universes, corporate actions, capital and margin limits, rebalancing logic and portfolio level costs.
What metrics should a portfolio backtest report?#
Returns, risk, drawdowns, turnover, costs, exposures to markets and factors, concentration and capacity.
Next, learn to handle splits, dividends and mergers in Corporate Actions, Delistings and Rolls in Backtests.
3 quick questions on this lesson. Get them all right to finish it.
Turn on JavaScript to take the quiz.
Mentioned in
- Event-Driven vs Vectorized BacktestingResearch and Backtesting
- Fill Models, Partial Fills and Order QueuesResearch and Backtesting
- Size FactorResearch and Backtesting
- Statistical ArbitrageStrategies and Styles
- Backtesting Libraries ComparedProgramming and Data