agentleFS
Superior-TradeSuperior-Trade/superior-skills/skills/related-market-spread/SKILL.md

related-market-spread

Skill214 starsChanged 3 months agoMITView on GitHub

Use when two Polymarket markets imply different probabilities for a linked outcome.

The file

We split this skill into the rules it gives an agent

3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈3

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 0

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Use this when the user asks for relative-value trades, discrepancy checks, linked outcomes, or questions like "this market is mispriced …

    line 13
  2. Distinctive:

    Use this as a generated archetype: the strategy should be adapted in code before use, not treated as a finished edge.

    line 27
  3. Distinctive:

    Keep the latest filled price per instrument.

    line 36

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Strategy: Polymarket · Related-Market Spread

When to use

Use this when the user asks for relative-value trades, discrepancy checks, linked outcomes, or questions like "this market is mispriced versus that one."

What the agent should look for

  • At least two canonical Polymarket markets from GET /context/markets?venue=polymarket.
  • Resolution logic that is genuinely comparable across the two markets.
  • Spread between filled-trade prices that is wide versus historical behavior.
  • Enough historical filled data on both markets for the requested backtest window.
  • Ability to enter and exit both legs (or acknowledge unavailable liquidities before entering).

Backtest fit with filled data

Partial fit. Backtests built from filled TradeTick data are useful for checking whether the spread relationship has widened and then compressed in history. They cannot guarantee simultaneous fills or full cross-book liquidity.

Use this as a generated archetype: the strategy should be adapted in code before use, not treated as a finished edge.

Strategy logic

Track the latest filled price for both legs. Enter when spread is above a threshold and exits when spread narrows or max holding duration expires.

Nautilus strategy shape

  • Subscribe to TradeTick for both instruments.
  • Keep the latest filled price per instrument.
  • Compute spread each tick using the latest values.
  • Enter and flatten only when spread thresholds are hit.
  • Manage stale-state safety (e.g., skip entries until both legs have recent fills).

Example strategyConfig

{
  "primary_instrument_id": "AUTO_FROM_MARKET_A",
  "secondary_instrument_id": "AUTO_FROM_MARKET_B",
  "spread_entry": 0.08,
  "spread_exit": 0.03,
  "order_size": 10,
  "max_holding_ticks": 120
}

Iteration knobs

KnobEffect
spread_entryHigher = only trade stronger relative-value discrepancies.
spread_exitLower = wait for fuller normalization before exiting.
max_holding_ticksLower = tighter time risk control if convergence does not happen.

Failure modes

  1. Markets with different outcome mappings can produce a real structural spread, not an inefficiency.
  2. Resolution rules can shift, changing what "discrepancy" means.
  3. One leg may look tradable in backtest and be unavailable or illiquid live.
  4. TradeTick replay cannot prove simultaneous execution across legs.

User-facing framing

"This is a relative-value archetype, not a guaranteed edge. It is built from filled TradeTick backtests and exact market slug discovery first, then adapted into custom NautilusTrader code before any deployment."

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.