MarketBot icon indicating copy to clipboard operation
MarketBot copied to clipboard

[Feature]: Risk governance layer — position sizing limits based on market state

Open likidodefi opened this issue 7 months ago • 0 comments

Summary

MarketBot provides strong market intelligence and analysis for trading decisions. But there's a gap between "the market analysis says X" and "how much should I actually risk on this trade."

When MarketBot identifies a trading opportunity, what determines position size? Right now the agent or the user decides — but that decision should be constrained by current market conditions. This week BTC dropped 15%, F&G is at 12, and funding is negative. A trade idea from Monday and the same trade idea from today carry completely different risk profiles. The sizing should reflect that.

Intelligence without risk limits is how agents blow up. The analysis can be correct and the trade still ruins you if the size is wrong for the regime.

Proposed solution

A pre-trade risk check before MarketBot acts on any analysis. The bot queries a risk governance layer that returns:

max_position_size — dynamic, based on 30+ signals (macro, derivatives, on-chain, cycle phase) leverage_allowed — based on volatility regime policy_level — 5 levels: BLOCK (no trades) → CAUTIOUS (strict limits) → GREEN (full deployment) allowed_actions / blocked_actions — what's permitted right now direction_bias — whether longs or shorts are preferred given current positioning MarketBot analyzes the market. The risk layer says how much you're allowed to act on that analysis. Two separate concerns.

This fits naturally as an OpenClaw skill or tool that MarketBot calls before execution. I built a deterministic API for exactly this: https://github.com/likidodefi/riskstate-docs

Alternatives considered

LLM-based sizing (ask the model "how much should I risk?"): non-deterministic, the model that finds the opportunity shouldn't also set its own limits — same reason traders don't set their own compliance rules Fixed percentages: doesn't adapt to a market that just dropped 15% in a week User-defined limits: requires constant manual adjustment, defeats the purpose of an autonomous agent A deterministic external engine keeps risk governance independent from the intelligence layer.

Additional context

Live output from my system (April 13, 2026):

BTC: CAUTIOUS L3, 36% max, no leverage, LONG_PREFERRED ETH: CAUTIOUS L3, 53% max, no leverage API is free during beta, BTC + ETH, REST + MCP server available. Would complement MarketBot's analysis layer well — "intelligence proposes, risk permits, execution acts."

likidodefi avatar Apr 13 '26 20:04 likidodefi