Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Extract structured strategy specifications from quantitative finance research papers — Agent Skill for GitHub Copilot & Claude Code
| Date | Stars |
|---|---|
| 2026-07-31 | 253 |
| 2026-08-03 | 254 |
| 2026-08-06 | 254 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
<div align="center">
<img src="assets/alagent_logo.png" alt="ALAGENT Logo" width="120">
# X2Strategy
**Any Research Input → Strategy Spec → Executable Code → Backtest → Diagnosis**
[](https://python.org)
[](LICENSE)
[](https://agentskills.io/)
[]()
[](https://docs.litellm.ai/docs/providers)
[Getting Started](#-getting-started) · [How It Works](#-how-it-works) · [Examples](#-examples) · [Docs](#-documentation) · [简体中文](README_CN.md)
---
*Turn quantitative finance research — papers, drafts, reports, or strategy ideas — into validated, executable trading strategies. Automatically.*
</div>
## Highlights
- **🔬 Multi-Format Input** — PDF papers, Markdown drafts, DOCX reports, plain text. Auto-detected.
- **🧠 5-Layer LLM Extraction** — Multi-strategy detection → indicators → signal logic → execution plan → risk controls.
- **🧾 Grounded Extraction Quality** — Optional instruction/customization/clarification context, retrieved repair-time operator-pitfall checks, canonical `portfolio_weights`, and structured `needs_human_review` flags.
- **✅ Verified Code Generation** — AST validation + Backtrader structural checks + indicator registry, not just "generate and hope".
- **📊 Automated Backtesting** — Execute, extract metrics, and diagnose against paper-reported performance.
- **🤖 Agent-Native** — Works as an [Agent Skill](https://agentskills.io/) (`/x2strategy`) in VS Code Copilot, Claude Code, or any compatible agent.
- **💰 ~$0.1 per paper** — DeepSeek-powered. Any [LiteLLM-supported provider](https://docs.litellm.ai/docs/providers) works.
## How It Works
```
┌──────────────────────────────────────────────────────────────┐
│ X2Strategy │
│ │
PDF / MD / DOCX / TXT │ ┌─────────┐ ┌───────────┐ ┌──────────┐ ┌─────────┐ │
─────────────────────►│ │ Parse ├──►│ Extract ├──►│ Generate ├──►│Backtest │ │
│ │ (parser) │ │ (L0 → L4) │ │ (code) │ │+ Diagnose││
│ └─────────┘ └───────────┘ └──────────┘ └─────────┘ │
│ ▼ ▼ ▼ ▼ │
│ PaperContent StrategySpec Backtrader.py Report.md │
└──────────────────────────────────────────────────────────────┘
```
| Stage | Input | Output | What Happens |
|:------|:------|:-------|:-------------|
| **Parse** | Any document | `PaperContent` | Format-aware extraction (PyMuPDF / direct read / python-docx) |
| **Extract** | PaperContent | `StrategySpec[]` | 5-layer LLM with optional instruction grounding: detect strategies → extract indicators, logic, execution, risk |
| **Generate** | StrategySpec | `strategy.py` | Data module → signal module → backtest module → integration |
| **Validate** | strategy.py | Pass / Fail | AST syntax + Backtrader structure + indicator existence checks |
| **Backtest** | strategy.py | Metrics | Subprocess execution with timeout, metric extraction |
| **Diagnose** | Metrics | `report.md` | Compare against paper-reported results, flag deviations |
## Getting Started
### As an Agent Skill
[Agent Skills](https://agentskills.io/) is an open standard. Clone into the agent's skill directory — it auto-discovers `SKILL.md` and registers the `/x2strategy` slash command.
#### Install to OpenClaw / OpenClaw Users
For OpenClaw users, install directly from ClawHub:
```bash
oExcerpt of 18,311 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:7d88a799784f9120, llm:Description: 'Extract structured strategy specifications from quantitative finance research papers — Agent Skill for GitHub Copilot & Claude Code' (repository purpose).
matched fp:7d88a799784f9120, llm:Description: 'Extract structured strategy specifications from quantitative finance research papers — Agent Skill for GitHub Copilot & Claude Code' (repository purpose).
matched fp:7d88a799784f9120, llm:Description: 'Extract structured strategy specifications from quantitative finance research papers — Agent Skill for GitHub Copilot & Claude Code' (repository purpose).