Skip to main content
Glama
yoniassia

QuantClaw Data

by yoniassia
README.md
# πŸ“ˆ QuantClaw Data β€” AI-Built Financial Intelligence Platform

> **965 production modules. 353K+ lines of Python. 179 data sources cataloged. $0/month. Built autonomously by AI agents.**

🌐 **Live**: [quantclaw.org](https://quantclaw.org) | πŸ“Š **Dashboard**: [data.quantclaw.org](https://data.quantclaw.org)

---

## What is QuantClaw Data?

QuantClaw Data is the world's largest open-source financial data platform built entirely by AI agents. Every module collects, processes, and serves real financial data from free public sources β€” no paid API keys required.

The platform powers **Alpha Picker V3**, an autonomous stock-picking algorithm that matches SeekingAlpha Quant ratings with 69% accuracy and achieves a 92% win rate in backtesting.

## πŸ”’ By the Numbers

| Metric | Value |
|--------|-------|
| **Python Data Modules** | 965 |
| **Lines of Python (modules)** | 352,949+ |
| **Total Python (all files)** | 416,255+ |
| **Data Sources Cataloged** | 179 (DataScout) |
| **MCP Server** | 12,769 LOC |
| **CLI** | 1,776 LOC |
| **Cached Data** | 378 MB |
| **Monthly Cost** | **$0** |
| **Countries Covered** | 40+ |

---

## πŸ—οΈ Architecture

```
quantclaw-data/
β”œβ”€β”€ modules/              965 Python data modules (353K LOC)
β”‚   β”œβ”€β”€ alpha_picker.py        Stock scoring algorithm (970 lines)
β”‚   β”œβ”€β”€ sa_quant_replica.py    SA Quant reverse-engineering (1,232 lines)
β”‚   β”œβ”€β”€ live_paper_trading.py  Portfolio engine (594 lines)
β”‚   β”œβ”€β”€ signal_fusion.py       Multi-signal combiner
β”‚   └── ...961 more modules
β”œβ”€β”€ data/                 378 MB cached financial data
β”‚   β”œβ”€β”€ signals/               Live trading signals
β”‚   β”œβ”€β”€ datascout/             179 cataloged data sources
β”‚   └── live_portfolio.db      Paper trading SQLite DB
β”œβ”€β”€ src/app/              Next.js dashboard + roadmap UI
β”œβ”€β”€ mcp_server.py         MCP API server (12.8K lines)
β”œβ”€β”€ run_v3_signal.py      Alpha Picker live signal runner
β”œβ”€β”€ run_param_sweep_v2.py Backtesting engine
β”œβ”€β”€ cli.py                CLI interface (1.8K lines)
β”œβ”€β”€ datascout.py          Continuous data source discovery agent
└── tests/                Integration & QA tests
```

---

## πŸ“Š Module Categories

| Category | Modules | Description |
|----------|---------|-------------|
| πŸ›οΈ Equity & Earnings | 27 | EPS revisions, analyst estimates, DCF, comps |
| 🏦 Commodities | 24 | Oil, gold, metals, agriculture, rig counts |
| πŸ’΅ Fixed Income | 21 | Treasury yields, corporate bonds, TIPS |
| 🌍 Macro & Central Bank | 16 | Fed, ECB, BIS, IMF, GDP, CPI |
| πŸͺ™ Crypto & DeFi | 15 | DeFi Llama, on-chain, DEX volumes |
| πŸ“Š Technical & Quant | 15 | Factor models, momentum, volatility |
| πŸ’± FX & Currency | 10 | Cross rates, carry trade, PPP |
| βš”οΈ Geopolitical & Risk | 10 | Conflict monitors, sanctions, risk scores |
| πŸ“‘ Regulatory & Filing | 9 | SEC EDGAR, insider trades, 13F filings |
| πŸ“‘ Alternative Data | 8 | Wikipedia pageviews, sentiment, web traffic |
| 🚨 Signals & Alerts | 8 | Signal fusion, smart alerts, discovery |
| πŸ“‰ Derivatives | 7 | CBOE put/call, VIX, options flow |
| 🌱 ESG & Climate | 5 | Carbon markets, green bonds |
| 🎯 Portfolio & Risk | 5 | Optimization, rebalancing, drawdown |
| πŸ’¬ Sentiment & NLP | 4 | FinBERT, earnings call NLP |
| πŸ”§ Cross-domain | 781+ | Country stats, ML/AI, infrastructure, extended sources |

---

## 🎯 Alpha Picker V3 β€” Crown Jewel

Autonomous stock-picking engine reverse-engineering institutional quant strategies:

| Metric | Value |
|--------|-------|
| SA Agreement Rate | 69% (31/45 picks match) |
| Win Rate | 92% on 40 backtested picks |
| Annual Return | 41.5% (Triple Pyramid) |
| Max Drawdown | -7.9% |
| Sharpe Ratio | 5.3 |
| Strategy | $5K base + adds at +10%, +20%, +35% |
| Rebalance | Bi-weekly (1st & 15th) |

### How It Works
1. **Universe Filter**: 7,017 stocks β†’ 386 candidates
2. **Multi-Factor Scoring**: Value + Growth + Momentum + Quality + Earnings Revision
3. **SA Quant Replica**: Reverse-engineered scoring matching SeekingAlpha
4. **Signal Fusion**: 7+ data sources per stock
5. **Live Signals**: Automated cron on 1st & 15th at 14:00 UTC

---

## πŸ”Œ MCP Server (Model Context Protocol)

All 965 modules exposed as AI-callable tools:

```bash
python3 mcp_server.py  # Port 3055
```

---

## πŸ” DataScout β€” Continuous Discovery

Discovers new free data sources across 24 rotating categories. 179 sources cataloged and growing.

---

## πŸ—ΊοΈ Roadmap

| Phases | Status | Description |
|--------|--------|-------------|
| 1-100 | βœ… | Core macro, equity, fixed income, FX |
| 101-200 | βœ… | Country stats, derivatives, commodities |
| 201-300 | βœ… | Crypto, DeFi, ESG, alt data |
| 301-400 | βœ… | ML/AI models, NLP, factor engines |
| 401-500 | βœ… | Infrastructure, streaming |
| 501-699 | βœ… | Advanced analytics, emerging markets |
| 700-800 | βœ… | Free no-API-key sources (DataScout) |
| 800-965 | βœ… | Extended free sources, ML signals |
| 965+ | πŸ”„ | Continuous autonomous expansion |

---

## πŸš€ Quick Start

```bash
git clone https://github.com/yoniassia/quantclaw-data.git
cd quantclaw-data
pip install requests beautifulsoup4 pandas numpy
npm install

# Create your .env with API keys (see Environment Variables below)
cp .env.example .env  # then fill in your keys

# Run any module
python3 modules/cnn_fear_greed.py
python3 modules/fed_soma.py

# Alpha Picker signal
python3 run_v3_signal.py

# MCP server
python3 mcp_server.py

# Dashboard
npm run dev
```

## πŸ” Environment Variables

API keys are encrypted with [dotenvx](https://dotenvx.com). The encrypted `.env` is in the repo β€” contributors with the decryption key can use it directly.

**For contributors with access to the decryption key:**
```bash
# Set the private key (shared securely by maintainers)
export DOTENV_PRIVATE_KEY="your-key-here"

# Run any command β€” dotenvx auto-decrypts
npx dotenvx run -- python3 modules/cnn_fear_greed.py
npx dotenvx run -- npm run dev
```

**For new contributors (bring your own keys):**
```bash
cp .env.example .env
# Fill in your own API keys β€” most have free tiers:
# FRED, Census, Finnhub, Etherscan, Polygon.io, USDA NASS
```

| Variable | Source | Free Tier |
|----------|--------|-----------|
| `FRED_API_KEY` | [fred.stlouisfed.org](https://fred.stlouisfed.org/docs/api/api_key.html) | βœ… |
| `CENSUS_API_KEY` | [census.gov](https://api.census.gov/data/key_signup.html) | βœ… |
| `FINNHUB_API_KEY` | [finnhub.io](https://finnhub.io/) | βœ… |
| `FD_API_KEY` | [financialdatasets.ai](https://financialdatasets.ai) | βœ… |
| `ETHERSCAN_API_KEY` | [etherscan.io](https://etherscan.io/apis) | βœ… |
| `POLYGONIO_API_KEY` | [polygon.io](https://polygon.io/) | βœ… |
| `USDA_NASS_API_KEY` | [quickstats.nass.usda.gov](https://quickstats.nass.usda.gov/api) | βœ… |

---

## πŸ€– Built by AI Agents

| Agent | Role |
|-------|------|
| DataClaw πŸ“Š | Builds new modules from roadmap |
| DataQAClaw πŸ”¬ | Tests and quality-maps modules |
| DataScout πŸ” | Discovers new free data sources |
| Alpha Picker 🎯 | Generates trading signals |
| BacktestClaw ⚑ | Validates strategies |

---

*Built with ❀️ by AI agents. $0/month. 965 modules and counting.*