Official Python client for the Factor Weave quant data API — factors, similarity search, leak-free labels, derived analytics, MCP.
Project description
factorweave — official Python client
Typed client for the Factor Weave quant data API. Factor data, vector similarity, leak-free forward-return labels, derived market analytics (factor dispersion, regime, risk-cluster tags, 32-D embeddings) and MCP — for ~12,000 US-listed tickers.
Install
pip install factorweave
# optional adapters:
pip install 'factorweave[pandas]'
pip install 'factorweave[polars]'
Authenticate
Get a free account at https://factorweave.com, then mint a long-lived dev
key on the Profile page (fw_live_…).
import factorweave as fw
client = fw.Client(api_key="fw_live_...")
# or, with an email/password login:
client = fw.Client(); client.login("you@example.com", "...")
Quick recipes
# Latest factor row for a ticker
row = client.features("AAPL")
print(row[0]["rsi"], row[0]["comp_score"])
# 252-day factor history → polars
hist = client.features("AAPL", start="2024-01-01", end="2024-12-31").to_polars()
# Top 25 momentum names today
client.top("mom", n=25).to_pandas()
# Factor analogues — historical, not co-moving same-day ETFs
n = client.find_similar("NVDA", method="cosine", min_lookback_days=30)
for row in n["neighbors"][:5]:
print(row["ticker"], row["date"], row["features"]["rsi"])
# Derived analytics
client.market_context() # FREE-friendly: today only
client.market_context(history=True) # HOBBY+: 252-day history
client.report_card("AAPL") # HOBBY+
client.risk_cluster("TSLA") # PRO+
client.embedding("AAPL") # QUANT
Errors
Failures raise typed exceptions you can catch granularly:
from factorweave import AuthError, TierError, RateLimitError, NotFoundError
try:
client.risk_cluster("AAPL")
except TierError as e:
print(f"Need {e.required_tier}, you have {e.your_tier}")
except RateLimitError:
print("daily quota exhausted")
Honest framing
Factor Weave is a research substrate, not a return-prediction service.
Our own leak-free testing — research note —
shows factor similarity does not forecast returns. The supervised
similarity method is a return-weighted projection, not an oracle. Use the
data for screening, peer-finding, regime-aware research, and assembling
leak-free backtest datasets.
Resources
- Docs: https://factorweave.com/#docs
- OpenAPI spec: https://factorweave.com/api/openapi.json
- Swagger UI: https://factorweave.com/api/docs/swagger
- MCP setup: https://factorweave.com/mcp.html
- Support: support@factorweave.com
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file factorweave-0.1.2.tar.gz.
File metadata
- Download URL: factorweave-0.1.2.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0b38b40dbb0c23a56234bc2e463e512cdfbcd6049148dbd313175af4a971e5dc
|
|
| MD5 |
8cd2f2a85a5d2fbe30de6984a9ac1e4e
|
|
| BLAKE2b-256 |
15d45b2747b01153080b428e4d3803acd673b22af69755647867fc13b7d67e52
|
File details
Details for the file factorweave-0.1.2-py3-none-any.whl.
File metadata
- Download URL: factorweave-0.1.2-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d9fc2631213413997a49fc852d3e5c9b4b0da637499c5022522fbb5ad6b6d392
|
|
| MD5 |
bedea9abd60fd6f4fe5111df7961ebf9
|
|
| BLAKE2b-256 |
4bbdc5cddfbc0b9f641639a5acf762cec0cedf95d543a72c43b851c772731432
|