Thesis
Desk tools as agent tools
The agentic platform I build at QuantLink AI needs a proving ground: a complete research stack where an AI agent can propose a strategy, backtest it, optimize it, read the attribution, and iterate, with no human glue step in between.
- Every engine capability is a first-class MCP tool: the same interface any MCP-capable agent already speaks.
- Public data only, so the full loop is reproducible by anyone: no vendor feeds, no keys required for the core path.
- Spec-driven datasets keep the pipeline honest: YAML specs declare identity, schema, constraints, and lineage once, and drive DDL, dbt tests, and the catalog.
Build
Pipeline architecture
One pipeline from raw ticker history to optimized portfolio.
| Stage | What it does |
| Ingest | yfinance primary with Stooq fallback; S&P 500 constituents from Wikipedia; per-ticker Parquet with a 50 GB budget guardrail. |
| Catalog | YAML dataset specs with schema.org metadata generate DuckDB views, dbt schema files, and a JSON-LD data catalog. |
| Transform | dbt owns all raw → staging → mart SQL with generated tests. |
| Factors | Ken French (3/5F, momentum, reversals), Treasury CMT, AQR (QMJ/BAB), and the JKP 153-factor library. |
| Backtest | Cross-sectional and weighted backtests in vectorbt; event-driven runs in backtesting.py. |
| Optimize | MVO and HRP via PyPortfolioOpt, skfolio strategies, equal-weight benchmarks. |
Agent Interface
The loop an agent can run unaided.
Hypothesis → backtest → optimize → attribution → refine.
- An MCP server over stdio exposes the engine to any MCP-capable agent, the same loop being productized at QuantLink AI.
- A human-facing CLI (
alpha-engine status | refresh | demo | datasets | build) mirrors every agent capability.
- CI runs the offline test subset; network and local-data markers keep the suite reproducible on any machine.