# trading-predictor

trading-predictor — a Claude subagent that measures how far its computation runs ahead of market-data delivery, then uses the gap for predictions and risk numbers.

- subagent · `type=agent` · Claude Code, Codex, Cursor · ★ 850 repo stars
- Author: ruvnet
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/ruvnet/agentic-flow/tree/HEAD/.claude/agents/sublinear/trading-predictor.md
- Updated: 2026-10-26
- Security check: automated, 2026-11-16 (text) — no signs of malicious code found.
- HTML: https://affpapa.org/en/nevibecode/agents/trading-predictor

## What it does

The definition treats distance as time. Hand it a route in kilometres and it reports how long a signal needs to cover it, how long the maths takes, and what margin is left over. The worked example uses 10900 km between Tokyo and New York, and 35786 km for a satellite in geostationary orbit. A margin above 50 ms is the bar its example sets before an arbitrage window counts as real.

Most of the work happens on an MCP server. Five tools are named: `predictWithTemporalAdvantage` for the prediction, `calculateLightTravel` for transmission delay, `demonstrateTemporalLead` for scenarios, `validateTemporalAdvantage` for checking the figures, and `solve` for portfolio and risk maths. No server, no numbers, because every call carries the `mcp__sublinear-time-solver__` prefix.

Flow Nexus handles heavier runs: `sandbox_create` raises a sandbox, `sandbox_execute` runs the trading loop inside it, `neural_train` fits an LSTM to price history. Claude Flow swarms cover coordination, reconciling signals and risk limits across agents. The file is a prompt, so orchestration stays on those servers.

## Install

### Claude Code (native platform)

**Manually: put the files in place**
- File: `.claude/agents/trading-predictor.md` — For all projects use ~/.claude/agents/. Claude delegates by the description field or an @-mention

### Codex

**Manually: put the files in place**
- File: `.codex/agents/trading-predictor.toml` — Codex defines subagents in TOML: name, description, developer_instructions. Move the Markdown text into developer_instructions by hand. For all projects use ~/.codex/agents/

### Cursor

**Manually: put the files in place**
- File: `.cursor/agents/trading-predictor.md` — Cursor also reads .claude/agents/

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/ruvnet/agentic-flow/tree/HEAD/.claude/agents/sublinear/trading-predictor.md

## When to use it
- measure how much compute time beats data transit time
- check whether a latency gap is wide enough to trade
- reprice portfolio risk on a dense covariance matrix
- train an LSTM on price history inside a sandbox
- reconcile trade signals coming from several agents

## Example prompts
- Work out the temporal advantage for Tokyo to New York at 10900 km and tell me whether the margin is enough to enter.
- Run `mcp__sublinear-time-solver__solve` on a 1000×1000 covariance matrix and give me the portfolio weights.
- Spin up the `hft-predictor` sandbox and start the trading loop inside it.

## Similar
- [DeFi Trading Agents](https://affpapa.org/en/nevibecode/mcp/defi-trading-agents.md) — MCP server · ★ 37 repo stars
- [llm-trading-agent-security](https://affpapa.org/en/nevibecode/skills/llm-trading-agent-security.md) — skill · 6400 installs
- [crypto-trading-bots](https://affpapa.org/en/nevibecode/skills/crypto-trading-bots.md) — skill · 932 installs
- [trading-visualization](https://affpapa.org/en/nevibecode/skills/trading-visualization.md) — skill · 567 installs
- [algorithmic-trading](https://affpapa.org/en/nevibecode/skills/algorithmic-trading.md) — skill · 544 installs

From the same set: [ruvnet/agentic-flow](https://affpapa.org/en/nevibecode/by/ruvnet/agentic-flow.md) — 76 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
