Skip to content

yellowbear27/insider_event_study

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Event-Driven Signal Hypothesis Engine

A Python framework for testing whether discrete market events (e.g. congressional trades) change the distribution of future returns.


Objective

Answer a single question:

Does a specific event provide a measurable edge in future price movement?

This project does not build a trading system. It builds a hypothesis testing engine.


Current Status

  • Congressional trade ingestion: working
  • Event parsing and enrichment: working
  • Backtesting engine: working
  • Hypothesis framework: partially implemented

Current Research Direction

This project is evolving from a simple insider-event backtest into a dataset-discovery and event-study pipeline. Current focus areas:

  • locating reliable disclosure datasets
  • improving scraper coverage
  • normalising event data
  • comparing insider signals against market benchmarks

Known Issues

  • filing_date mostly missing → event timing not reliable
  • Current tests use transaction date (not ideal)
  • Sample size small
  • No statistical significance testing yet

System Overview

Data Sources (Free Only)

  • Congressional trades (Senate disclosures)
  • Price data via yfinance

Pipeline

raw data → parser → event table → backtest → report

Event Schema

ticker
event_date
filing_date
transaction_type
shares_before
shares_after
event_type
direction (always None at this stage)
source

Event Types

purchase
partial_sale
full_exit_sale

Derived:

cluster_flag
cluster_size

Key Design Principles

  • Parser produces facts only
  • Hypothesis layer assigns interpretation
  • No narrative logic in code
  • All signals must be testable
  • Weekly iteration discipline

Example Hypothesis

hypothesis: purchase_bullish
event_type: purchase
expected_direction: bullish
horizons: [5, 20, 60]
min_sample_size: 10

Output

Each test produces:

mean return
median return
hit rate
sample size
baseline comparison
decision

Saved to:

reports/

How to Run (current)

Install dependencies:

pip install -r requirements.txt

Run pipeline (temporary entry point):

python main.py

(Note: entry script will be replaced with scripts/run_hypothesis.py)


Limitations

  • Event timing not yet correct (disclosure vs transaction)
  • Congressional data is delayed and incomplete
  • Small dataset → results exploratory only
  • No cross-validation yet

Roadmap

See:

ROADMAP.md

Non-Goals

  • No trading bot
  • No portfolio optimisation
  • No news sentiment analysis
  • No paid data (until edge is proven)

License

MIT

About

Quantitative event study of congressional and insider trade disclosures against US equity returns

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages