Per-trade stop-losses control the loss on a single contract; they say nothing about how much you lose when several positions move against you at the same time. If your bot opens concurrent positions on correlated instruments, the aggregate risk can be a multiple of what any single stop suggests. This article shows how to measure that correlation from data you can actually collect on Deriv, and how to enforce portfolio-level exposure caps in a bot so that independent per-trade limits cannot mask concentrated risk.
Trading involves significant risk and you can lose your entire stake. Test every strategy on a demo account first.
Why per-trade limits are not portfolio limits
A fixed-stake contract on Deriv has a simple risk profile: the stake is the maximum loss. That makes per-trade sizing easy to reason about and easy to enforce in Deriv Bot. It does not make the portfolio safe.
Consider three positions open at once, each with a stake of 1% of balance. If their outcomes are independent, the probability that all three lose is the product of the individual loss probabilities. If they are correlated, that product is wrong, and usually wrong in the optimistic direction. The per-trade rule “risk at most 1% per contract” is satisfied in both cases; the difference is entirely in the joint distribution, which no individual stop-loss observes.
Correlation on Deriv arises from at least three sources. First, synthetic indices share a common generator family: Volatility indices differ in volatility parameter, not in the underlying random mechanism, so short-horizon moves can co-move more than a naive independence assumption implies. Second, forex pairs share currency legs: EUR/USD and GBP/USD both carry USD exposure, and EUR/GBP is mechanically related to the other two. Third, and most often ignored, contract structure creates correlation even across uncorrelated markets: a basket of concurrent Rise/Fall contracts opened by the same signal at the same time is one directional bet replicated, not several independent bets.
The practical consequence: a bot that opens many small positions on a schedule can look diversified while holding a single concentrated exposure.
Measuring correlation from your own data
You do not need an external research feed. You need a consistent return series per instrument and a correlation estimate that you treat as an estimate, not a fact.
Define the sampling rule before you look at the data. A workable default: take mid or last prices at a fixed interval (for example, one minute), compute log returns over that interval, and align timestamps across instruments. Gaps matter; if one instrument has no tick in an interval, either forward-fill with an explicit flag or drop the interval for all instruments in the pair. Record which choice you made.
Compute the Pearson correlation of the aligned return series. Report the sample size alongside it. A correlation of 0.6 estimated from 40 observations and one estimated from 4,000 observations are not the same claim, and a bot that acts on the first as if it were the second is making an unforced error.
Two refinements are worth the effort. First, measure correlation conditional on the regime you care about: full-sample correlation understates co-movement during stress, which is exactly when concurrent positions hurt. Split the sample by realised volatility of a reference instrument and report correlation per bucket. Second, measure correlation of outcomes, not just prices, when your contracts are path-dependent. Accumulators and Multipliers have payoff structures that a simple return correlation does not capture; for those, the relevant statistic is the joint frequency of adverse outcomes in your own demo trade log, not the price correlation.
For fixed-stake Rise/Fall and Digits contracts, price correlation is a reasonable first proxy, provided you state that it is a proxy.
Correlation is unstable. Any number you compute is a property of the sample window, not of the market.
Enforcing portfolio-level caps in the bot
The cap has to be expressed in the same unit as the risk you are capping. For fixed-stake contracts, that unit is the stake. For Multipliers, it is the stake plus the exposure implied by the multiplier and the stop-out distance, which depends on platform settings you should verify in the Deriv API documentation rather than assume.
A minimal rule set, applied before every new entry:
- Compute the prospective stake of the new contract.
- Sum the stakes of all open positions whose pairwise correlation with the new instrument exceeds a threshold you fixed in advance (for example, 0.5 on the chosen window).
- Reject the entry if that sum plus the prospective stake exceeds the portfolio cap.
- Additionally cap the total stake of all open positions, correlated or not, at a second, higher limit.
- Log every rejection with the inputs that produced it, so the rule is auditable after the fact.
Pseudo-code:
cap_correlated = 0.03 * balance # 3% illustrative
cap_total = 0.05 * balance # 5% illustrative
rho_threshold = 0.5
on_signal(instrument, stake):
if stake > 0.01 * balance: reject("per-trade cap")
correlated = sum(p.stake for p in open_positions
if rho[p.instrument][instrument] > rho_threshold)
if correlated + stake > cap_correlated: reject("correlated cap")
if total_open_stake() + stake > cap_total: reject("total cap")
open(instrument, stake)
The numbers above are illustrative, not recommendations; the point is the structure. The per-trade cap stays in place as a second line of defence, and the session-level hard limits (daily loss, maximum drawdown, consecutive losses) remain the outermost boundary, because a portfolio cap on open positions does not bound losses already realised.
Worked example. Suppose a balance of 1,000 and a per-trade cap of 1% (stake 10). The bot’s correlation table, computed on a one-minute return window, shows EUR/USD and GBP/USD at 0.62. A signal fires on EUR/USD and opens a stake of 10. A second signal fires on GBP/USD. The correlated exposure is 10, the prospective stake is 10, and the sum is 20. With a correlated cap of 3% of balance, the limit is 0.03 × 1,000 = 30. The entry is allowed, and correlated exposure becomes 20, which is 2% of balance. A third correlated signal would bring the sum to 30, still within the cap; a fourth would bring it to 40 and be rejected. Note what the cap does and does not do: it bounds the sum of stakes at risk at 30 in this bucket, but if all three positions lose, the realised loss is 30, or 3% of balance, not the 1% a per-trade reading would suggest. That gap is precisely the risk the per-trade rule conceals.
If the correlation between the two pairs had been measured at 0.31 instead, below the threshold, both positions would count toward the total cap only. That is a deliberate design choice: a lower threshold is more conservative and rejects more entries, and the right value depends on your strategy’s holding period relative to the sampling interval.
Limitations
This approach does not solve correlation that appears only during stress; a table estimated in calm conditions will understate it. It does not capture correlation induced by contract mechanics, such as the shared expiry of a basket of contracts opened together, unless you model it explicitly. It does not bound losses from positions already open when a gap or a fast market moves through your assumptions, particularly on Multipliers where the stop-out level is a platform setting rather than something your bot controls. It does not replace session-level hard limits, and it does not make a strategy with negative expectancy viable; a correctly capped portfolio of losing trades is still a losing portfolio. Finally, any correlation estimate is a sample statistic, and treating it as a stable parameter is itself a modelling decision that should be recorded and reviewed.
Frequently Asked Questions
Does a per-trade stop-loss already limit my portfolio risk? No. A per-trade limit bounds each contract’s loss in isolation, but the portfolio’s loss is the sum of joint outcomes, which depends on correlation that the per-trade rule does not observe.
Which correlation threshold should I use? There is no universal value; pick one before testing, justify it by your holding period and sampling interval, and report how sensitive your results are to that choice rather than tuning it after seeing the equity curve.
Can I apply this to Multipliers the same way as fixed-stake contracts? Not directly. For Multipliers the relevant exposure is the stake combined with the multiplier and stop-out distance, and the exact behaviour depends on platform settings, so verify those in the Deriv API documentation before treating the stake as the maximum loss.
Key Takeaways
- Per-trade caps and portfolio caps answer different questions; you need both, and the portfolio cap must be expressed in the same unit as the risk.
- Correlation on Deriv comes from shared synthetic generators, shared currency legs, and same-signal baskets; measure it on your own aligned return series and report the sample size.
- Reject entries at the bot level using an explicit rule set, and log every rejection so the rule is auditable.
- A 3% correlated cap can still produce a 3% realised loss; that is the point, and it is larger than any single per-trade limit suggests.
- Correlation estimates are unstable, and stress-period correlation is usually worse than the full-sample figure.
The rule set above is small enough to implement in Deriv Bot and to test on a demo account before any real stake is committed. The ORSTAC repository hosts open-source bots where these caps can be added and reviewed, and the Deriv API documentation plus the official Deriv API libraries cover the contract details you will need for Multipliers and path-dependent products. The platform used is Deriv, where a free demo account is available to test the bots; synthetic index specifications are documented under synthetic indices and bot construction under Deriv Bot. Discussion of implementations and edge cases continues in the ORSTAC Telegram group.
Trading involves significant risk and you can lose your entire stake. Test every strategy on a demo account first.
