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.0.tar.gz (7.8 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.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: factorweave-0.1.0.tar.gz
  • Upload date:
  • Size: 7.8 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.0.tar.gz
Algorithm Hash digest
SHA256 7d93220d4a6d5038150882ce348d949251961aec2ecfc5566df114b3e4069a95
MD5 bed0bb84c10c5dc2e6bb0b7faf6721a6
BLAKE2b-256 1224f88bd32626ae00f56d4a7d8d4406191a33e9011874412a6e29563fa25a68

See more details on using hashes here.

File details

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

File metadata

  • Download URL: factorweave-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.5 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 001f2edf02c8f675fe22fe0d58a74da6cfbed722c7bdaa066921bc580285eb17
MD5 77660a86d29dd46f077a3ed1640e0c6a
BLAKE2b-256 a4ebaff8ed3a4e29e0665a6cf5dcdf6ef0b2e2dbbda7974a39ca315cb1db4b4c

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