dgunning / edgartools

Python library for working with SEC Edgar
MIT License
324 stars 70 forks source link

Added support for press releases in EX-99 attachments. #38

Closed vgreg closed 3 months ago

vgreg commented 3 months ago

A fix for Issue https://github.com/dgunning/edgartools/issues/34

Added EX-99 as a second type of valid attachment for press releases.

All tests are passing, except for test_form4_to_markdown() which fails on line 35, but that is unrelated to my changes.

dgunning commented 3 months ago

Are press releases just EX-99 and EX-99.1 or EX-99.2?

In a sample of 500 filings there are multiple ways to write EX-99.1 e.g. EX-99.01.

ExhibitCounts

Is the intent of this press release functionality "Show me the attachments that by convention are intended to be press releases" ?

dgunning commented 3 months ago
PressRelease
vgreg commented 3 months ago

That would be my use case. I will add the other types as well, or maybe we would be better off with a wildcard like "EX-99*"?

Another thing your example made me realize is that currently, the code for press releases returns only the first one. But in your example, I would want to get all the press releases. Is it worth building this into the library or should I access the attachments directly in my code?

dgunning commented 3 months ago

The logic I have so far is

Description.str.match('.*RELEASE') or Type.isin(['EX-99.1', 'EX-99', 'EX-99.01']). This will include EX-99.2+ marked as press releases. Sometimes they are named 'NEWS RELEASE'

In addition Document.str.endswith('.htm') to select only the HTML versions.

I am also changing the variable to handle multiple press_releases.

vgreg commented 3 months ago

That should do it. Thanks!

dgunning commented 3 months ago

Released 2.13.0

eightk = filing.obj()

# if press release present
press_releases:PressReleases = eightk.press_releases
press_release:PressRelease = press_releases[0]
dgunning commented 3 months ago

Added equivalent functionality in 2.13.0