@hpsilab4
Haiyun HuFounder▲16
Builder & AI engineer, hpsilab
Oct 16 · Agents, Testing and Evals · Tokyo

Should a trading agent have to pass a risk check before it's allowed to place an order?

I'm Haiyun, building HPSILab in Tokyo. We serve stock and options analytics to AI agents over MCP.

The pattern we keep seeing: agents are good at forming a thesis and bad at asking "how much can this go wrong, and does it overlap with what I already hold?" So we built a pre-trade check that an agent calls before acting. It compares the stock's risk with SPY, checks the position size, and checks sector exposure and correlation with the current book. In our own paper-trading agent, that check is a hard gate rather than a line in the prompt.

Curious how others here handle this:

  • Do you enforce risk limits in code, or trust the model's instructions?
  • What data does your agent actually need before acting: options positioning, volatility, something else?

Happy to give free credits to anyone building a trading or research agent who wants to try it: hpsilab.com/developer

AgentsMCPTradingIntroductions

Comments2

  • @ryanallis
    Ryan Allis
    Founder of AI Lounge and SaasRise, helping founders reach $100M+ exits
    Oct 18

    A hard gate makes sense to me, since a prompt limit can be talked around by the model's own thesis. What happens when the check fails: does the agent get a reject with reasons and resize, or is it just blocked? Correlation estimates also shift fast in a selloff, so what lookback window do you use?

  • @hpsilab
    Haiyun Hu
    Building AI-native financial intelligence and risk analysis tools for developers and autonomous trading agents.
    Oct 19

    Thanks Ryan. When a check fails, the agent gets a refusal with a named reason (sector_cap, drawdown_halt, low_confidence, leveraged_product and so on) written to its decision log, not a silent block. It isn't resized either: the model can only ask for a share of equity, and code turns that into whole shares and refuses anything past the position or exposure cap. A permanent refusal (leverage, already held, no confidence) closes the plan; a temporary one (a cap, the cooldown, cash) is retried until its window closes. On correlation: it's a single 1-year window of daily log returns, with at least 30 overlapping days. You're right that it lags in a selloff, when correlations jump toward 1. A shorter stress window next to it would be a fair improvement; today the sector cap does more of that job. More at hpsilab.com/ — Haiyun

Log in to join the thread.