evolution-engine

evolution-engine is a skill for Claude Code, Codex from mnemox-ai/tradememory-protocol. It costs 94 tokens per session (1,411 once invoked), scanned A, original, MIT.

A system that discovers trading strategies from historical OHLCV data, meaning open, high, low, close, and trading-volume records.

In plain words
What is it for?
Use it to generate candidate trading strategies, run vectorised backtests, validate them out of sample, and graduate strategies that meet the system's checks.
Why use it?
It automates proposing, backtesting, selecting, and evolving trading rules, including checks on data that was not used to create them.

Skill for Claude CodeCodex

Part of the tradememory-plugin plugin — 3 skills, 5 commands, 1 MCP server shipped together

About the project

TradeMemory is a memory and audit layer for AI trading agents that records trading decisions, outcomes, and context in a tamper-evident history. It is for traders and automated trading systems that need agents to recall past decisions and document their reasoning. Catalogue add-ons provide skills, commands, MCP tools, and related workflow components for using it.

mnemox-ai/tradememory-protocol · 1,412 stars · on GitHub

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 skills/mnemox-ai/tradememory-protocol/evolution-engine
Any agent
npx skills add mnemox-ai/tradememory-protocol --skill evolution-engine
Clone the repo
git clone --depth 1 https://github.com/mnemox-ai/tradememory-protocol

Made for: Claude Code, Codex.

Or install tradememory-plugin, the plugin that ships this one along with the rest of its 3 skills, 5 commands, 1 MCP server.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for evolution-engine

README.md
[![agentmods](https://agentmods.dev/badge/skills/mnemox-ai/tradememory-protocol/evolution-engine.svg)](https://agentmods.dev/skills/mnemox-ai/tradememory-protocol/evolution-engine)
Your own site
<a href="https://agentmods.dev/skills/mnemox-ai/tradememory-protocol/evolution-engine"><img src="https://agentmods.dev/badge/skills/mnemox-ai/tradememory-protocol/evolution-engine.svg" alt="Measured on agentmods" height="20"></a>
Per session 94 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,411 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.00094 $0.01411
Opus 5 $0.00047 $0.00705
Sonnet 5 $0.00019 $0.00282
Haiku 4.5 $0.00009 $0.00141

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

Security

Grade A, and why

evolution-engine 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 5d 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.

tradememory-plugin/skills/evolution-engine/SKILL.md · 108 lines

How it starts

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

Evolution Engine

Overview

The Evolution Engine autonomously discovers trading strategies from raw price data. It uses LLM-powered pattern generation combined with vectorized backtesting to evolve, test, and graduate viable trading rules — without manual rule writing.

This is not parameter optimization on a known strategy. It's open-ended strategy discovery: the LLM proposes novel entry/exit logic, the engine validates it against real data, and natural selection eliminates the losers.

How It Works

The Evolution Loop

OHLCV Data → LLM Generation → Vectorized Backtest → Selection → Mutation → Repeat
                                                          ↓
                                                    Out-of-Sample Validation
                                                          ↓
                                                    Graduated Strategies

Step-by-Step

  1. Data Fetch: Pull OHLCV candles from Binance public API (no key needed)
  2. Generate: LLM analyzes price patterns and proposes N candidate strategies (entry/exit rules, position sizing, stop loss)
  3. Backtest: Each candidate is backtested vectorized (numpy, no loop-per-candle) for speed
  4. Score: Candidates scored by Sharpe ratio, win rate, max drawdown, total return
  5. Select: Top K candidates survive. Bottom candidates are eliminated (graveyard).
  6. Mutate: LLM takes survivors and generates variations (parameter tweaks, rule modifications)
  7. Repeat: Steps 3-6 for N generations
  8. Validate: Final survivors are tested on held-out out-of-sample data
  9. Graduate: Strategies that pass OOS validation are marked as graduated

Key Design Decisions

  • LLM generates rules, not parameters. The engine doesn't optimize MACD(12,26,9) → MACD(14,28,10). It discovers entirely new rule combinations.
  • Vectorized backtesting. No candle-by-candle loops. Numpy vectorized operations make backtests 100x faster than event-driven simulators.
  • OOS validation is mandatory. In-sample performance means nothing. Only OOS-validated strategies graduate.
  • Graveyard is data. Failed strategies are logged with failure reasons. This prevents re-discovering the same dead ends.

Read the full file on GitHub · 108 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. 5d ago First seen · 108 lines · 94 tokens per session scan A 8d14b64db3a9

Subscribe to this mod's changes

evolution-engine is a skill published in the GitHub repository mnemox-ai/tradememory-protocol (1,412 stars, last pushed 24d ago), licensed MIT. It adds 94 tokens to every session and 1,411 once invoked, about $0.0005 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.

Related

Other skills, from other repositories

smart-order-router

Intelligent order routing to get best execution across multiple exchanges.

Signal-Execution-Labs/forex-trading-ai-agent · 15 tokens

breakout-strategy-engine

Pre-built breakout strategy templates — volatility squeeze detection, range breakout, momentum breakout with confirmation filters. Use this skill whenever the user asks about "breakout strategy", "Bollinger squeeze", "range breakout", "momentum breakout", "volatility expansion", "ATR breakout", "Donchian breakout"…

mahmoud20138/Tradecraft · 113 tokens

fetch-quotes

Cascading market-data fetcher. Prefers yfinance (free, no credentials) and falls back to a local MT5 terminal when available for broker-exact pricing. Returns OHLCV bars plus a latest quote as JSON, optionally with a PNG chart. USE FOR - get quotes, get data, fetch bars, live data, market data, price data, get chart…

mahmoud20138/Tradecraft · 96 tokens

gold-orb-ea

GOLDORB — MQL5 Expert Advisor for XAUUSD 1H Opening Range Breakout. Identifies opening range (first 1H candle after 1:02 AM server time), confirms consolidation (min 3 candles), then trades breakouts. Buy signal on resistance break, sell on support.

mahmoud20138/Tradecraft · 69 tokens

forex-trading

Forex market specifics: major/minor/exotic pairs, currency pair mechanics, pip values, lot sizes, swap/rollover, session overlaps, carry trades, central bank impact. USE FOR: forex pairs, currency pairs, pip value, lot size, major pairs, minor pairs, exotic pairs, forex session, carry trade, swap rates, rollover…

mahmoud20138/Tradecraft · 94 tokens

ibkr

Interactive Brokers — global stocks/forex/futures via a LOCAL TWS/IB Gateway, not cloud. Covers stocks, ETFs, forex, futures; account, positions, orders, quotes, history, order placement. Use when the user wants to check or trade an Interactive Brokers account (e.g. "IBKR positions", "buy 10 AAPL on IBKR paper", "my…

Starchild-ai-agent/official-skills · 102 tokens