Agentic tradingRiskPortfolio managementMulti-market

How to keep a multi-market agent portfolio from blowing up

Multi-market agent portfolios amplify ordinary trading risks through correlation blindness and leverage stacking. These controls keep losses bounded.

By the Felix team11 min read
Key takeaways
  • 01Correlation across stocks, crypto, perps, options, and prediction markets can turn a seemingly diversified agent portfolio into a concentrated bet that collapses under one macro shock.
  • 02Sizing orders in plain US dollars does not prevent hidden leverage stacking, so owners must enforce notional limits and global budget caps across all markets.
  • 03A kill switch must flatten positions and revoke keys across every market type simultaneously, and it must be controlled outside the agent, not by it.
  • 04Paper trading tests signal logic but cannot simulate cross-market liquidity gaps, funding spikes, or liquidation cascades that define live risk.
  • 05Scoped keys, sub-budgets, and independent audit logs keep a multi-market agent from becoming a single point of failure that can wipe out an entire account.

Multi-market agent portfolios expose traders to correlated drawdowns, hidden leverage stacking, and liquidity mismatches that single-market strategies rarely face. Because one API can route orders to stocks, crypto, perps, options, and prediction markets simultaneously, a flaw in the agent's logic can hit every venue at once. Controlling this means enforcing global budget caps, cross-market position limits, and a single kill switch that flattens everything before losses compound.

How does correlation hide across different market types?

Traders often assume that splitting capital across stocks, crypto, perps, options, and prediction markets creates natural diversification. In practice, these markets can move together during stress events, and an agent that lacks a consolidated view will not see the overlap until it is too late. An agent that sees each market as an independent opportunity may pile into positions that are secretly correlated because its training data or prompt treats each venue as a separate game. Suppose the agent holds long exposure through a stock broker, a perps venue, and a prediction market contract on the same macro theme. A sudden shift in interest rate expectations can push all three positions underwater at the same time. The agent does not feel the pain as a single portfolio because the positions live in separate API namespaces with separate balance displays. The owner, however, faces a single concentrated drawdown that consumes capital faster than any individual stop-loss would suggest. The problem worsens when the agent uses options to hedge a perp position. If the hedge is mis-specified, the two legs can decay together rather than offset each other, especially if volatility collapses across both instruments. Cross-market correlation is not just about price direction. It also appears in liquidity, funding rates, and margin requirements. A margin call in a perps account can force the agent to close a stock position at exactly the moment that stock market liquidity dries up. The resulting slippage turns a manageable loss into a larger one. The first step in controlling this risk is to force the agent to report total exposure in one currency unit, not in contract counts or venue-specific metrics. Only then can the owner see that a $500 stock position and a $500 prediction market position are both riding the same macro bet. Without this aggregation, the agent is effectively running a concentrated portfolio while the owner believes it is diversified.

Why do agents accidentally stack leverage?

Imagine an agent that sizes orders in plain US dollars. It might believe it is risking $1,000 per position. In reality, the economic exposure can be much larger because leverage is not always visible in the order ticket. A $1,000 options position might control several thousand dollars of notional delta, and if the underlying moves sharply, gamma can expand that delta further. A $1,000 perp position on a venue that offers 10x leverage is actually $10,000 of notional exposure. If the agent holds both, the owner is suddenly exposed to $11,000 of market risk from what looks like $2,000 of capital. The API normalizes order sizing into dollars, which helps with consistency and reduces arithmetic errors, but it does not eliminate the underlying leverage embedded in each instrument. Agents can stack leverage without knowing it because they do not see the consolidated balance sheet. The perp venue reports an unrealized profit and loss number. The options venue reports a different one. The stock broker reports a third. The agent optimizes each in isolation, often targeting a fixed percentage of some perceived account balance that is actually a fraction of the true notional exposure. During a volatile session, the combined portfolio can breach a margin threshold that no single venue would trigger. When that happens, the most leveraged position gets liquidated first, often at a loss, and the cascade can pull the rest of the portfolio down as the agent tries to rebalance. To prevent this, owners should set position limits in notional terms, not just in order budget terms. The agent should also be forbidden from opening new positions when the total notional exposure across all markets exceeds a fixed multiple of the account equity. This requires the API to translate each instrument into a common risk metric, which is exactly what a multi-market infrastructure must do if it wants to prevent silent leverage accumulation.

What should a global risk budget look like?

Per-market limits are necessary but not sufficient. An agent with a $1,000 cap on stocks, a $1,000 cap on crypto, a $1,000 cap on perps, a $1,000 cap on options, and a $1,000 cap on prediction markets can still deploy $5,000 in total. If those positions are correlated, the drawdown can exceed the entire account balance in a single afternoon. A global risk budget treats the five markets as one portfolio with one boundary. The owner sets a single hard cap on the total capital the agent can deploy at any moment. Within that cap, the agent is free to allocate across markets according to its strategy, but it cannot breach the ceiling even if every individual market limit says it has room. Non-custodial controls make this enforceable by construction. The funds sit in a wallet the owner controls. The agent can spend within the scoped limits but can never withdraw to itself. Withdrawal addresses are owner-approved only, so a compromised agent cannot send funds to an external wallet. Budget caps are enforced by the API layer, not by the agent's own logic, which means a buggy or adversarial agent cannot override them by rewriting its own prompt. The safety model does this across every market type from one configuration surface. The exact request schema is in the docs; the shape looks like this.

{
  "tool": "set_global_limits",
  "params": {
    "budget_usd": 5000,
    "max_notional_multiplier": 2.0,
    "withdrawal": false,
    "markets": ["stocks", "crypto", "perps", "options", "prediction_markets"]
  }
}

Owners should also define drawdown tiers that tighten as losses accumulate. At a 5% portfolio loss, the agent reduces position size. At a 10% loss, it pauses new entries. At a 20% loss, the kill switch flattens everything and revokes the key. These tiers should be written into the API limits, not into the agent's prompt, because an LLM can rationalize its way around a soft rule. Hard stops at the infrastructure layer survive logic errors, reasoning failures, and prompt injection. The owner should review these tiers weekly, because a strategy that made sense in a low-volatility regime can become dangerous when volatility rises and the agent's own leverage multiplies the impact.

How does a cross-market kill switch work?

A kill switch is only useful if it actually closes positions and revokes access across every market at once. Many trading systems offer a stop button for one venue. A multi-market agent needs a single button that reaches all five because a runaway position in any one market can contaminate the others through margin calls or forced liquidations. The safety model provides this by construction. When the owner triggers the panic switch, the API flattens open positions in stocks, crypto, perps, options, and prediction markets, then revokes the agent's key before any new orders can be placed. Because the system is non-custodial, the agent cannot withdraw funds before the flattening completes. The owner retains control of the withdrawal addresses and can move funds manually after the positions are closed. The kill switch must be external to the agent. If the agent itself decides when to stop, a bug in the decision loop or a hallucinated confidence score can disable the stop exactly when it is needed most. The owner should host a simple webhook or keep a manual trigger that bypasses the agent entirely and talks directly to the API. Running an agent with real money requires treating this switch as a primary feature, not an afterthought. The basics of safe live deployment cover how to test and monitor it before committing capital. The exact mechanics of flattening vary by instrument. A stock position sells into the market. A perp position closes against the book. An options position may need to be sold or exercised depending on time to expiration and liquidity. A prediction market position exits through the available resolution mechanism or order book. The API abstracts these differences so the owner does not need to send five separate commands under panic. The important thing is to test the kill switch in paper trading before going live. A switch that works on one market but times out on another is not a safety system. It is a false promise that leaves the owner with a partially closed portfolio and no way to finish the job.

Why does paper trading miss the real danger?

Paper trading is essential for testing logic, but it cannot simulate the liquidity gaps and margin calls that define multi-market crises. In a paper environment, an agent can exit a large perp position at the mark price without moving the market. In live trading, that exit might move the price, face partial fills, or trigger a liquidation engine that takes over before the agent can act. Common paper trading mistakes include assuming that fills are free and instantaneous across all markets. Paper tests also fail to capture the cross-market funding dynamics that erode capital slowly before a shock arrives. Imagine an agent holds a long perp and a short stock position as a hedge. In paper trading, the two PnL lines offset neatly and the portfolio looks market-neutral. In live trading, the perp funding rate can turn sharply negative while the stock borrow fee rises. The combined carry cost bleeds the account even if the directional bet is correct, and the agent may not notice because it checks each venue in isolation. Owners should use paper trading to validate signal generation and basic order routing, then move to live trading with a minimal global budget to observe real slippage, funding, and liquidation behavior. The transition from paper to live is where most blow-ups begin, because the agent suddenly faces real constraints that were invisible in simulation. A paper test that shows smooth equity curves can hide the fact that the agent is one liquidity gap away from a total loss.

How do you keep the agent from becoming a single point of failure?

One API key that can trade every market is powerful, but it must be scoped so that compromise does not mean total loss. Scoped keys let the owner restrict the agent to trading only, with no withdrawal rights, and to specific markets if needed. The owner should also consider whether one agent should control all five markets by itself. Multi-agent systems can split responsibilities: one agent for directional bets, another for hedging, a third for prediction market overlays. Each agent gets its own scoped key and its own sub-budget. If the directional agent fails, the hedging agent can remain flat or even close protective positions without exposing the entire account to a single logic error. Even with a single agent, the owner should rotate keys regularly and monitor API logs for anomalous order patterns. An agent that suddenly starts trading size in a market it normally ignores is a signal to hit the kill switch immediately. Monitoring should be independent of the agent. If the agent writes its own logs, a compromised agent can lie about its own state. The owner should rely on the API's audit stream for ground truth. Non-custodial infrastructure means the agent never holds the funds, but a scoped key is still a weapon if it is stolen and used before the owner notices. Treat it like a credential that can spend but not steal, and protect it with the same rigor as the wallet itself. Trading can lose money, including everything, and no amount of tooling changes that fundamental fact. The goal is to fail small and fail early, not to prevent all losses, because perfection is not a realistic benchmark for any agent that trades live.

Frequently asked questions

Can one agent safely trade all five market types at once?

A single agent can trade all five market types, but doing so concentrates operational risk. If the agent's logic contains a flaw, that flaw can execute across every market simultaneously. The safest approach is to scope the key tightly, set a global budget cap, and maintain an external kill switch that the agent cannot override.

What is the biggest mistake when setting per-market limits?

The biggest mistake is treating each market as an isolated account. An agent with separate limits for stocks, crypto, perps, options, and prediction markets can still deploy the sum of those limits into correlated positions. A global budget that aggregates all markets into one risk pool prevents this hidden concentration.

How is a trading agent different from a trading bot in terms of safety?

A trading agent relies on an LLM that can reinterpret instructions, which makes hard API-level guardrails more important than soft prompt instructions. Unlike a traditional bot that follows deterministic rules, an agent might rationalize its way around a suggested stop. Budget caps and kill switches must live in the infrastructure, not the prompt.

Does paper trading prove that a multi-market strategy works?

Paper trading validates logic and routing but cannot simulate liquidity gaps, funding rate spikes, or cross-market margin calls. The transition from paper to live is where most hidden risks appear. Use paper to test mechanics, then deploy with a minimal live budget to observe real market behavior.

What happens if the kill switch fails on one market?

A partial kill switch is a failed safety system. The owner must test the switch across all five market types in paper mode before going live. If the switch times out on any venue, the agent should be restricted from trading that venue until the issue is resolved.

Can the agent withdraw my funds if it goes rogue?

No. The non-custodial model means funds remain in a wallet the owner controls. The agent can trade within scoped limits but cannot add new withdrawal addresses or move funds to itself. Only owner-approved addresses can receive withdrawals.

Give your agent a key.

One key to trade stocks, crypto, perps, options, and prediction markets. Live after owner authorization.

Keep reading

Not a brokerage, exchange, or investment adviser. Not investment advice. Trading involves risk, including total loss.