---
name: cftc-weekly-swaps-report-ingestion
description: "How to get CFTC Weekly Swaps Report data into a pandas DataFrame and Parquet: access, the request, the format, limits, quirks and terms."
---

# Load CFTC swaps gross notional into pandas and Parquet

Source entry: https://signal-lab-jet.vercel.app/datasets/cftc-weekly-swaps-report
Provider: https://www.cftc.gov/MarketReports/SwapsReports/index.htm
Checked against the provider's documentation: 2026-11-01

## Access
- No account or key is required for the checked current HTML report table.
- Archived editions are linked by publication date from the provider archive.

## Request
```bash
curl 'https://www.cftc.gov/MarketReports/SwapsReports/L1GrossExpCS.html'
```

## Format
HTML table with swap categories as rows and five weekly reporting dates as columns; values are gross notional outstanding in millions of U.S. dollars.

## Load into pandas and Parquet
Needs Python 3 with requests, pandas and pyarrow.
```python
"""CFTC gross-notional cleared-status table -> pandas -> Parquet."""
from html.parser import HTMLParser
import requests
import pandas as pd

class FirstTable(HTMLParser):
    def __init__(self):
        super().__init__()
        self.in_table = self.done = self.in_cell = False
        self.row, self.rows, self.cell = [], [], []
    def handle_starttag(self, tag, attrs):
        if tag == "table" and not self.in_table and not self.done:
            self.in_table = True
        elif self.in_table and tag == "tr":
            self.row = []
        elif self.in_table and tag in ("td", "th"):
            self.in_cell, self.cell = True, []
    def handle_data(self, data):
        if self.in_cell:
            self.cell.append(data)
    def handle_endtag(self, tag):
        if self.in_table and tag in ("td", "th"):
            self.row.append(" ".join("".join(self.cell).split()))
            self.in_cell = False
        elif self.in_table and tag == "tr" and self.row:
            self.rows.append(self.row)
        elif self.in_table and tag == "table":
            self.in_table, self.done = False, True

URL = "https://www.cftc.gov/MarketReports/SwapsReports/L1GrossExpCS.html"
r = requests.get(URL, headers={"User-Agent": "Mozilla/5.0 SignalLabCheck/1.0"}, timeout=60)
r.raise_for_status()
p = FirstTable()
p.feed(r.text)
width = len(p.rows[0])
rows = [row for row in p.rows[1:] if len(row) == width and row[0]]
df = pd.DataFrame(rows, columns=["category", *p.rows[0][1:]])
for col in df.columns[1:]:
    df[col] = pd.to_numeric(df[col].str.replace(",", ""))
df.to_parquet("cftc_swaps_gross_notional.parquet", index=False)
print(len(df), "rows", len(df.columns) - 1, "weekly dates", "latest", df.columns[-1])
```
Run by us on 2026-11-01 (python 3.13.5 | pandas 3.1.0 | pyarrow 26.0.0 | requests 2.34.2). Result: 10 rows 5 weekly dates latest October 09

## Limits
- Rate limit: Not stated.
- Current all-swaps tables contain five weekly observations; asset-class tables contain the latest week.
- The reporting period ends two and a half weeks before the normal Monday publication date.

## Quirks
- The current tables are HTML, so ingestion depends on table structure rather than a stable CSV schema.
- Values are in millions of U.S. dollars and formatted with thousands separators.
- Cleared-status and participant-type tables count notionals differently; do not compare their totals without the explanatory notes.

## Terms and attribution
- CFTC government information is public domain, while separately identified third-party items may be protected.
- CFTC requests appropriate acknowledgement when its public-domain information is reused.
- Terms page: https://www.cftc.gov/webpolicy/index.htm

## Sources
- https://www.cftc.gov/MarketReports/SwapsReports/index.htm: "The CFTC Swaps Report is published every Monday at 3:30 p.m., unless otherwise noted."
- https://www.cftc.gov/MarketReports/SwapsReports/index.htm: "market-facing swaps transactions"
- https://www.cftc.gov/MarketReports/SwapsReports/ReleaseSchedule/index.htm: "The reporting period is defined as the week ending on the Friday two and a half weeks prior to the CFTC Swaps Report’s Monday publication date."
- https://www.cftc.gov/webpolicy/index.htm: "Government information at the CFTC website is in the public domain."

## Help improve this skill
Missing a source, or see something to improve? Call the MCP tool suggest_source or feedback (or POST /api/suggest or /api/feedback). Reviewed ideas: https://signal-lab-jet.vercel.app/agent-suggestions

Information for educational purposes only. Free tiers, limits and licenses belong to the providers and may change; check the provider's own terms before using the data.
