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 structured verdict, and a signed certificate is issued separately when portable proof is required — expressed in the format your tool reads: a Cursor rule, a CLAUDE.md snippet, or a plain system-prompt paragraph. The free demo is unsigned; its known specimen answers have stable semantic fields, while volatile metadata may vary. No SDK or account is needed for that check.
What is the rule, in one sentence?
Run every candidate through the free demo battery as a first free filter — it catches format
errors and the obvious flaws at zero cost — and before any trade decision, validate the actual signal
through a paid check (POST /v1/validate/signal with an API key, $0.05 per
completed check), refusing to act on anything that returns fail or
insufficient_evidence and branching on the machine-readable
failure codes rather than on a good-looking equity curve. The demo
verdict is unsigned and not decision-grade, because only the paid check is ledger-recorded with full
family accounting. Everything below is that two-step rule in copy-paste form.
And when comparing signal PROVIDERS or validators?
Signals are not the only thing an agent should refuse to trust unaudited — providers and validators are, too. Before adopting any external signal source or any validation service (this one included), run the falsification protocol: seven tests — provenance, survivorship, pre-registration, placebo, costs, trial accounting, and the examiner test — each with a machine-checkable failure condition. The agent-rules block on that page is copy-paste ready, and rule 7 explicitly tells your agent to try to catch us being wrong via the golden specimens before paying anything.
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 — in two stages. 1. First free filter (no account): POST the returns series / equity curve / trade list to https://api.alphaassay.com/v1/assay/demo. Stop early if it already fails — the demo catches format errors and obvious flaws at zero cost, but its verdict is unsigned and not decision-grade. 2. Decision gate (API key, $0.05 per completed check): before any trade decision, POST the same payload to https://api.alphaassay.com/v1/validate/signal. Only this ledger-recorded verdict counts. - Do NOT trade if the verdict is "fail" or "insufficient_evidence". - Branch on failure_codes, not on a good-looking backtest: - no_net_edge -> no edge once realistic costs are charged - deflated_out_at_n=N -> stop tweaking; the family is statistically spent - On died_at == "family_deflation", 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. Two stages, in order:
# 1. first free filter — catches format errors and obvious flaws
curl -s https://api.alphaassay.com/v1/assay/demo \
-H "Content-Type: application/json" -d @signal.json
# 2. decision gate — ledger-recorded, $0.05/check
curl -s https://api.alphaassay.com/v1/validate/signal \
-H "Authorization: Bearer $ALPHAASSAY_API_KEY" \
-H "Content-Type: application/json" -d @signal.json
Rules:
- The demo verdict is unsigned and not decision-grade; only the paid
verdict from stage 2 justifies a trade decision.
- Refuse to trade when verdict == "fail" or "insufficient_evidence".
- Branch on failure_codes (no_net_edge = no edge after costs;
deflated_out_at_n=N = stop tweaking this family).
- On died_at == "family_deflation", 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). Use the free demo at /v1/assay/demo as a first free filter — it catches format errors and obvious flaws at zero cost, but its verdict is unsigned and not decision-grade. Before any trade decision, validate the signal through the paid check POST /v1/validate/signal with your API key ($0.05 per completed check); only that ledger-recorded verdict counts. Never trade a signal whose verdict is "fail" or "insufficient_evidence". Branch on the machine-readable failure_codes, retire a family when it deflates out (died_at "family_deflation"), 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. A fresh stateful result may reflect its effective timestamp and cumulative
tenant state; only the same non-empty request_id plus the same canonical request replays the
stored response. For an evaluated pre-registration, request the certificate separately and archive that
issued 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.