Skip to main content

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

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

factorweave-0.1.1.tar.gz (8.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

factorweave-0.1.1-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file factorweave-0.1.1.tar.gz.

File metadata

  • Download URL: factorweave-0.1.1.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

Hashes for factorweave-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2584ded7fc32bd7d2e17e03d2329dc0080d8fe151f49a11d26fda62fceda0815
MD5 087b74bbf3cc617f36e09794080e7e16
BLAKE2b-256 3f74893d3992033b7994e1cb5887267e6596b3185332e828eff38a11700481f6

See more details on using hashes here.

File details

Details for the file factorweave-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: factorweave-0.1.1-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

Hashes for factorweave-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c6d40de6bdf469cefe3d41dd2a2db7c109de8c612833c1426465308ff232dae1
MD5 4eb2adc98192fc406cb4b7ffe211e0d6
BLAKE2b-256 a5ef13b4581bec086f1f7f01f896feeb68fc5c67d4aee4115bf7246726152770

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page