FlareStart
HomeNewsHow ToSources
FlareStart

Where developers start their day. All the tech news & tutorials that matter, in one place.

Quick Links

  • Home
  • News
  • Tutorials
  • Sources
  • Privacy Policy

Connect

© 2026 FlareStart. All rights reserved.

Back to articles
Parsing Form 4: How to Extract Signal from SEC Insider Trading Data
How-ToProgramming Languages

Parsing Form 4: How to Extract Signal from SEC Insider Trading Data

via Dev.to PythonVic Chen4h ago

What Is Form 4? Form 4 is filed with the SEC within 2 business days whenever a corporate insider buys or sells their company's stock. It's one of the most actionable free datasets in finance. Transaction Codes Code Type Signal P Open market purchase High — insider buying with own money S Open market sale Context-dependent M Option exercise Low — usually compensation A Award/grant Ignore for signals Python Parsing import xml.etree.ElementTree as ET def parse_form4 ( xml_content ): root = ET . fromstring ( xml_content ) transactions = [] for txn in root . findall ( ' .//nonDerivativeTransaction ' ): code = txn . find ( ' .//transactionCode ' ). text shares = float ( txn . find ( ' .//transactionShares/value ' ). text ) price = float ( txn . find ( ' .//transactionPricePerShare/value ' ). text or 0 ) transactions . append ({ ' code ' : code , ' shares ' : shares , ' price ' : price }) return transactions High-Signal Patterns Cluster buying — 3+ insiders buy in same 30-day window → strong

Continue reading on Dev.to Python

Opens in a new tab

Read Full Article
0 views

Related Articles

This free privacy tool makes it super easy to see which sites are selling your data
How-To

This free privacy tool makes it super easy to see which sites are selling your data

ZDNet • 1h ago

Oupes Mega 1 review: I finally found a portable power station I can store in my truck
How-To

Oupes Mega 1 review: I finally found a portable power station I can store in my truck

ZDNet • 2h ago

I Recreated a $200 TradingView Indicator in Pine Script for Free — Here’s How
How-To

I Recreated a $200 TradingView Indicator in Pine Script for Free — Here’s How

Medium Programming • 2h ago

7 Wireshark Filters That Instantly Make You Look Like a Network Expert
How-To

7 Wireshark Filters That Instantly Make You Look Like a Network Expert

Medium Programming • 2h ago

The Dyslexic Learning Curve
How-To

The Dyslexic Learning Curve

Medium Programming • 4h ago

Discover More Articles