Releases: VernonOY/replicalpha
Releases · VernonOY/replicalpha
replicalpha v0.1.0
Research-reproduction Agent: PDF → factor code → backtest → Red Team → reproducibility score.
replicalpha takes a quant research PDF and produces a complete reproduction bundle in one command — structured paper metadata, executable Python factor code, backtest results, automated Red Team findings, and a plain-English reproducibility score.
📖 English README · 简体中文 README
Pipeline
PDF ─▶ paper2alpha (PyMuPDF + LLM JSON mode)
└─▶ ResearchCard
└─▶ DSL interpreter (+ LLM fallback) → Python factor code
└─▶ qtype static check (look-ahead / future-function lint)
└─▶ pandas quintile IC backtest
└─▶ Red Team Validator (5 fixed checks)
└─▶ reproducibility scorer
└─▶ markdown report
What's in v0.1.0
- End-to-end pipeline glued by
core.orchestrator.run_pipeline:- PDF extraction via vendored paper2alpha (PyMuPDF + OpenAI JSON-mode)
- Factor code generation — DSL interpreter for a 7-operator whitelist, LLM fallback for unsupported formulas, qtype-gated
- Minimal pandas quintile long-short backtest (IC time series, cumulative return, max drawdown, annualized Sharpe)
- Red Team Validator v1 — 5 fixed computational checks (overfitting hint, small-cap exposure, data leakage, sample concentration, factor redundancy)
- Reproducibility score (sign match + magnitude) with plain-English interpretation
- Markdown research-report aggregator
- CLI
replicalpha run <pdf>with offline-friendly--extractor-mock/--codegen-llm - FastAPI JSON server (
POST /runs,GET /runs/{id},GET /runs/{id}/report) - Bundled 20-ticker × 500-day synthetic market data for offline tests
- Unit + end-to-end subprocess tests — 52 tests, 84% coverage (3.11 + 3.12 CI matrix)
- Bilingual README (English + 简体中文) + issue templates + SUPPORT.md
Quick start
```bash
uv sync
export OPENAI_API_KEY=sk-...
uv run replicalpha run path/to/paper.pdf \
--out ./out \
--data path/to/market_data.csv \
--start 2022-01-03 --end 2024-12-31
```
See examples/reproduce_demo.md for the offline demo walkthrough (no API key needed).
Part of the alpha-kit stack
replicalpha vendors and composes:
- paper2alpha — PDF → ResearchCard extraction
- qtype — factor-code look-ahead lint
License
MIT.