Claude Code and Codex plugin wrapper around SL-Mar/quantcoder: a research workflow for turning quantitative research papers into draft QuantConnect LEAN algorithms with Claude Code / Codex agents.
Upstream status: the original QuantCoder project says it is no longer maintained and explicitly warns that automated code generation may fail to implement non-trivial paper mathematics faithfully. This plugin preserves that caveat: use it for research scaffolding, linting, and validation workflows, not as a promise of trading performance.
codex plugin marketplace add nutdnuy/quantcoder-pluginThen enable/install quantcoder from the Codex plugin UI. The repo includes
.agents/plugins/marketplace.json for Codex marketplace discovery and
.codex-plugin/plugin.json for the plugin manifest.
Add this GitHub repository as a Claude Code marketplace:
/plugin marketplace add https://github.com/nutdnuy/quantcoder-plugin
/plugin install quantcoder
The Claude marketplace manifest lives at .claude-plugin/marketplace.json, and
the plugin manifest lives at .claude-plugin/plugin.json.
skills/quantcoder-research/SKILL.mdfor agent workflow behavior.- Claude slash commands:
/quantcoder-setup/quantcoder-search/quantcoder-generate/quantcoder-validate/quantcoder-backtest
- MCP tools through
.mcp.json:quantcoder_lint_qc_codequantcoder_get_api_docsquantcoder_validate_codequantcoder_backtest
The plugin flow is agent-native: Claude Code or Codex reads the paper/summary, extracts the strategy specification, writes the LEAN draft, then uses the bundled linter/MCP tools for verification. The plugin intentionally does not expose live deployment as an MCP tool.
QuantCoder plugin transforms academic quant research into draft QuantConnect LEAN algorithms using the active Claude Code / Codex agent. No separate local model server is required for the plugin workflow.
Status (Feb 2026): v2.0.0 introduced a significant refactoring of the code generation pipeline — two-stage generation (framework stubs then mathematical core), two-pass summarization, cross-model fidelity assessment, MinerU PDF extraction, and a static QC API linter (11 rules). This plugin uses Claude Code / Codex Agent for reasoning and code drafting, while preserving the warning that generated implementations of novel mathematical models must be checked manually against the paper.
- Python 3.10+
- Claude Code or Codex with this plugin installed
git clone https://github.com/nutdnuy/quantcoder-plugin.git
cd quantcoder-plugin
python -m venv .venv
source .venv/bin/activate
pip install -e ".[mcp]"
python -m spacy download en_core_web_sm# Check CLI utilities and plugin package
quantcoder --help
quantcoder-mcp --helpquantcoder # or: qc# Search for papers
quantcoder search "momentum trading" --num 5
# Download a paper PDF for the agent to read
quantcoder download 1
# Generate QuantConnect algorithm
# Ask Claude Code / Codex to read the paper or extracted summary and draft LEAN code.
# Validate and backtest (requires QC credentials)
quantcoder validate generated_code/algorithm_1.py
quantcoder backtest generated_code/algorithm_1.py --start 2022-01-01 --end 2024-01-01# Shows Sharpe, Total Return, CAGR, Max Drawdown, Win Rate, Total Trades
quantcoder backtest generated_code/algorithm_1.py --start 2022-01-01 --end 2024-01-01quantcoder library build --comprehensive --max-hours 24
quantcoder library statusQuantConnect credentials can be set in ~/.quantcoder/.env or the environment:
QUANTCONNECT_API_KEY=your_key
QUANTCONNECT_USER_ID=your_idFor backtesting and deployment, set credentials in ~/.quantcoder/.env:
QUANTCONNECT_API_KEY=your_key
QUANTCONNECT_USER_ID=your_id
quantcoder/
├── cli.py # CLI entry point
├── config.py # Configuration management
├── chat.py # Interactive chat
├── llm/ # Upstream local-model provider layer
├── core/ # LLM handler, processor, NLP
├── agents/ # Multi-agent system (Coordinator, Alpha, Risk, Universe)
├── evolver/ # AlphaEvolve-inspired evolution engine
├── autonomous/ # Self-improving pipeline
├── library/ # Batch strategy library builder
├── tools/ # Pluggable tool system
└── mcp/ # QuantConnect MCP integration
QuantCoder was initiated in November 2023 based on "Dual Agent Chatbots and Expert Systems Design". The initial version coded a blended momentum/mean-reversion strategy from "Outperforming the Market (1000% in 10 years)", which received over 10,000 impressions on LinkedIn.
v2.0.0 is a complete rewrite with multi-agent architecture, evolution engine, autonomous learning, two-stage code generation, two-pass summarization, cross-model fidelity assessment, MinerU PDF extraction with LaTeX equation preservation, and a static QC API linter with 11 auto-fix rules. This plugin uses Claude Code / Codex agents as the default reasoning and coding layer, then keeps QuantCoder's CLI, linter, and QuantConnect integration as verification utilities.
Apache License 2.0. See LICENSE.
