Dataset Viewer (First 5GB)
Auto-converted to Parquet Duplicate
date
stringdate
1930-04-20 00:00:00
2025-07-20 00:00:00
industry_code
stringclasses
444 values
bioguide_id
stringlengths
7
7
weight
int64
-600,000
177M
event_type
stringclasses
1 value
1930-04-20
J1200
S000033
876
DONATION
1954-10-17
H3100
B001265
1,000
DONATION
2000-07-16
H4100
B001251
3,000
DONATION
2001-07-15
J1100
G000596
2,291
DONATION
2001-10-21
F1100
H001050
2,500
DONATION
2002-02-03
J1100
D000618
2,087
DONATION
2002-02-03
J1100
E000295
2,087
DONATION
2003-07-20
B1200
L000554
2,000
DONATION
2007-04-15
z9600
C001071
2,000
DONATION
2008-02-03
E1210
C000794
-1,000
DONATION
2008-04-20
z9600
C001071
1,000
DONATION
2008-10-19
F3300
E000287
-500
DONATION
2008-10-19
Z1100
B001269
1,000
DONATION
2009-02-01
Z1100
H001057
2,000
DONATION
2009-02-01
Z1100
J000290
1,000
DONATION
2009-02-01
z9600
C001071
1,500
DONATION
2009-04-19
E1620
B000944
-1,000
DONATION
2009-04-19
H1400
B001261
-2,500
DONATION
2009-04-19
Z9600
M000355
2,000
DONATION
2009-07-19
Z9600
C001071
-1,000
DONATION
2009-10-18
K1000
B000575
1,000
DONATION
2009-10-18
z9600
G000555
1,000
DONATION
2010-01-31
A4500
P000590
-1,000
DONATION
2010-01-31
F2000
C001071
-1,000
DONATION
2010-01-31
F2100
G000555
-2,000
DONATION
2010-01-31
F5100
B000944
-500
DONATION
2010-01-31
G6400
C001070
-100
DONATION
2010-01-31
H1130
B001261
-1,000
DONATION
2010-01-31
H4300
B000944
-2,500
DONATION
2010-01-31
K1000
C001060
500
DONATION
2010-01-31
K1000
L000569
500
DONATION
2010-01-31
Z9600
G000555
1,000
DONATION
2010-04-18
A2000
D000216
250
DONATION
2010-04-18
E1120
M001153
-500
DONATION
2010-04-18
F2100
G000555
-2,500
DONATION
2010-04-18
F4100
C001071
-1,500
DONATION
2010-04-18
F5100
B001265
-1,000
DONATION
2010-04-18
K1000
C001060
500
DONATION
2010-04-18
z9600
B001268
5,000
DONATION
2010-07-18
H4300
B000944
-1,000
DONATION
2010-07-18
z9600
P000590
1,000
DONATION
2010-10-17
C4100
M000133
-500
DONATION
2010-10-17
E1160
B000243
-1,000
DONATION
2010-10-17
E1160
R000307
-1,000
DONATION
2010-10-17
E1620
B000944
-2,400
DONATION
2010-10-17
F5100
W000437
-2,000
DONATION
2010-10-17
H4100
H000338
-1,000
DONATION
2010-10-17
K1000
C001060
1,000
DONATION
2010-10-17
T6250
L000554
-1,000
DONATION
2010-10-17
Z9600
C001070
8,500
DONATION
2010-10-17
Z9600
J000177
4,000
DONATION
2011-02-06
A2000
B001234
-1,000
DONATION
2011-02-06
B3200
T000193
2,500
DONATION
2011-02-06
C4100
B001267
-1,900
DONATION
2011-02-06
C4100
D000615
-500
DONATION
2011-02-06
D8000
L000573
-1,000
DONATION
2011-02-06
E1170
B001267
2,500
DONATION
2011-02-06
E1620
B000944
-1,000
DONATION
2011-02-06
F1100
F000458
-5,000
DONATION
2011-02-06
F1100
K000378
-2,500
DONATION
2011-02-06
F1100
S001186
-2,500
DONATION
2011-02-06
F2100
B001267
-2,500
DONATION
2011-02-06
F3300
L000573
-2,500
DONATION
2011-02-06
F3400
L000573
-2,500
DONATION
2011-02-06
G2600
S001189
-2,000
DONATION
2011-02-06
G2900
B001267
-2,500
DONATION
2011-02-06
G2900
F000458
-2,000
DONATION
2011-02-06
G6500
H001055
-3,750
DONATION
2011-02-06
H1130
K000375
-1,000
DONATION
2011-02-06
H4300
B000944
-1,000
DONATION
2011-02-06
H4300
F000458
-2,000
DONATION
2011-02-06
J2200
B001276
-5,000
DONATION
2011-02-06
J7000
S001170
18,571
DONATION
2011-02-06
J7120
E000172
44
DONATION
2011-02-06
J7120
L000576
44
DONATION
2011-02-06
L1300
M001148
1,064
DONATION
2011-02-06
L1500
B001234
-3,000
DONATION
2011-02-06
LB100
M000312
-5,000
DONATION
2011-02-06
LE100
B001242
0
DONATION
2011-02-06
LG100
C001078
1,460
DONATION
2011-02-06
LG100
F000043
-2,500
DONATION
2011-02-06
LG100
M000702
2,191
DONATION
2011-02-06
LG100
M001183
2,191
DONATION
2011-02-06
LG100
P000600
1,460
DONATION
2011-02-06
LG100
R000011
2,191
DONATION
2011-02-06
LG100
S000185
1,460
DONATION
2011-02-06
LG300
H001064
343
DONATION
2011-02-06
LG300
L000560
454
DONATION
2011-02-06
LG300
M001111
7,018
DONATION
2011-02-06
T5100
G000563
-1,000
DONATION
2011-02-06
T5100
L000573
-2,500
DONATION
2011-02-06
T5100
M001181
-1,500
DONATION
2011-02-06
Z9600
J000283
1,200
DONATION
2011-02-06
Z9600
L000573
4,950
DONATION
2011-02-06
Z9600
M001153
1,000
DONATION
2011-02-06
Z9600
R000595
1,000
DONATION
2011-02-06
Z9600
S001183
1,000
DONATION
2011-02-06
z9600
A000366
2,500
DONATION
2011-02-06
z9600
B001236
5,000
DONATION
2011-02-06
z9600
C001082
5,000
DONATION
End of preview. Expand in Data Studio

HillStreet: A Relational Dataset for Evaluating Information Channels in Congressional Trading

HillStreet is a large-scale, longitudinal dataset and multimodal dynamic graph formalizing the intersection of Capitol Hill and Wall Street. It spans 13.5 years of mandatory STOCK Act disclosures (July 2012โ€“December 2025), unifying the congressional trading ecosystem into a single, machine-learning-ready framework.

Dataset Summary

The dataset represents the relationship between 995 legislators and 7,376 companies. By framing congressional trading as a dynamic bipartite graph, HillStreet allows researchers to treat trade signal validation as an edge classification task.

  • Nodes: Legislators (session-specific) and Publicly Traded Companies.
  • Target Edges: Individual stock trades.
  • Structural Edges: Lobbying records, campaign finance (PAC/527) contributions, and industrial-constituency alignments.

HillStreet ships two alternative graph constructions over the identical node universe, events, and labels โ€” see Graph Constructions below. They differ only in how a structural relationship reaches the model, so they can be compared head-to-head.

Prerequisite: data you must acquire separately

Two inputs are not redistributed here because they are licensed from third parties and cannot be publicly reshared. They are nonetheless integral to the dataset, and you need both to rebuild anything:

Input Expected location What it is
Trade table data/processed/ml_dataset_continuous.csv One row per congressional filing: BioGuideID, Matched_Ticker, Filed, Transaction, Trade_Size_USD, Filing_Gap, and the forward excess-return excursions Max_Excess_Return_6M / Min_Excess_Return_6M.
Price history data/parquet/{TICKER}.parquet Per-ticker daily history (date index + close), one file per ticker. Needed for the 17 market features and for the excess-return excursions. Tickers with no parquet file are excluded from the dataset.

Everything else in this repository โ€” the raw reference tables, the three processed structural-event tables, the prebuilt graph tensors, and the source code โ€” is self-contained. The prebuilt .pt shards already embed the market features and labels, so all benchmark results can be reproduced from the released graphs alone. You need the two inputs to rebuild the graphs or to reproduce the excursion columns.

Trade table used for the benchmark

Trades span 2015-01-03 to 2025-06-11 over 75,736 rows, with no unparseable filing dates. The pipeline does not record a provider snapshot date, so we state the span of the delivered table instead. The span bounds the pull from below but is not the pull date, and we do not report one we cannot verify.

Ticker normalization. Raw ticker strings are matched to price series by the first rule that succeeds: direct match; a manual correction map; strip an exchange prefix (NASDAQ:WLTW to WLTW); strip a _failed suffix; strip a numeric suffix (WB1 to WB); map a dotted share class to its base (BRK.B to BRK); map a dashed share class to its base (BRK-A to BRK). The last three apply only when the result has a price series. A row whose ticker matches no rule is dropped with its reason logged, so tickers without a price series are excluded from the dataset entirely. This is part of why the trade table spans 272 legislators against 1,451 across all streams.

Filtering. Exchange transactions are dropped, as are rows with a null or blank ticker or legislator identifier; party, chamber, state and transaction type are whitespace-stripped and party is mapped to a canonical set.

Dataset Structure

HillStreet is divided into pre-built graph objects for deep learning, a relational tabular database accessed via Hugging Face configurations, and the source code used to build everything from the raw tables.

1. Graph shards (.pt and .npy)

Each construction ships as twelve annual shards, hillstreet_temporal_graph_<YEAR>.pt for 2014 through 2025. Each shard is a PyTorch Geometric TemporalData object: one flat, time-ordered event stream, not a sequence of snapshots. The annual split only keeps file sizes manageable. Concatenated, the twelve shards form one chronological graph.

Multi-relational Merged-edge
Directory data/processed/pyg_graph/ data/processed/pyg_graph_merged/
msg width 24 35 (the same 24, plus 11 merged-history columns)
Node bundle data/processed/node_features_static.pt pyg_graph_merged/node_features_static.pt

The merged-edge tree holds 937,156 edges across its twelve shards, of which 75,693 are trades. Its shards also carry the structural rows, but the merged-edge models read only the trade rows, where the history is folded into columns 24โ€“34. The 2023 shards of the two trees have identical row counts and identical first rows.

Fields (every field has one entry per edge, E):

Field Dtype Meaning
src int64 Legislator node index, in [0, 995)
dst int64 Company node index, in [995, 995 + 7,372). The offset is already applied.
t int64 Unix seconds. For a trade, the filing date. For a structural edge, the date of the earliest event in the collapsed pair. The shard is sorted by t, and the shard year is the year of t.
last_seen int64 Unix seconds of the latest event in the collapsed pair, over the whole 2012โ€“2025 span. It equals t on trades. It can fall after the shard year: in the 2023 shard it reaches 2025-06-26.
msg float32 Edge attributes, [E, 24] or [E, 35]. Layout below.
y int64 1 or 0 on trade edges. -1 on structural edges, which must be excluded from supervision.
event_type int64 0 trade, 1 lobbying, 2 campaign finance, 3 industrial-constituency

Example: the 2023 shard (identical row counts in both trees):

Total edges 23,517
Trades 8,222 (1,793 positive, 21.8%)
Campaign-finance edges 201
Industrial-constituency edges 15,094
Lobbying edges 0

Lobbying has no edges in 2023 because a collapsed edge is filed under the year of its earliest event, and every lobbying pair began before 2023.

msg columns. The file does not store column names. The order is fixed by the builders and is read by position.

Index Columns Present on
0โ€“2 Trade_Size_USD, Filing_Gap, Transaction trades
3โ€“6 is_sponsorship, voted_yea, Fin_Amt, Geo_Weight structural edges
7โ€“23 vol_20d, vol_60d, vol_120d, vol_252d, vol_of_vol_60d, vol_trend, idio_vol_60d, mom_60d, mom_252d, reversal_21d, beta_20d, beta_60d, downside_beta, excess_vol, max_dd_60d, skew_60d, sharpe_60d trades
24โ€“26 m_lobby_count, m_lobby_recency, m_lobby_flag merged-edge trades
27โ€“30 m_camp_logamt, m_camp_count, m_camp_recency, m_camp_flag merged-edge trades
31โ€“34 m_geo_logwt, m_geo_count, m_geo_recency, m_geo_flag merged-edge trades

Columns that a stream does not carry are zero.

  • Units. Trade_Size_USD is the disclosure bracket as an ordinal from 1 to
    1. Filing_Gap is in days. Transaction is 1 for a purchase and 0 for a sale.
  • Market features are computed at the filing date.
  • Merged-history columns summarise each channel's events for that legislatorโ€“company pair strictly before the trade's filing date. Each event is down-weighted by the number of tickers it reached.
  • voted_yea is zero everywhere. The roll-call lobbying relation was dropped, so this column carries no information.
  • Values are stored untransformed. Log scaling and standardisation are done by the training code at load time, using each fold's training rows only.

Collapsed structural edges, and what that means for point-in-time use. Repeated structural events for one (legislator, company, channel) are collapsed into a single edge:

  • t is the earliest event;
  • last_seen is the latest event;
  • is_sponsorship, Fin_Amt and Geo_Weight are summed over every event in the pair, including events after any given cutoff. On a lobbying edge, is_sponsorship is therefore a count of sponsorship events, not a 0/1 flag.

The released training code selects structural edges with t < cutoff, and computes days_since from t. A model that reads last_seen, is_sponsorship, Fin_Amt or Geo_Weight directly from a shard sees values that may include events after its cutoff. If you need structural features as of a date, rebuild them from the processed_events_* tables, which keep one row per event with its disclosure date. Trades are never collapsed, so every trade field is point-in-time.

ID maps. Each tree has its own src_id_map.npy and dst_id_map.npy. These are pickled dicts: src_id_map maps BioGuide ID โ†’ node index (995 entries), and dst_id_map maps ticker โ†’ node index (7,372 entries). The two trees index the same nodes differently, so always key a prediction against the tree it was produced from.

Node features. node_features_static.pt holds the static node tensors: x_pol, pol_state, x_comp, comp_sec, comp_ind, and meta. They are aligned to that tree's ID maps. node_features_meta.json gives their dimensions and vocabularies.

Tensor Width Columns
x_pol 42 0โ€“2: trading record (share of trades with a positive 6-month peak excess return, log1p trade count, share of purchases); 3โ€“8: chamber, four-way party one-hot, leadership flag; 9โ€“10: W-NOMINATE dimensions 1 and 2; 11โ€“41: 31-way committee multi-hot
pol_state 1 state index, for a learned embedding
x_comp 10 SIC-division one-hot
comp_sec, comp_ind 1 each sector and industry indices, for learned embeddings

Index 0 of each categorical vocabulary is UNK, for nodes that appear only on structural edges. The tensors are static snapshots, not point-in-time: the trading-record columns are computed over every trade in the build window, and party, leadership, ideology and committees are taken as of the snapshot date in meta (by default the last filing date). For strictly point-in-time node features, rebuild them per fold from the raw tables.

2. Relational Tables (Hugging Face Configs)

For researchers using flat-feature models (XGBoost, LightGBM) or custom graph builders, the structural connective tissue is provided as multiple dataset configurations. You can load these individually using the Hugging Face datasets library (e.g., load_dataset("benroodman/HillStreet", "processed_events_lobbying")). Field definitions for every table are in docs/tables.md.

Processed Edge Tables

Config Contents Time anchor Keys
processed_events_campaign_finance Financial support flowing from industry-aligned PACs or entities to specific legislators. date bioguide_id, industry_code
processed_events_lobbying Alignment between corporate lobbying efforts and a legislator's active policy behavior (sponsorship and floor voting). date bioguide_id, ticker
processed_events_geographical_industry Links from a congressperson to the industries that maintain a physical footprint within their specific jurisdiction. release_date bioguide_id, sic_code

Legislator Metadata

Config Contents Time anchor Keys
raw_congress_terms Historical term lengths and structural positioning, one distinct entry per congressperson per term. start, end id_bioguide
raw_voteview_members Granular ideological positioning for each session. congress bioguide_id, icpsr

Committee Membership History

Config Contents Time anchor Keys
raw_committee_assignments Session-level record of congressional committee assignments. Meeting Congressperson, State, District

Roll Call Votes and W-NOMINATE Scores

Config Contents Time anchor Keys
raw_voteview_rollcalls Metadata for each specific vote. date congress, chamber, rollnumber
raw_voteview_votes Maps individual legislators to specific roll call outcomes. date (via raw_voteview_rollcalls) congress, chamber, rollnumber, icpsr
raw_voteview_ideology The calculated coordinates and rolling performance metrics. date_window_end icpsr

Lobbying Records (LobbyView)

Config Contents Time anchor Keys
raw_lobbyview_bills Metadata for all tracked legislative items. introduced_date bill_id, bioguide_id
raw_lobbyview_clients Maps lobbying entities to standardized identifiers. โ€” lob_id, gvkey, naics
raw_lobbyview_issue_text Granular activity and extracted bill links. estimated_filing_date (via raw_lobbyview_reports) report_uuid
raw_lobbyview_issues Maps specific issues to targeted government entities. estimated_filing_date (via raw_lobbyview_reports) report_uuid
raw_lobbyview_network Aggregated client-legislator interaction matrix. year lob_id, bioguide_id
raw_lobbyview_reports Filing metadata and financial expenditures. estimated_filing_date report_uuid, lob_id

Campaign Finance (PAC and Inter-Committee Transactions)

Config Contents Time anchor Keys
raw_cf_candidates Master list mapping FEC IDs to normalized identifiers. Cycle CID, FECCandID
raw_cf_committees Metadata for PACs and Party Committees. Cycle CmteID
raw_cf_pacs Direct itemized transfers from PACs to Candidates. estimated_filing_date PACID, CID
raw_cf_individuals Itemized donations from individuals to candidates/committees. estimated_filing_date RecipID, CmteID
raw_cf_pac_other Inter-committee financial transfers and joint fundraising. estimated_filing_date Filerid, RecipID
raw_cf_expenditures Operating and independent expenditures. estimated_filing_date CRPFilerid
raw_527_committees 527 organizations. Cycle EIN, CmteID
raw_527_receipts Receipts of 527 organizations. estimated_filing_date RecipID, ContribID
raw_527_expenditures Expenditures of 527 organizations. estimated_filing_date EIN

Corporate Financials (SEC EDGAR)

Config Contents Time anchor Keys
raw_sec_financials Each row represents a single fiscal fact extracted from a specific SEC filing for a specific company. FiledDate Ticker

Economic Indicators (FRED)

Config Contents Time anchor Keys
raw_fred_indicators Daily values of 24 FRED series as publicly available on each date. date date

District Employment (Census CBP)

Config Contents Time anchor Keys
raw_district_industries_estimates Congressional district business patterns, 2010โ€“2012 files. YEAR (release date per raw_district_industries_dates) NAME, NAICS code
raw_district_industries_surveys Congressional district business patterns, 2013 onward. YEAR (release date per raw_district_industries_dates) NAME, NAICS code
raw_district_industries_dates Census survey release dates. date survey_reference_year

Corporate & Industry

Config Contents Time anchor Keys
raw_company_sic Company identifiers with SIC code and description. โ€” cik, ticker
raw_naics_2013_mappings SIC codes mapped to OpenSecrets category codes and NAICS codes. โ€” SICcode, OpenSecretsCatcode, NAICS CODE
raw_naics_2012_crosswalk NAICS 2012 to SIC crosswalk. โ€” NAICS, SIC
raw_naics_2017_crosswalk NAICS 2017 to SIC crosswalk. โ€” NAICS, SIC
raw_naics_2022_crosswalk NAICS 2022 to SIC crosswalk, with the corresponding NAICS 2017 code. โ€” 2022 NAICS Code, Related SIC Code
raw_naics_effective_dates Effective date of each SIC and NAICS revision. Effective_Date System_Name

These configurations are unrelated source tables with deliberately different schemas, so each is declared separately. The .pt / .npy graph tensors and the source files are not dataset configs โ€” browse them in the Files tab or fetch them with huggingface_hub.hf_hub_download.

3. Source code (hillstreet_pipeline/ and WWW_submission/)

This repository includes the code that builds both graph constructions and the tabular matrix from the raw tables. It also includes the code that trains every model and produces every table and figure in the paper. The code is in two folders:

  • hillstreet_pipeline/ is the pipeline: data preparation, the graph builders, the models and the training drivers. It does not depend on the paper.
  • WWW_submission/ reproduces the WWW 2027 paper. It runs the pipeline in order, with the paper's arguments, and writes one CSV per table.

Run it from the repository root, where data/ already sits. All paths are relative to that root, so a clone of this repository runs the code without changes.

pip install torch==2.9.1 --index-url https://download.pytorch.org/whl/cpu
pip install torch-geometric==2.7.0
pip install -r requirements.txt

python WWW_submission/build_01_dataset.py   # raw tables -> processed CSVs
python WWW_submission/build_02_tensors.py   # -> both graphs and the flat matrix
bash   WWW_submission/run_all.sh            # train, then write every table

On Windows, use .\WWW_submission\run_all.ps1 for the last step.

Two inputs are not redistributed: the trade table and the per-ticker price history (see Prerequisite above). build_01_dataset.py checks every input and lists anything missing before it starts. A full run takes days of CPU time. WWW_submission/README.md explains how to check the pipeline in minutes without data, and how to run one narrow slice for real.

hillstreet_pipeline/
โ”œโ”€โ”€ config.py                  paths and feature flags
โ”œโ”€โ”€ data/                      event tables, trade table, label, node features
โ”‚   โ”œโ”€โ”€ lobbying_events.py   campaign_events.py   constituency_events.py
โ”‚   โ”œโ”€โ”€ trade_table.py       ticker_normalizer.py price_utils.py   price_features.py
โ”‚   โ””โ”€โ”€ labeling.py          node_features.py     feature_lookups.py
โ”œโ”€โ”€ graphs/
โ”‚   โ”œโ”€โ”€ multirelational.py     the multi-relational graph
โ”‚   โ”œโ”€โ”€ merged.py              the merged-edge graph
โ”‚   โ””โ”€โ”€ tabular.py             the flat CSV with the merged-edge columns
โ”œโ”€โ”€ models/
โ”‚   โ”œโ”€โ”€ gnn/                   graphsage.py, gat.py, gcn.py
โ”‚   โ””โ”€โ”€ tabular/               logistic_regression, mlp, random_forest, xgboost, catboost
โ””โ”€โ”€ train/
    โ”œโ”€โ”€ graph.py               GNN training on either construction
    โ”œโ”€โ”€ tabular.py             the five tabular baselines
    โ”œโ”€โ”€ common.py              split dates, seeding, metrics, the GNN training loop
    โ”œโ”€โ”€ sweep.py               resumable sweeps and run fingerprints
    โ””โ”€โ”€ walkforward.py         expanding-window guards

WWW_submission/
โ”œโ”€โ”€ run_all.sh, run_all.ps1    the whole reproduction, in order
โ”œโ”€โ”€ build_01_dataset.py, build_02_tensors.py
โ”œโ”€โ”€ train_01 ... train_04      the 2023 grid, other test years, node ablations, derived studies
โ”œโ”€โ”€ tables/                    one script per paper table or figure
โ””โ”€โ”€ analysis/                  blends, controls, channel deltas, label sensitivity,
                               record counts, feature screen, filing gap, shard inspection

Building the data

  • config.py resolves the project root and holds every input and output path, plus the feature flags. Raw tables are accepted under their release names or under older ones (for example expends527.csv or Expenditures.csv).
  • data/. The three event builders write the processed_events_* tables. trade_table.py turns the raw filings into the trade table, using ticker_normalizer.py and price_utils.py. price_features.py computes the 17 market features, and its column order fixes the msg layout. node_features.py and feature_lookups.py build the static node tensors as of the snapshot date.
  • labeling.py is the single source of truth for y. Both the graph and the tabular builds import it, so their labels are identical. Run it on its own for a self-test.
  • graphs/multirelational.py builds the multi-relational graph:
    1. it ingests the trade table and the three event tables and attaches the label;
    2. it broadcasts industry-level events to individual tickers;
    3. it collapses repeated structural pairs into one edge, keeping the first (t) and last (last_seen) event;
    4. it writes annual PyG TemporalData shards with global node-id maps, then builds the aligned node tensors.
  • graphs/merged.py builds the merged-edge graph. It reuses the same ingestion, then folds each pair's prior structural history onto its trade edges as 11 fan-out-weighted attributes.
  • graphs/tabular.py writes ml_dataset_continuous_merged.csv: the trade table plus the same 11 merged columns and the label, read from the merged trade parquet so the tabular and graph inputs match.

Training and evaluation

  • Drivers. train/graph.py --construction merged|multirel trains GraphSAGE, GAT or GCN on either construction. train/tabular.py trains the five tabular baselines.
  • Splits. Every driver uses the expanding-window split of the paper: twelve monthly folds per test year.
  • Seeds and hyperparameters. Seeds and hyperparameters are the drivers' defaults, and every run writes them to its run_config.json.
  • Where each output comes from. WWW_submission/README.md maps each paper table to the script that produces it. results/README.md does the same for every file under results/.

Graph Constructions

The same nodes, the same events, the same labels โ€” two different answers to "how should a structural relationship reach the model?"

Multi-relational Merged-edge
Shards + id maps data/processed/pyg_graph/ data/processed/pyg_graph_merged/
Edge parquets data/processed/master_edges_parquet/ data/processed/master_edges_parquet_merged/
Node bundle data/processed/node_features_static.pt data/processed/pyg_graph_merged/node_features_static.pt
Builder hillstreet_pipeline/graphs/multirelational.py hillstreet_pipeline/graphs/merged.py
msg width 24 35 (24 base + 11 merged)
Structural relations separate edges, tagged by event_type folded onto the trade edge as point-in-time history
Approx. size ~0.15 GB ~0.19 GB

Where the node bundle lives differs between the two. The merged-edge pipeline writes its bundle inside pyg_graph_merged/, so that directory is self-contained. The multi-relational pipeline writes its bundle to data/processed/node_features_static.pt, one level up. The two never collide, but if you download only the multi-relational graph, remember its bundle does not sit in pyg_graph/.

Multi-relational

Lobbying, campaign-finance, and industrial-constituency relations are carried as their own edges alongside the trade edges, each declaring its kind through event_type (0 trade, 1 lobbying, 2 campaign, 3 industrial-constituency). All four streams share the one 24-column msg layout, zero-filled where a stream carries nothing. Message passing therefore sees each relation type as a distinct edge that a model can route, weight, or ablate separately.

Merged-edge

The alternative hypothesis: instead of a separate campaign-finance edge linking a legislator to a company, fold a point-in-time summary of that prior relationship onto the trade edge the same pair later transacts. If legislator P received industry money mapping to company C, and P later trades C, the trade edge's features should already "know" about that link.

For every trade (legislator, company, Filed) the builder looks back over all prior structural events between that exact pair, strictly before the filing time, and appends 11 columns:

Block Columns
Lobbying (3) m_lobby_count, m_lobby_recency, m_lobby_flag
Campaign finance (4) m_camp_logamt, m_camp_count, m_camp_recency, m_camp_flag
Industrial-constituency (4) m_geo_logwt, m_geo_count, m_geo_recency, m_geo_flag

They are appended after the original 24, so code indexing the base layout positionally stays valid, and they are non-zero only on trade rows. The structural streams are still written to the merged shards, so the node universe and node features are identical to the multi-relational construction โ€” a driver simply chooses not to route them into message passing.

Fan-out normalization. Campaign-finance and industrial-constituency events link a legislator to every ticker in an industry or sector, not to one company: a single industry-PAC donation fans out across every ticker in that SIC. Each broadcast edge is therefore down-weighted by its fan-out โ€” the number of distinct tickers the originating event reached:

effective count  = ฮฃ over prior events of  1 / fanout_e
effective amount = ฮฃ over prior events of  amount_e / fanout_e

A pair in a 2-ticker industry counts ~25ร— more than one in a 50-ticker industry. Recency and the *_flag indicator are not normalized. Fan-out is computed exactly for campaign and industrial-constituency (each pre-broadcast event is tagged and its expansion counted). For lobbying it is a documented proxy: events_lobbying.csv is already exploded to ticker level and the originating client/bill identity is gone, so fan-out is taken as the number of distinct tickers linked to that legislator on that filing date.

Leakage boundary. The lookback is a merge_asof(direction="backward", allow_exact_matches=False), so each trade sees only structural events strictly before its own filing time โ€” the same standard applied to the trade's market features. Because the merge is anchored to the trade's own timestamp rather than to a moving backtest cutoff, it is fold-independent and is baked into the shards once.

Which one should I use?

They answer different questions, and both are shipped so the comparison can be run head-to-head. Use multi-relational when you want the model to learn how to route each relation type. Use merged-edge when you want the relational history available directly to the trade-edge decoder without message passing having to carry it. ml_dataset_continuous_merged.csv is the flat-feature analogue of the merged-edge graph โ€” the same 11 columns as tabular features โ€” so gradient-boosted baselines can be compared against the GNNs on byte-identical inputs.


The Label

y is peak-based and thresholded at the top quartile.

For each trade, the signal is the peak six-month excess return over SPY โ€” the most favorable excursion the excess-return path reaches at any point in the horizon:

signal =  Max_Excess_Return_6M

y = 1  iff  signal > q_0.75  over all trades

Three properties are worth stating explicitly:

  • It is a path maximum, not an endpoint return. The question is whether the trade reached the threshold at any point in the six months, not where it closed.
  • It is excess over SPY, not raw return.
  • It is anchored on the filing date, not the trade date. This is the copy-trading frame: the earliest moment the public could have acted on the disclosure.

A single threshold is estimated once over the whole dataset, giving roughly 25% positives. This is deliberately not fold-local: the threshold is global by design, so the label can be baked at build time and every downstream consumer simply reads y. Trades whose horizon has not resolved yield a NaN signal, fail the > test, and land at y = 0 rather than corrupting the threshold. Structural edges carry y = -1 and must be excluded from supervision.

The definition lives in hillstreet_pipeline/data/labeling.py and is imported by both label bakes, so the graph and tabular targets are byte-identical.

Evaluation Protocol

Results on this dataset use a gap-aware walk-forward split, anchored on Filed + horizon_days:

  • Train โ€” Filed < test_start and Filed + horizon < test_start (fully resolved outcomes only)
  • Gap โ€” Filed < test_start and Filed + horizon >= test_start (excluded from supervision; the outcome is not yet known at test time)
  • Test โ€” Filed โˆˆ [test_start, test_start + 1 month), walked forward month by month

The primary metrics are pooled AUROC and pooled PR-AUC: pool every per-trade prediction across the full test year, then compute a single value. The average of monthly values is a diagnostic, not the headline number. The secondary metric is precision among the top 10% of highest-confidence predictions, computed over the pooled test year โ€” the actionable copy-trading measure.

Every configuration is trained under five seeds (42, 142, 242, 342 and 442), and tables report the mean with the across-seed standard deviation. Supplementary results cited in the paper are in docs/results.md.


Reproduction Pipeline

All commands run from the repository root, with data/raw/ and data/parquet/ in place (see Prerequisite). Use the python -m form, which puts the repository root on sys.path.

Requirements: Python 3.12, torch==2.9.1, torch-geometric==2.7.0, then pip install -r requirements.txt. The CPU build of PyTorch is enough; a GPU only speeds up training. Install PyTorch and PyG first.

To rebuild everything the paper reports, in order:

python WWW_submission/build_01_dataset.py    # raw tables -> processed CSVs
python WWW_submission/build_02_tensors.py    # -> both graph constructions + the flat matrix
bash   WWW_submission/run_all.sh             # train every model, then write every table

To build the dataset step by step instead:

# 0. (Only if regenerating the trade table from raw filings)
python -m hillstreet_pipeline.data.trade_table           # -> data/processed/ml_dataset_continuous.csv

# 1. The three processed structural-event tables (any order)
python -m hillstreet_pipeline.data.lobbying_events
python -m hillstreet_pipeline.data.campaign_events
python -m hillstreet_pipeline.data.constituency_events

# 2. Annual PyG shards, node-id maps and aligned node features, per construction
python -m hillstreet_pipeline.graphs.multirelational     # -> pyg_graph/
python -m hillstreet_pipeline.graphs.merged              # -> pyg_graph_merged/

# 3. (Optional) the flat CSV for the tabular baselines
python -m hillstreet_pipeline.graphs.tabular             # -> ml_dataset_continuous_merged.csv

The graph builders read the three event tables but do not build them. Each one builds the node features as its last step.

The 17 market features are appended to the trade table automatically when they are missing. Pass --refresh_price_features to recompute them, or --skip_price_features to fail if they are absent.

Other flags:

  • --start_date YYYY-MM-DD bounds the graph timeline.
  • --skip_node_features writes edges and shards only.
  • --snapshot_date pins the as-of date for the node features.
  • --force rebuilds the edge parquets instead of reusing them.

graphs/tabular.py reuses the merged trade parquet. Run the merged builder first, or pass --build_merged.

To train one model directly:

python -m hillstreet_pipeline.train.graph --construction merged --model graphsage --save_preds
python -m hillstreet_pipeline.train.tabular --model random_forest --save_preds

WWW_submission/README.md covers the full run, how to check the pipeline in minutes without data, and which script produces which table.

Loading the tensors

import glob
import numpy as np
import torch

tree = "data/processed/pyg_graph_merged"          # or data/processed/pyg_graph

# One shard
shard = torch.load(f"{tree}/hillstreet_temporal_graph_2023.pt", weights_only=False)
print(type(shard).__name__, shard.num_events, shard.msg.shape)   # TemporalData 23517 [23517, 35]

# All shards, as one chronological stream
shards = [torch.load(p, weights_only=False)
          for p in sorted(glob.glob(f"{tree}/hillstreet_temporal_graph_*.pt"))]
cat = lambda k: torch.cat([getattr(s, k) for s in shards])
src, dst, t, msg, y, etype = (cat(k) for k in ("src", "dst", "t", "msg", "y", "event_type"))

# Supervised trade edges only
trade = etype == 0
X, labels = msg[trade], y[trade]                   # labels are 0/1 here

# Node indices back to entity ids
src_map = np.load(f"{tree}/src_id_map.npy", allow_pickle=True).item()
dst_map = np.load(f"{tree}/dst_id_map.npy", allow_pickle=True).item()
bioguide = {v: k for k, v in src_map.items()}
ticker = {v: k for k, v in dst_map.items()}

# Static node features (multi-relational tree: data/processed/node_features_static.pt)
bundle = torch.load(f"{tree}/node_features_static.pt", weights_only=False)
x_pol, x_comp = bundle["x_pol"], bundle["x_comp"]

weights_only=False is required, because the shards are pickled PyG objects and not bare tensors. torch_geometric must be installed to unpickle them. torch_geometric_temporal is not needed.

Feature Engineering & Normalization

To stabilize variance in graph training, continuous features are transformed using signed log-scaling: $x' = \text{sign}(x) \times \log(1 + |x|)$

Counts and amounts follow the same treatment: edge weights use log1p(total_count) normalized by the maximum, trade size is an ordinal bracket, and filing gap is log1p(days) winsorized at 120 days.

Caveats

  • Volatility features are strong, and are not leakage. vol_120d measured at the filing date is the single most predictive feature for flat-feature baselines. High-volatility stocks mechanically reach a top-quartile peak more often โ€” a real, known-at-filing-time relationship rather than lookahead โ€” but any analysis should account for it.
  • Broadcast relations are diffuse. Campaign-finance and industrial-constituency events are industry-level, so they connect a legislator to every ticker in an industry. The merged-edge construction down-weights by fan-out; the multi-relational construction does not, leaving that to the model.
  • Lobbying fan-out is a proxy. See Merged-edge.
  • Structural edges are collapsed. Repeated events for the same (legislator, company, event_type) are merged into one weighted edge, with t the earliest event and last_seen the most recent. Edges are kept only for pairs whose first link falls on or after the graph's opening date of 2014-01-01. Trades are never collapsed โ€” each is a distinct supervised event.
  • Tickers without price history are dropped from the dataset entirely.
  • The graph is bipartite. There are no legislatorโ†”legislator or companyโ†”company edges.

Maintenance

We are committed to hosting and maintaining HillStreet with periodic updates as new raw records become available, at minimum semiannually.

Licensing

HillStreet combines records from government, academic, and non-profit sources. To comply with the NonCommercial and ShareAlike terms of LobbyView and OpenSecrets, the dataset, including both graph constructions, is released under CC BY-NC-SA 4.0.

The table below summarizes the licensing terms for each component and the preferred citation.

Component Source License Preferred Citation
Legislator Metadata congress-legislators Public Domain The unitedstates Project. 2026. congress-legislators: Members of the United States Congress. https://github.com/unitedstates/congress-legislators
Roll Call Votes VoteView CC BY 4.0 Jeffrey B. Lewis, Keith Poole, Howard Rosenthal, Adam Boche, Aaron Rudkin, and Luke Sonnet. 2026. Voteview: Congressional Roll-Call Votes Database. https://voteview.com/
Ideology Scores (W-NOMINATE) VoteView CC BY 4.0 Jeffrey B. Lewis, Keith Poole, Howard Rosenthal, Adam Boche, Aaron Rudkin, and Luke Sonnet. 2026. Voteview: Congressional Roll-Call Votes Database. https://voteview.com/
District Employment County Business Patterns Public Domain U.S. Census Bureau. 2025. 2023 County Business Patterns (CBP). https://www.census.gov/programs-surveys/cbp.html
Lobbying Reports LobbyView Academic / Non-Commercial In Song Kim. 2018. Political Cleavages within Industry: Firm-level Lobbying for Trade Liberalization. American Political Science Review 112, 1 (2018), 1โ€“20.
PAC Transactions OpenSecrets CC BY-NC-SA 3.0 OpenSecrets. 2026. Campaign Finance and Lobbying Data. https://www.opensecrets.org/
527 Org Transactions OpenSecrets CC BY-NC-SA 3.0 OpenSecrets. 2026. Campaign Finance and Lobbying Data. https://www.opensecrets.org/
Corporate Financials SEC EDGAR Public Domain U.S. Securities and Exchange Commission. 2026. Electronic Data Gathering, Analysis, and Retrieval (EDGAR) System API. https://www.sec.gov/edgar/sec-api-documentation
Economic Indicators FRED / ALFRED Non-Commercial* Federal Reserve Bank of St. Louis. 2026. ArchivaL Federal Reserve Economic Data (ALFRED). https://alfred.stlouisfed.org/

*Licensing terms vary by series; see raw_fred_indicators.

Intended Use

HillStreet is intended as a research benchmark for the machine learning and political science communities: evaluative modeling of which trades exhibit information asymmetry; analysis of the structural correlation between corporate lobbying, campaign finance, and legislative outcomes; benchmarking GNN architectures on large, heterogeneous, temporally indexed bipartite graphs; and comparing multi-relational message passing against feature-folded representations of the same relations, with the supervised edge set, labels, node features, and temporal ordering held fixed. It is not intended for legal determination, since model outputs are probabilistic and structural and do not constitute evidence of insider trading or ethics violations under the STOCK Act, or for profiling individual donors or corporate employees below the publicly disclosed Ultimate Organization (UltOrg) level.

Non-Intended Use: This dataset is for research purposes only. It is not designed for legal determinations of insider trading nor for real-time automated trading.

Downloads last month
518