OptionDesk

How to Backtest a Portfolio of Strategies on OptionDesk

A step-by-step guide to /backtest/portfolio — capital limits, correlation and Monte Carlo — with a worked example of two strategies sharing one balance.

Updated 2026-11-28 · 8 min read

On this page
  1. What does this screen do?
  2. How do you run one?
  3. What do the numbers mean?
  4. A worked example
  5. What mistakes do traders make?
  6. Next step

/backtest/portfolio runs several saved strategies together against one shared balance, with capital limits applied the way a real account would enforce them, and reports how the combination actually performed — not what adding up separate backtests would suggest. This page walks through the panels and how to read correlation and Monte Carlo output.

Every rupee figure on this page is hypothetical. It comes from backtested runs on historical NSE data — projected, not advice, and not indicative of future results. Every trade is sized at today's lot size.

Several saved strategies against one balance, with the correlation between them reported alongside the combined P&L. Several saved strategies against one balance, with the correlation between them reported alongside the combined P&L.

What does this screen do?

A trader running two saved strategies usually evaluates them apart — each gets its own backtest, its own P&L, its own drawdown — and assumes running both together roughly means adding the numbers and getting some diversification benefit for free. That assumption can be wrong in a specific, measurable way: if the strategies tend to win and lose on the same days, combining them isn't diversification, it's the same bet doubled, with double the cost.

/backtest/portfolio is not a second backtester — it's the strategy library's strategies, run through the same engine, but sharing one balance and one set of position limits instead of running in isolation. It exists to catch exactly the overlap a pair of solo backtests can't show.

It also isn't a strategy-picker or a recommendation engine. It doesn't suggest which saved strategies to combine, and a low correlation number on one tested period is not a promise that two strategies will stay uncorrelated going forward — it's a measurement of what actually happened on the trades in that run.

How do you run one?

Strategies row. Pick up to 8 saved strategies to run together, from the time-based backtest or the indicator backtest. Every one must already be saved and appear in My strategies, and a time-based setup there offers Portfolio backtest in its Open in menu. There is no rule editor on this screen, so go back to the backtest to change a definition.

Capital and limits row. Set Starting capital — the single shared balance every strategy draws from. Most positions at once caps how many positions across all strategies can be open simultaneously. Per-strategy cap percent limits how much of the total balance any one strategy can draw, so one aggressive strategy can't consume the whole account. Futures margin percent sets the margin assumption for any futures legs in the mix.

Run portfolio. Press it, and the engine replays every selected strategy's trades against the shared balance and limits, in date order, so overlapping positions, shared drawdown timing, and refused trades are all resolved the way a single real account would experience them.

The Capital and limits row is where most of the honesty in this screen lives. Starting capital that's set unrealistically high relative to what you'd actually fund an account with flatters every metric that's expressed as a percentage of balance — utilisation looks low, drawdown-as-percent looks small, even though the rupee numbers underneath haven't changed. Set Starting capital to what you'd genuinely commit, not a round number chosen to make the percentages look better.

What do the numbers mean?

"What one balance actually delivered" is the headline block: Portfolio P&L and Return on capital are the combined result against the starting balance. Run separately shows what the same strategies would have made on independent accounts, for comparison. Cost of sharing is the gap between the two — what combining them into one balance actually cost or saved. Trades taken and Trades refused show how often a portfolio-level limit blocked a signal that would have gone through on a standalone account. Peak deployed and Max drawdown are read against the shared balance, not each strategy's own.

"Who contributed what" breaks the combined P&L down by strategy, so one large winner or loser inside the mix doesn't hide inside the total. It's the panel to check before assuming a positive portfolio result means every strategy in it earned its place — a portfolio can finish positive while carrying one strategy that lost money throughout, propped up by the rest.

"Do they move together?" is the correlation matrix — pairwise, 0 to 1.0, built from each strategy's day-by-day P&L across the run. This is the number that tells you whether you built a portfolio or one strategy expressed twice.

"How much of this was luck?" is the Monte Carlo panel — it reshuffles trade order many times and shows the resulting spread of outcomes, separating "this particular sequence" from "the underlying edge across all the trades taken." A wide spread across the reshuffled runs is itself informative — it says the specific outcome you got is only loosely determined by the trades themselves, and a different sequence of the same trades could plausibly have looked quite different.

A worked example

Two saved time-based strategies, "short straddle test" and "strangle test", both NIFTY, entry 09:20, exit 15:15 IST, a 30% position stop, saved with a window of 30 Jan to 30 Apr 2026, run against ₹10,00,000. All figures below are projected, not advice, from a historical simulation:

Metric Value
Trades taken 122 (61 from each strategy)
Trades refused 0
Portfolio P&L -₹65,022
Run separately -₹65,022
Cost of sharing ₹0
Return on capital -6.5%
Max drawdown -₹1,02,205
Peak deployed ₹3,61,843
Share of the balance at its busiest 36.2%
Correlation between the two strategies 0.957
Straddle contributed -₹41,787
Strangle contributed -₹23,235

This is the one place on this site where the worked example is a loss, and the reason is worth reading rather than skipping. A correlation of 0.957, on a scale where 1.0 is identical, means the two strategies won and lost on nearly the same days. Running them together did not spread risk across two independent bets. It concentrated cost and drawdown into one bet expressed twice, and paid the brokerage and slippage of both. Cost of sharing is zero because the balance was large enough to fund every trade, so the portfolio and the separate runs agree exactly. A smaller balance or a position limit would have produced refusals.

Peak deployed of ₹3,61,843 means about a third of the ₹10,00,000 was ever blocked. Read against that, the -₹1,02,205 drawdown is about 28% of what was actually deployed, and about 10% of the total balance. Those are different readings of the same number, which is why Capital and limits is where most of the honesty lives. Margin here is estimated for every position (the screen counts them), because a naked short is blocked on a percentage of spot in this model, not a computed spread, so treat the capital figures as indicative.

What mistakes do traders make?

Adding two solo backtests and calling it a portfolio result. As shown above, the interaction — shared drawdown timing, correlation, combined capital use — isn't visible from two separate single-strategy runs. It only shows up when they're backtested together.

Assuming more strategies means more diversification. Diversification depends on how the strategies move relative to each other, not on how many are in the mix. Two highly correlated strategies, or five, can all be the same bet wearing different structures — check "Do they move together?" before assuming otherwise.

Setting Per-strategy cap percent too loose. A cap that lets one strategy consume most of the balance defeats the purpose of running several — check Trades refused to see whether the limits are actually binding on anything.

Ignoring which days the drawdown happened on. A combined -₹1,02,205 drawdown could come from one bad day both strategies shared, or a slow bleed across many days. High correlation, as in the example above, points toward shared bad days rather than a slow bleed.

Skipping the Monte Carlo panel because the headline number already looks conclusive. A single sequence of 122 trades is one order those trades happened to occur in. "How much of this was luck?" reshuffles that order many times to show the spread of outcomes the same trades could have produced, worth reading even when the headline is a clear loss like the one above, since it shows whether -₹65,022 sits near the middle of that spread or at an unlucky tail.

Next step

Save the strategies you want to test together from the backtest screens, check them in /backtest/strategies, then run them as a set at /backtest/portfolio. Read "Do they move together?" before the headline return — it tells you whether you built a portfolio or one strategy twice.

Common questions

What does the portfolio backtest screen on OptionDesk do?
It runs up to 8 saved strategies, time-based or indicator-based, together against one shared balance, applying capital limits — starting capital, a cap on positions at once, a per-strategy percentage cap, futures margin percent — the way a single account actually would, then reports combined P&L, correlation between the strategies, and a Monte Carlo read on how much of the result could be luck.
Why can't I just add up two separate backtest results to get a portfolio result?
Because a shared balance changes the outcome in ways two solo backtests can't show — drawdown timing overlaps if both strategies lose on the same days, margin draws from one pool instead of two, and correlation between the strategies determines whether combining them actually spreads risk. Portfolio backtesting measures the combination directly instead of estimating it from parts.
What is strategy correlation, and where do I read it on this screen?
Under 'Do they move together?', a correlation matrix scores how closely each pair of strategies' P&L moved together across the backtest, from 0 (largely independent) to 1.0 (moving almost identically). In one hypothetical OptionDesk portfolio run, two saved strategies correlated at 0.957, close to the maximum — meaning they won and lost on essentially the same days. This is a property of the specific pair and period tested, not a general rule, and not advice.
What does 'Cost of sharing' mean on the portfolio results?
'Run separately' is what the strategies made on their own, each with unlimited capital. 'Cost of sharing' is the P&L of trades the shared balance could not fund, which is money you never had the chance to make, not a loss you took. It is zero when every trade fitted.
What do 'Trades taken' and 'Trades refused' mean?
Trades taken is the count of trades the portfolio actually executed. Trades refused counts signals that were valid for a strategy on its own but were rejected because a portfolio-level limit — Most positions at once, or a strategy's Per-strategy cap percent — was already full when the signal fired. A high refused count means the capital and position limits, not just the strategies themselves, shaped the result.
What does 'How much of this was luck?' show?
A Monte Carlo panel that reshuffles the sequence of trade outcomes many times to show the range of results the same trades could plausibly have produced in a different order — a way of separating 'this specific sequence happened to do well or badly' from the underlying edge. It is a hypothetical distribution built from historical trades, not a forecast.
Does portfolio backtesting account for shared margin across strategies?
Yes. Peak capital deployed is computed across the combined book — the way a broker's margin engine would treat simultaneously open positions — rather than adding each strategy's standalone margin estimate, which would overstate what the account actually needed.

Disclosures

  • Not investment advice. OptionDesk provides tools, analytics, backtesting and education for NSE F&O only. It is not a SEBI-registered Investment Adviser or Research Analyst, and does not provide investment advice, buy/sell calls, tips or trade execution. You place every order yourself, through your own broker.
  • Projected, not promised. Every projected figure — payoffs, max profit/loss, probability of profit, target-date P&L and similar estimates — is “projected, not advice.” Backtested and simulated results are hypothetical, do not represent actual trading, and are not indicative of future results.
  • Delayed market data. Market data shown on OptionDesk is delayed by approximately one minute — it is not a live feed. It is provided for analysis and education only, and must not be relied on for time-sensitive execution.
  • F&O risk. Trading in futures & options carries a high risk of loss and is not suitable for every investor. Consider your objectives and risk tolerance, and seek independent advice where appropriate.

More in Test