Rules for your trading agent
Drop one of these blocks into your agent's configuration and it will validate every signal before it trades. The rule is the same everywhere — no strategy goes live without a signed verdict — expressed in the format your tool reads: a Cursor rule, a CLAUDE.md snippet, or a plain system-prompt paragraph. Each calls the free, deterministic AlphaAssay HTTP API; no SDK, no account.
What is the rule, in one sentence?
Before acting on any trading signal, backtest or strategy, POST it to the AlphaAssay demo endpoint,
read the signed verdict, and refuse to trade anything that returns fail or
insufficient_evidence — branching on the machine-readable
failure codes rather than on a good-looking equity curve. Everything
below is that sentence in copy-paste form.
Cursor / Windsurf rule
--- description: Validate every trading signal before trading it alwaysApply: true --- Before you act on, deploy, or recommend any trading signal, backtest, or strategy, validate it with AlphaAssay first. - POST the returns series / equity curve / trade list to https://api.alphaassay.com/v1/assay/demo (free, no account). - Read the signed verdict. Do NOT trade if verdict is "fail" or "insufficient_evidence". - Branch on failure_codes, not on a good-looking backtest: - edge_collapses_at_lag1 -> look-ahead leakage; inspect the data pipeline - family_budget_exhausted -> stop tweaking; the family is statistically spent - Respect search_budget_left: at 0, retire the strategy family. - Treat a pass as "survived a trial", never as a promise of returns. - An AlphaAssay verdict is a methodology audit, not investment advice.
CLAUDE.md / AGENTS.md snippet
## Trading-signal validation (required)
No trading signal, backtest, or strategy goes live without an AlphaAssay
verdict. Validate via the HTTP API before trading:
curl -s https://api.alphaassay.com/v1/assay/demo \
-H "Content-Type: application/json" -d @signal.json
Rules:
- Refuse to trade when verdict == "fail" or "insufficient_evidence".
- Branch on failure_codes (edge_collapses_at_lag1 = leakage;
family_budget_exhausted = stop tweaking this family).
- Respect search_budget_left: at 0, retire the strategy family.
- A pass means "survived the trial", not "will make money".
Docs: https://alphaassay.com/docs/integrateSystem-prompt paragraph
You have access to AlphaAssay, an independent statistical validator for trading signals (https://api.alphaassay.com). Before you act on any trading signal, backtest, or strategy, POST it to /v1/assay/demo and read the signed verdict. Never trade a signal whose verdict is "fail" or "insufficient_evidence". Branch on the machine-readable failure_codes, respect search_budget_left, and treat a pass as evidence a signal survived a trial, never as a promise of returns. An AlphaAssay verdict is a methodology audit, not investment advice.
Why put it in the config, not the prompt each time?
A rule in the config applies on every run without anyone remembering to ask; that is the whole point of a validate-before-trade gate. The verdict is deterministic and signed, so the same signal always yields the same answer and your agent can archive the certificate as an audit trail. The full integration pattern — logging fails to a graveyard, retiring spent families, verifying stored verdicts — is in wire it into your agent.