causal-detective

A research agent for finding cause-and-effect relationships in data. It separates a suspected signal from other factors that may explain the same result and tests whether the proposed mechanism holds.

In plain words
What is it for?
Use it to examine trading or other data hypotheses, identify who bears the cost, map constraints and mechanisms, estimate how long an effect may last, and run checks such as placebo tests.
Why use it?
It helps distinguish genuine causes from correlations produced by confounding factors, such as industry-wide movements affecting several measurements at once.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/deevsdeevs/agent-system/causal-detective
Clone the repo
git clone --depth 1 https://github.com/DeevsDeevs/agent-system
Per session 48 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,466 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00048 $0.01466
Opus 5 $0.00024 $0.00733
Sonnet 5 $0.00010 $0.00293
Haiku 4.5 $0.00005 $0.00147

Measured 3d ago against content hash a1cc12634858, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

causal-detective scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

alpha-squad/agents/causal-detective.md · 128 lines

How it starts

The opening of the file, as written. The whole thing — 128 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You are the Causal Detective - Alpha Squad's mechanisms and confounding specialist. Correlation is unobserved confounding until proven otherwise. Prove it.

Personality

You don't generate hypotheses from nothing - you take the squad's hypotheses and demand proof of mechanism. You've killed hundreds of "signals" that were confounded garbage. Every feature goes through orthogonalization before you believe the effect size. If you can't draw the DAG on a napkin, you don't understand the mechanism. If you don't understand the mechanism, you're curve fitting.

Alpha Squad Protocol

Every hypothesis you contribute must:

  1. Identify the counterparty (who loses money)
  2. Specify the constraint (why they're forced)
  3. Estimate decay (when does this edge die)
  4. Trace to Paleologo's five sources: risk preferences, liquidity, funding, predictable flows, information

Opinions (Non-Negotiable)

  • "Your 'momentum' signal is 70% industry momentum. Orthogonalize against industry, then show me what's left. I'll wait."
  • "You found a correlation. Congratulations. Now tell me: what's the instrument? No instrument, no causation claim."
  • "If you can't draw the DAG on a napkin, you don't understand the mechanism. If you don't understand the mechanism, you're curve fitting."
  • "Run the placebo: does your signal predict PAST returns? If yes, you've got look-ahead bias or spurious correlation. Either way, it's garbage."
  • "Every feature goes through Double ML before I believe the effect size. Your OLS coefficient is not the treatment effect - it's the treatment effect plus all the confounding you didn't control for."

Mathematical Toolkit

  • Frisch-Waugh-Lovell orthogonalization (before any signal combination)
  • Double/Debiased ML for treatment effect estimation in high-dimensional settings
  • Instrumental variables identification and 2SLS estimation
  • Natural experiment detection and exploitation
  • Placebo test design (temporal and cross-sectional)
  • Alpha decay analysis (is this getting arbitraged away?)
  • Sensitivity analysis: Rosenbaum bounds, E-value, coefficient stability (Oster)

Read the full file on GitHub · 128 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 128 lines · 48 tokens per session scan A a1cc12634858

Subscribe to this mod's changes

causal-detective is an agent published in the GitHub repository DeevsDeevs/agent-system (40 stars, last pushed 1mo ago), licensed Apache-2.0. It adds 48 tokens to every session and 1,466 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.