Mean reversion strategy
Skill yogeshg665/quill-trading-agent/skills/mean-reversion-strategy
Quill - Deterministic, risk-governed multi-agent trading engine for US equities. A strategy swarm proposes orders; an independent risk guardian has final say. Paper mode by default, gated live Robinhood MCP execution.
npx -y skills add yogeshg665/quill-trading-agent --skill mean-reversion-strategyAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Fade statistical extremes by buying oversold names and exiting overbought ones using a close-price z-score. WHEN: "buy the dip", "mean reversion trade", "this is oversold", "fade the spike", "revert to the mean", "z-score signal".
SKILL.md
1.9 KB, 382 tokens by cl100k_base, as published. Nobody here has run it
Mean-Reversion Strategy
Overview
A contrarian strategy. It computes a z-score of the current price against the mean of a lookback window of closes. A deeply negative z-score (oversold) earns a small buy tranche; a strongly positive z-score (overbought) exits a held position.
When to Use
- During the strategy swarm, for symbols with enough price history.
- Do NOT use it when the price standard deviation is zero (no signal).
Inputs
| Input | Required | Description |
|---|---|---|
snapshot.bars | yes | Price bars covering at least the lookback window. |
config.strategy.mean_reversion | yes | Lookback length and buy/sell z-score thresholds. |
Process
- For each candidate symbol, compute the mean and standard deviation of the lookback closes.
- Compute the z-score of the current price against that mean.
- If the z-score is at or below the buy threshold, propose a small buy tranche.
- If the z-score is at or above the sell threshold and the name is held, exit it.
Outputs
Buy or sell OrderProposal objects sized as a small tranche (buys) or a full exit
(sells), each citing the z-score.
Rationalizations
| Excuse | Rebuttal |
|---|---|
| "It is cheap, average down aggressively." | Sizing stays a small tranche; the guardian still enforces position limits. |
Red Flags
- A z-score computed from an inconsistent price series (bars not matching the quote).
- A signal when standard deviation is zero.
Verification
- Every proposal cites a z-score beyond the relevant threshold.
- Bars and quotes for a symbol are on the same price scale.