mcpField
A
alterlab-hedgefund-monitor

alterlab-hedgefund-monitor

github.com/alterlab-ieuData & databases7867 installsUpdated 5w ago
Repository

About alterlab-hedgefund-monitor

A skill for researchers using the U.S. Office of Financial Research's open Hedge Fund Monitor API. It explains how to discover series and retrieve aggregated hedge-fund, positioning, dealer-financing, and repo time series.

Key features

  1. 01Discover datasets and series identifiers
  2. 02Search series metadata
  3. 03Retrieve single or multiple time series
  4. 04Filter and resample observations
  5. 05Calculate spreads between series

Use cases

  1. 01Study aggregated hedge-fund leverage
  2. 02Analyze futures market positioning
  3. 03Track sponsored-repo volumes
  4. 04Compare financial series over time

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/alterlab-ieu/alterlab-academic-skills --skill alterlab-hedgefund-monitor

After installing, type/alterlab-hedgefund-monitorin Claude Code to confirm it loaded.

Bundled files

References and scripts installed along with SKILL.md.

evals/
evals.json
references/
api-overview.md
datasets.md
endpoints-combined.md
endpoints-metadata.md
endpoints-series-data.md
examples.md
parameters.md

Details

From the project README

OFR Hedge Fund Monitor API

Free, open REST API from the U.S. Office of Financial Research (OFR) providing aggregated hedge fund time series data. No API key or registration required.

Base URL: https://data.financialresearch.gov/hf/v1

When to Use This Skill

  • Aggregate hedge-fund size, leverage, liquidity, counterparty, or stress-test statistics (SEC Form PF via OFR)
  • CFTC Traders in Financial Futures positioning, FICC sponsored-repo volumes, or FRB SCOOS dealer-financing terms
  • Systemic-risk or financial-stability research that needs these series as clean time series
Does NOT Trigger
ScenarioUse Instead
A single filer's raw Form PF/13F/13D documents or holdings line by linealterlab-edgartools
Treasury yields, Fed policy rates, or financial-conditions indicesalterlab-fred
Treasury debt, auctions, or Daily Treasury Statement cash balancesalterlab-usfiscaldata
Security prices or fund NAV/price historiesalterlab-alpha-vantage

Quick Start

import requests
import pandas as pd

BASE = "https://data.financialresearch.gov/hf/v1"

# List all available datasets
resp = requests.get(f"{BASE}/series/dataset")
datasets = resp.json()
# Returns: {"ficc": {...}, "fpf": {...}, "scoos": {...}, "tff": {...}}

# Search for series by keyword
resp = requests.get(f"{BASE}/metadata/search", params={"query": "*leverage*"})
results = resp.json()
# Each result: {mnemonic, dataset, field, value, type}

# Fetch a single time series
resp = requests.get(f"{BASE}/series/timeseries", params={
    "mnemonic": "FPF-STRATEGY_EQUITY_LEVERAGERATIO_GAVWMEAN",
    "start_date": "2015-01-01"
})
series = resp.json()  # [[date, value], ...]
df = pd.DataFrame(series, columns=["date", "value"])
df["date"] = pd.to_datetime(df["date"])

Mnemonics are exact — guessing fails. The API rejects unknown identifiers with a plain Invalid mnemonic string (HTTP 200, not JSON). Always discover real mnemonics via /metadata/search or /metadata/mnemonics before requesting data. Note in particular that there is no FPF-ALLQHF_LEVERAGERATIO_* series: aggregate leverage is published per gross-asset cohort (see below), while the GAVWMEAN/NAVWMEAN asset-weighted leverage means exist only at the strategy level.

Authentication

None required. The API is fully open and free.

Datasets

KeyDatasetUpdate Frequency
fpfSEC Form PF — aggregated stats from qualifying hedge fund filingsQuarterly
tffCFTC Traders in Financial Futures — futures market positioningMonthly
scoosFRB Senior Credit Officer Opinion Survey on Dealer Financing TermsQuarterly
ficcFICC Sponsored Repo Service VolumesDaily

The /series/dataset index returns long_name: "FormPF" for every dataset (an upstream API label quirk); the real source names are above. Confirm a series' true cadence via schedule/observation_frequency in its metadata.

Data Categories

The HFM organizes data into six categories (each downloadable as CSV):

  • size — Hedge fund industry size (AUM, count of funds, net/gross assets)
  • leverage — Leverage ratios, borrowing, gross notional exposure
  • counterparties — Counterparty concentration, prime broker lending
  • liquidity — Financing maturity, investor redemption terms, portfolio liquidity
  • complexity — Open positions, strategy distribution, asset class exposure
  • risk_management — Stress test results (CDS, equity, rates, FX scenarios)

Core Endpoints

Metadata
EndpointPathDescription
List mnemonicsGET /metadata/mnemonicsAll series identifiers
Query series infoGET /metadata/query?mnemonic=Full metadata for one series
Search seriesGET /metadata/search?query=Text search with wildcards (*, ?)
Series Data
EndpointPathDescription
Single timeseriesGET /series/timeseries?mnemonic=Date/value pairs for one series
Full singleGET /series/full?mnemonic=Data + metadata for one series
Multi fullGET /series/multifull?mnemonics=A,BData + metadata for multiple series
DatasetGET /series/dataset?dataset=fpfAll series in a dataset
Category CSVGET /categories?category=leverageCSV download for a category (returned HTTP 502 when checked on 2026-09-23; fall back to /series/multifull)
SpreadGET /calc/spread?x=MNE1&y=MNE2Difference between two series

Common Parameters

ParameterDescriptionExample
start_dateStart date YYYY-MM-DD2020-01-01
end_dateEnd date YYYY-MM-DD2024-12-31
periodicityResample frequencyQ, M, A, D, W
howAggregation methodlast (default), first, mean, median, sum
remove_nullsDrop null valuestrue
time_formatDate formatdate (YYYY-MM-DD) or ms (epoch ms)

Key FPF Mnemonic Patterns

Mnemonics follow the pattern FPF-{SCOPE}_{METRIC}_{STAT}:

  • Scope: ALLQHF (all qualifying hedge funds), or a strategy such as STRATEGY_CREDIT, STRATEGY_EQUITY, STRATEGY_MACRO, STRATEGY_RV (relative value), STRATEGY_FUTURES, etc. ALLQHF leverage/cash metrics carry a gross-asset cohort segment: GAVN10 (10 largest funds), GAVN11TO50, GAVN51 (rest).
  • Metrics: GAV (gross assets), NAV (net assets), GNE (gross notional exposure), LEVERAGERATIO, CASHRATIO, COUNT, plus stress-test scenarios (CDSUP250BPS, etc.)
  • Stats: SUM, AVERAGE (equal-weighted, used for ALLQHF cohorts), GAVWMEAN/NAVWMEAN (asset-weighted, strategy-level only), P5, P50, P95, PCTCHANGE
# Verified series examples (all return data as of 2026)
mnemonics = [
    "FPF-ALLQHF_GAVN10_LEVERAGERATIO_AVERAGE",    # 10 largest funds: leverage (equal-weighted)
    "FPF-STRATEGY_EQUITY_LEVERAGERATIO_GAVWMEAN", # Equity strategy: leverage (GAV-weighted)
    "FPF-ALLQHF_GAV_SUM",                         # All funds: gross assets (total $)
    "FPF-ALLQHF_NAV_SUM",                         # All funds: net assets (total $)
    "FPF-ALLQHF_GNE_SUM",                         # All funds: gross notional exposure
    "FICC-SPONSORED_REPO_VOL",                    # FICC: sponsored repo volume (daily)
]

Reference Files

Cite the OFR Hedge Fund Monitor, the dataset (e.g. SEC Form PF), the mnemonic, and the retrieval date for every series used.

Part of the AlterLab Academic Skills suite.

Comments

Markdown supported