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.2.0.tar.gz (11.7 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.2.0-py3-none-any.whl (12.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: factorweave-0.2.0.tar.gz
  • Upload date:
  • Size: 11.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for factorweave-0.2.0.tar.gz
Algorithm Hash digest
SHA256 c5f250258f8b6a0bd342bbf4e7cfdbc975b629d93b87377ea0d3ec3f9e55e827
MD5 bbdabd843024ae6bea9092014ad4b304
BLAKE2b-256 564a5ae7005a98dd09ea6ff00dc91a5f3c021f69a4932cd89e78a5bdce2742b5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: factorweave-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 12.0 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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 926e453493f432da47eb2c39c0913c4d05181286ec145a7833e205339a678cf8
MD5 0376e87aab98187b5cc1b85de56e4143
BLAKE2b-256 e36b72a967d09d39ddf3de2bd4d187cfa4999f43f3ee6d86ca28fe093fec12f9

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