sec-api.ioSEC API by D2V
Core APIs
Find & Track
EDGAR Filing Query APIFull-Text Search APIReal-Time Stream APIDaily Filing Ingestion Log
File Access
Download Filings & ExhibitsPDF GeneratorBulk Datasets
Extraction & Conversion
XBRL-to-JSON ConverterFinancial Statements + MoreFinancial StatementsFiling Section Extractor
Reference
EDGAR Entities DatabaseCIK / CUSIP / Ticker Mapping
AI Agents
Claude, ChatGPT & 50+ agents
MCP ServerFinancial Analysis Prompt LibraryEquity Research & Market Insights
Ownership & Corp. Events
Ownership & Insiders
Insider TradingForm 3/4/5Institutional HoldingsForm 13F5% Beneficial Owners13D / 13GInsider Sale NoticesForm 144
Event-Driven Disclosures
Auditor Changes8-K - 4.01Non-Reliance / Restatements8-K - 4.02Exec & Director Changes8-K - 5.02
Company Profile Data
Governance
Executive CompensationDirectors & Board Members
Capital Structure
Outstanding Shares & FloatSubsidiaries
Audit
Audit ReportsAudit Fees
Funds & Advisers
Registered Funds
Fund Portfolio Holdings and PerformanceForm N-PORTAnnual ReportsForm N-CENProxy Voting RecordsForm N-PX
Investment Advisers
Adviser RegistrationsForm ADV, Schedules, Brochures
Broker-Dealers
FOCUS ReportsForm X-17A-5
Offerings & Capital
Public Offerings
IPOs & SecondariesS-1 / F-1 / 424B4
Exempt Offerings
Private PlacementsForm DCrowdfundingForm CMini-IPOsReg A+
Enforcement & Regulatory
SEC Enforcement ActionsSEC Litigation ReleasesSEC Administrative ProceedingsAAER DatabaseSRO Filings & Rule MakingFINRA, Exchanges, Clearing Agencies
For developers
QuickstartAPI ReferencePython SDK ↗TypeScript SDK ↗Cookbook ↗
Browse all APIs →Browse all datasets →Full API docs →API reference →
Annual & Quarterly Reports
Annual reports10-KQuarterly reports10-QForeign annual20-FCanadian annual40-F
Material Events & Disclosures
Current reports8-KForeign current6-KReg A events1-UEarnings results8-K, Item 2.02Press releases + Reg FDEx 99Material contractsEx 10Insider trade policiesEx 19
Proxy & Shareholder Voting
Proxy statementsDEF 14APreliminaryPRE 14AAdditionalDEFA14ANon-management solicitingDFAN14AMerger proxy statementsDEFM14ADefinitive infoDEF 14CPreliminary infoPRE 14CAnnual report to SHARS
Corporate Insiders (§16)
Initial ownershipForm 3Insider TradingForm 4Annual deferredForm 5Restricted salesForm 144
Institutional Holdings
Portfolio holdings13F-HRCover pages13F-HR
Beneficial Ownership (5%+)
Active / activist13DPassive / institutional13G
Broker-Dealers & Market Infrastructure
BD annual reportsX-17A-5Transfer agent regTA-1Transfer agent rptTA-2Municipal advisorsMAAlt trading systemsATS-NRating agenciesNRSRO-CESwap dealersSBSE
SEC Administrative
Comment lettersCorresp / LetterEffectivenessEFFECTConfidential treatment ordersCT ORDER
Fund Registration & Holdings
Mutual funds & ETFsN-1AClosed-end & BDCsN-2Portfolio holdingsN-PORTMoney market fund portfolio reportsN-MFPSeparate accountN-3Variable annuityN-4Variable life insuranceN-6Fund mergersN-14
Business Development Cos
BDC electionN-54ABDC registrationN-2BDC auto shelfN-2ASR
Fund Reports
Annual censusN-CENShareholder reportsN-CSRSemi-annual shareholder reportsN-CSRSMoney market eventsN-CRProxy votingN-PXVariable productsN-VP
Fund Prospectuses & Supplements
Fund prospectus497Summary prospectus497KVariable initial summary497VPIVariable updating summary497VPUPost-effective (delayed)485APOSPost-effective (immediate)485BPOS
Fund Operations
Securities sold24F-2NTRepurchase offersN-23CDeregistrationN-8FExemptive apps40-APP
Public Offerings — Domestic
IPOs & registrationS-1Shelf registrationsS-3Business combinationsS-4Employee plansS-8REITsS-11
Public Offerings — Foreign
Foreign registrationF-1Foreign shelfF-3Foreign combinationsF-4ADRsF-6Rights offeringF-7Business combinationF-8MJDS registrationF-10MJDS exchange/tenderF-80
Prospectuses (424 series)
Structured products424B2Prospectus supplements424B3Final IPO424B4Shelf supplements424B5Free writingFWPM&A communications425
Exempt Offerings
Reg D privateForm DReg A offerings1-AReg A annual1-KReg A semi-annual1-SACrowdfundingForm CFunding portalsCFPORTAL
Asset-Backed Securities
Standard ABS registrationSF-1Shelf ABS registrationSF-3Distribution reports10-DAsset-level dataABS-EEReps & warrantiesABS-15G
Tender Offers & Going Private
Pre-commencement commsSC TO-CThird-partySC TO-TIssuer self-tenderSC TO-ITarget responseSC 14D9Going privateSC 13E3Cross-border transactionsCB
Confidential Submissions
Draft registrationsDRSDraft Reg ADOS
Browse all 400+ datasets →Datasets catalog →
PricingPlaygroundDocs
Setup
Python SDK ↗TypeScript SDK ↗Lucene Query Syntax
Fetch & download
Download SEC Filings From EDGARDownload Filings As PDFsDownload XML From EDGARDownload 10-Ks (Russell 3000)Financial Statements As ExcelExport Filing Metadata To CSVList Fiscal Period End Dates
Reference
Map Ticker → CIK & CUSIPMap CIK → Ticker & CUSIPMap CUSIP → Ticker & CIKList Companies By ExchangeList Companies By Sector & Industry
AI / LLM
Summarize SEC Filings With GPT ↗Analyze SEC Comment Letters
Section & text extraction
Extract 10-K SectionsExtract 10-Q SectionsExtract 8-K SectionsExtract 10-K (Multi-Year)Clean Extracted SectionsExtract 10-K Textual DataExtract Google Revenue (10-K)
Financial data
Extract Financial StatementsXBRL-to-JSON ConverterDownload XBRL XSD Files
Exhibits & attachments
Download 8-K Exhibit 99Download 8-K Press ReleasesDownload Material Contracts (Ex-10)
Governance & compensation
Exec Comp By TickerExec Comp Multi-Company CompareExport Exec Comp To ExcelDirectors & Board MembersAudit FeesSubsidiariesOutstanding Shares & Float
Market events & disclosures
8-K Material Event ActivityStock Reactions To 8-K 4.028-K Item 4.01Accountant Changes8-K Item 5.02Exec Changes
Ownership & fund analysis
Insider Trading AnalysisInsider Trading Analysis - Extended ↗13F Alpha, Volatility & Survival13F Portfolio Holdings & Cover PagesN-PORT Swap CounterpartiesN-PORT ETF ConstituentsForm 13D / 13G API ExamplesForm 144 Insider Sales
Investment advisers (Form ADV)
Recently Updated Form ADVsFind By Advisory ActivityFind By Business ActivityFind By Compensation ModelSort By Assets Under ManagementSort By Number Of AccountsFind Individual Advisers By CRD
Offerings analysis
Top 20 Largest Offerings / YrMost-Used Law Firms (S-1)424B4 Prospectuses By YearForm C CrowdfundingForm D Private PlacementsReg A+ Offerings
Quant & research
Fed Funds Rate ProjectionsFama-French Factor ModelStatistical SignificanceHalloween Effect ExplainedEDGAR Filing Trends 1994-2022EDGAR Filer Analysis
Enforcement research
SEC Litigation ReleasesSEC Administrative ProceedingsAAERs
More
Real-Time StreamFull-Text SearchForm N-CENForm N-PX Proxy VotingAll Per-API Examples →
Regulatory explainers
EDGAR Filings & ExhibitsIntro to SEC LawFiling Entities & Disclosure RequirementsForm Types Supporting XBRL8-K Item 4.01 Content Requirements
Browse All Tutorials →Cookbook on GitHub ↗
API Documentation
Introduction

AI Assistants

MCP Server

Filing Search and Retrieval

Filing Search
Full-Text Search
EDGAR Ingestion Log
Real-Time Filing Stream
Filing Download
PDF Generator
XBRL to JSON
Section Extractor
Bulk Datasets

Investment Advisers

Firm and Individual AdvisorsADV

Ownership and Holdings

Insider Transactions and Holdings3 / 4 / 5
Restricted Securities Sales144
Institutional Portfolio Holdings13F
Beneficial Ownership Above 5%13D / 13G
Insider & 5% Holder OwnershipDEF 14A
Fund Portfolio Holdings and PerformanceN-PORT

Investment Companies

Fund Annual Census ReportsN-CEN
Proxy Voting and Voting RecordsN-PX
Fund Governance & Fees
Fund Reorganizations

Offerings and Capital Raises

Registrations and ProspectusesS-1 / 424B4
Crowdfunding OfferingsForm C
Exempt Private OfferingsForm D
Reg A Offerings1-A / 1-K / 1-Z

Material Events

Entry into Material Agreements8-K 1.01
Agreement Terminations8-K 1.02
Bankruptcy and Receivership8-K 1.03
Cybersecurity Incidents8-K 1.05
Auditor Changes8-K 4.01
Financial Restatements8-K 4.02
Director and Officer Changes8-K 5.02
Shareholder Voting Results8-K 5.07

Executive and Director Pay

Executive Compensation
Director Compensation
Pay Versus Performance
Executive Compensation Governance
Severance & Change in Control

Board and Corporate Governance

Directors and Board Members
Board Oversight
Shareholder Rights & Defenses
Related Party Transactions
ESG & Risk Oversight
Compliance Signals

Shareholder Meetings and Votes

Ballot Items & Vote Standards
Shareholder Meetings Calendar
Shareholder Proposals and Proxy Contests
M&A & Strategic Transactions

Audit and Company Data

Audit Reports
Audit Fees
Subsidiaries
Shares Outstanding and Float
Equity Plans & Dilution

Broker-Dealers

FOCUS ReportsX-17A-5

SEC Enforcement and Rulemaking

Enforcement Actions
Litigation Releases
Administrative Proceedings
AAERs
Overview
Example: Python
API Reference
SRO Filings

Identifiers and Entities

CIK, CUSIP and Ticker Mapping
EDGAR Entities

Financial Statements
  1. Home
  2. Documentation
  3. AAERs
  4. Example: Python
View as MarkdownOpen this page as plain Markdown
Open in ChatGPTAsk questions about this pageOpen in ClaudeAsk questions about this pageOpen in CursorAsk questions about this page

Analysis of Accounting and Auditing Enforcement Releases

Open In Colab   View on GitHub

On this page:
  • Data Loading
    • AAER Releases by Year, Month, Day of Week and Time of Day
      • Penalty Amounts over Time
        • AAERs by Type
          • Violated Securities Laws

            This guide provides a comprehensive analysis of the Accounting and Auditing Enforcement Releases (AAERs) issued by the U.S. Securities and Exchange Commission (SEC). The analysis spans from the year 1997 to 2025 and covers various aspects of AAERs, including the frequency of releases, the types of violations, and the penalties imposed.

            import os
            import pandas as pd
            import numpy as np
            import matplotlib.pyplot as plt
            import matplotlib.style as style
            import json

            style.use("default")

            params = {
                "axes.labelsize": 8, "font.size": 8, "legend.fontsize": 8,
                "xtick.labelsize": 8, "ytick.labelsize": 8, "font.family": "sans-serif",
                "axes.spines.top": False, "axes.spines.right": False, "grid.color": "grey",
                "axes.grid": True, "axes.grid.axis": "y", "grid.alpha": 0.5, "grid.linestyle": ":",
            }

            plt.rcParams.update(params)

            Data Loading

            The data is fetched using the sec-api library, which provides access to the SEC's AAER data via the AAER Database API. The data is then processed and structured into a pandas DataFrame for further analysis. Various attributes of the AAERs, such as the date of release, the types of violations, and the penalties imposed, are extracted and transformed for analysis.

            !pip install sec-api
            from sec_api import AaerApi

            aaerApi = AaerApi("YOUR_API_KEY")

            YEARS = range(2025, 1996, -1) # from 2025 to 1997
            TARGET_FILE = "./data/aaer-structured-data.jsonl"

            if not os.path.exists(TARGET_FILE):
                for year in YEARS:
                    done = False
                    search_from = 0
                    year_counter = 0

                    # fetch all AAERs for the given year
                    while not done:
                        searchRequest = {
                            "query": f"dateTime:[{year}-01-01 TO {year}-12-31]",
                            "from": search_from,
                            "size": "50",
                            "sort": [{"dateTime": {"order": "desc"}}],
                        }

                        response = aaerApi.get_data(searchRequest)

                        if len(response["data"]) == 0:
                            break

                        search_from += 50
                        year_counter += len(response["data"])

                        with open(TARGET_FILE, "a") as f:
                            for entry in response["data"]:
                                f.write(json.dumps(entry) + "\n")

                    print(f"Finished loading {year_counter} AAERs for year {year}")
            else:
                print("File already exists, skipping download")
            Finished loading 8 AAERs for year 2025
            Finished loading 65 AAERs for year 2024
            Finished loading 111 AAERs for year 2023
            Finished loading 86 AAERs for year 2022
            Finished loading 77 AAERs for year 2021
            Finished loading 88 AAERs for year 2020
            Finished loading 97 AAERs for year 2019
            Finished loading 95 AAERs for year 2018
            Finished loading 75 AAERs for year 2017
            Finished loading 108 AAERs for year 2016
            Finished loading 111 AAERs for year 2015
            Finished loading 92 AAERs for year 2014
            Finished loading 87 AAERs for year 2013
            Finished loading 85 AAERs for year 2012
            Finished loading 127 AAERs for year 2011
            Finished loading 131 AAERs for year 2010
            Finished loading 179 AAERs for year 2009
            Finished loading 149 AAERs for year 2008
            Finished loading 228 AAERs for year 2007
            Finished loading 170 AAERs for year 2006
            Finished loading 194 AAERs for year 2005
            Finished loading 213 AAERs for year 2004
            Finished loading 219 AAERs for year 2003
            Finished loading 208 AAERs for year 2002
            Finished loading 121 AAERs for year 2001
            Finished loading 142 AAERs for year 2000
            Finished loading 22 AAERs for year 1999
            Finished loading 0 AAERs for year 1998
            Finished loading 5 AAERs for year 1997
            aaers = pd.read_json(TARGET_FILE, lines=True)

            # convert data types
            bool_cols = ["hasAgreedToSettlement", "hasAgreedToPayPenalty"]
            aaers[bool_cols] = aaers[bool_cols].astype(bool)
            aaers["dateTime"] = pd.to_datetime(aaers["dateTime"], utc=True)
            aaers["dateTime"] = aaers["dateTime"].dt.tz_convert("US/Eastern")
            aaers["dateTimeYear"] = aaers["dateTime"].dt.year
            aaers["dateTimeMonth"] = aaers["dateTime"].dt.month
            aaers["dateTimeYearMonth"] = aaers["dateTime"].dt.to_period("M")
            # Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday
            aaers["dateTimeDay"] = aaers["dateTime"].dt.day_name()
            # dateTimeClass: preMarket (4:00 AM to 9:30 AM), regularMarket (9:30 AM to 4:00 PM), afterMarket (4:00 PM to 8:00 PM), postMarket (8:00 PM to 10:00 PM)
            aaers["dateTimeClass"] = aaers["dateTime"].apply(
                lambda x: (
                    "preMarket"
                    if x.hour < 9 or (x.hour == 9 and x.minute < 30)
                    else (
                        "regularMarket"
                        if x.hour < 16
                        else "afterMarket" if x.hour < 20 else "postMarket"
                    )
                )
            )

            print(f"Loaded {len(aaers)} AAERs in total for {YEARS[-1]} to {YEARS[0]}")
            print(aaers.info())
            Loaded 3293 AAERs in total for 1997 to 2025
            <class 'pandas.core.frame.DataFrame'>
            RangeIndex: 3293 entries, 0 to 3292
            Data columns (total 23 columns):
             # Column Non-Null Count Dtype
            --- ------ -------------- -----
             0 id 3293 non-null object
             1 dateTime 3293 non-null datetime64[ns, US/Eastern]
             2 aaerNo 3293 non-null object
             3 releaseNo 3293 non-null object
             4 respondents 3293 non-null object
             5 respondentsText 3293 non-null object
             6 urls 3293 non-null object
             7 summary 3272 non-null object
             8 tags 3272 non-null object
             9 entities 3272 non-null object
             10 complaints 3272 non-null object
             11 parallelActionsTakenBy 3272 non-null object
             12 hasAgreedToSettlement 3293 non-null bool
             13 hasAgreedToPayPenalty 3293 non-null bool
             14 penaltyAmounts 3272 non-null object
             15 requestedRelief 3272 non-null object
             16 violatedSections 3272 non-null object
             17 otherAgenciesInvolved 3272 non-null object
             18 dateTimeYear 3293 non-null int32
             19 dateTimeMonth 3293 non-null int32
             20 dateTimeYearMonth 3293 non-null period[M]
             21 dateTimeDay 3293 non-null object
             22 dateTimeClass 3293 non-null object
            dtypes: bool(2), datetime64[ns, US/Eastern](1), int32(2), object(17), period[M](1)
            memory usage: 521.1+ KB
            None
            /var/folders/q3/bt7922t52p78qdm75h_8m5yh0000gn/T/ipykernel_81069/795053953.py:10: UserWarning: Converting to PeriodArray/Index representation will drop timezone information.
              aaers["dateTimeYearMonth"] = aaers["dateTime"].dt.to_period("M")
            aaers.head()
            Out[5]:
            iddateTimeaaerNoreleaseNorespondentsrespondentsTexturlssummarytagsentities...hasAgreedToPayPenaltypenaltyAmountsrequestedReliefviolatedSectionsotherAgenciesInvolveddateTimeYeardateTimeMonthdateTimeYearMonthdateTimeDaydateTimeClass
            0a1713f9f48aa9129833f02e76cc6eeed2025-02-04 10:00:21-05:00AAER-4562[33-11364, 34-102332][{'name': 'Karen J. Smith, CPA', 'type': 'indi...Karen J. Smith, CPA[{'type': 'primary', 'url': 'https://www.sec.g...The SEC has instituted public administrative p...[accounting fraud, disclosure fraud][{'name': 'Karen J. Smith', 'type': 'individua......True[{'penaltyAmount': '43348.59', 'penaltyAmountT...[disgorgement of profits, civil penalties, per...[Sections 17(a)(2) and (3) of the Securities A...[]202522025-02TuesdayregularMarket
            1044e225c5b8cc62902c5cba3928b18402025-01-29 12:56:13-05:00AAER-4561[33-11363, 34-102306][{'name': 'Jason M. Boucher, CPA', 'type': 'in...Jason M. Boucher, CPA[{'type': 'primary', 'url': 'https://www.sec.g...The SEC has instituted public administrative p...[accounting fraud, disclosure fraud][{'name': 'Jason M. Boucher', 'type': 'individ......True[{'penaltyAmount': '20102', 'penaltyAmountText...[disgorgement of profits, civil penalties, per...[Sections 17(a)(2) and (3) of the Securities A...[]202512025-01WednesdayregularMarket
            209a3b5479d46cf2be7a1e7368c1071822025-01-17 09:49:03-05:00AAER-4556[33-11354][{'name': 'GrubMarket, Inc.', 'type': 'company'}]GrubMarket, Inc.[{'type': 'primary', 'url': 'https://www.sec.g...The SEC has instituted cease-and-desist procee...[disclosure fraud][{'name': 'GrubMarket, Inc.', 'type': 'company......True[{'penaltyAmount': '8000000', 'penaltyAmountTe...[cease and desist order, civil penalties][Sections 17(a)(2) and 17(a)(3) of the Securit...[]202512025-01FridayregularMarket
            38e91cb6a1df4a724aedcff7d6ed21c372025-01-17 09:21:59-05:00AAER-4560[34-102231, IA-6828][{'name': 'Jeffery Q. Johnson, CPA', 'type': '...Jeffery Q. Johnson, CPA[{'type': 'primary', 'url': 'https://www.sec.g...The SEC has instituted proceedings against Jef...[auditor independence, improper professional c...[{'name': 'Jeffery Q. Johnson', 'type': 'indiv......True[{'penaltyAmount': '30000', 'penaltyAmountText...[cease and desist order, civil penalties][Section 206(4) of the Advisers Act, Rule 206(...[]202512025-01FridaypreMarket
            4e9f5e13f8812a0cf9bc8ee69c132b8d92025-01-17 08:47:55-05:00AAER-4559[34-102227][{'name': 'Celsius Holdings, Inc.', 'type': 'c...Celsius Holdings, Inc.[{'type': 'primary', 'url': 'https://www.sec.g...The SEC has instituted cease-and-desist procee...[disclosure fraud, accounting violations][{'name': 'Celsius Holdings, Inc.', 'type': 'c......True[{'penaltyAmount': '3000000', 'penaltyAmountTe...[cease and desist from committing or causing a...[Sections 13(a), 13(b)(2)(A), and 13(b)(2)(B) ...[]202512025-01FridaypreMarket

            5 rows × 23 columns

            AAER Releases by Year, Month, Day of Week and Time of Day

            df_year_month = aaers.pivot_table(
                index="dateTimeYear",
                columns="dateTimeMonth",
                values="id",
                aggfunc="count",
                fill_value=0,
            )
            df_year_month_pretty = df_year_month.copy()
            # convert col 1 to 12 to month names, eg 1 => Jan, 2 => Feb, etc
            df_year_month_pretty.columns = df_year_month_pretty.columns.map(
                lambda x: pd.to_datetime(str(x), format="%m").strftime("%b")
            )

            total_col = df_year_month_pretty.sum(axis=1)
            mean_col = round(df_year_month_pretty.mean(axis=1), 0)
            median_col = round(df_year_month_pretty.median(axis=1), 0)

            df_year_month_pretty["total"] = total_col
            df_year_month_pretty["mean"] = mean_col
            df_year_month_pretty["median"] = median_col

            total_row = df_year_month_pretty.sum(axis=0)
            mean_row = round(df_year_month_pretty.mean(axis=0), 0)
            median_row = round(df_year_month_pretty.median(axis=0), 0)

            df_year_month_pretty.loc["total"] = total_row
            df_year_month_pretty.loc["mean"] = mean_row
            df_year_month_pretty.loc["median"] = median_row

            df_year_month_pretty = df_year_month_pretty.astype(int)

            print("Accounting and Auditing Enforcement Releases by Year and Month")
            df_year_month_pretty
            Accounting and Auditing Enforcement Releases by Year and Month
            Out[6]:
            dateTimeMonthJanFebMarAprMayJunJulAugSepOctNovDectotalmeanmedian
            dateTimeYear
            1997000000000014500
            199900000000081132220
            20005151261120683011991421210
            200168761315135271218121108
            2002186301212241617141922182081718
            20031016201921161819302410162191818
            20041116161526232122241118102131817
            2005181428171020142123118101941616
            2006102018181021158111512121701414
            20071918191591731136310592281916
            2008171312131771315233791491213
            200917112110142022121488221791514
            20102038861214161571571311110
            20111413719101497986111271110
            20121176103546128498576
            2013943858642072118776
            20147106446134956189286
            201571568495828711311198
            2016513111131175158118108910
            2017173353104693667566
            20183586329112812179586
            20196510113949292369786
            20205321396510189178876
            20211411331137191687765
            20222645410313228818676
            2023491398138201823411198
            2024563454031437116554
            2025710000000000810
            total2542442742652163032732695242111932673293272247
            mean991098111010198710118109
            median78810610881886911098
            fig, ax = plt.subplots(figsize=(5, 3))

            data_to_plot = df_year_month_pretty.loc[2000:2024].copy()
            data_to_plot.index = data_to_plot.index.astype(int)
            data_to_plot["total"].plot(kind="line", ax=ax)

            ax.set_title("Audit and Accounting Enforcement Releases\nby Year (2000-2024)")
            ax.set_xlabel("Year")
            ax.set_ylabel("Number of AAERs")
            ax.set_axisbelow(True)
            ax.set_xticks(data_to_plot.index[::2])
            plt.xticks(rotation=90)

            for year in data_to_plot.index:
                year_y_max = data_to_plot.loc[year, "total"]
                ax.vlines(year, 0, year_y_max, linestyles=":", colors="grey", alpha=0.5, lw=1)

            plt.grid(axis="x")
            plt.tight_layout()
            plt.show()
            fig, ax = plt.subplots(figsize=(3.5, 3))

            df_year_month.loc[2000:2024].boxplot(
                ax=ax,
                grid=False,
                showfliers=False,
                flierprops=dict(marker="o", markersize=3),
                patch_artist=True,
                boxprops=dict(facecolor="white", color="tab:blue"),
                showmeans=True,
                meanline=True,
                meanprops={"color": "tab:blue", "linestyle": ":"},
                medianprops={"color": "black"},
                capprops={"color": "none"},
            )

            ax.set_title("AAERs by Month\n(2000 - 2024)")
            ax.set_xlabel("Month")
            ax.set_ylabel("AAERs Count")
            xticklabels = [pd.to_datetime(str(x), format="%m").strftime("%b") for x in range(1, 13)]
            ax.set_xticklabels(xticklabels)
            plt.xticks(rotation=45)
            plt.tight_layout()
            plt.show()
            counts_dayOfWeek = (
                aaers[aaers["dateTimeYear"].between(2000, 2024)]
                .groupby(["dateTimeDay"])
                .size()
                .to_frame(name="Count")
            ).rename_axis("Day of the Week")
            counts_dayOfWeek["Pct"] = (
                counts_dayOfWeek["Count"].astype(int) / counts_dayOfWeek["Count"].astype(int).sum()
            ).map("{:.0%}".format)
            counts_dayOfWeek["Count"] = counts_dayOfWeek["Count"].map(lambda x: f"{x:,}")

            print(f"AAER disclosures by day of the week (2000 - 2024).")
            counts_dayOfWeek.loc[["Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]]
            AAER disclosures by day of the week (2000 - 2024).
            Out[9]:
            CountPct
            Day of the Week
            Monday57418%
            Tuesday64320%
            Wednesday71622%
            Thursday76523%
            Friday55917%
            counts_filedAtClass = (
                aaers[aaers["dateTimeYear"].between(2000, 2024)]
                .groupby(["dateTimeClass"])
                .size()
                .sort_values(ascending=False)
                .to_frame(name="Count")
            ).rename_axis("Publication Time")
            counts_filedAtClass["Pct"] = (
                counts_filedAtClass["Count"].astype(int)
                / counts_filedAtClass["Count"].astype(int).sum()
            ).map("{:.0%}".format)
            counts_filedAtClass["Count"] = counts_filedAtClass["Count"].map(lambda x: f"{x:,}")
            counts_filedAtClass = counts_filedAtClass.reindex(
                ["preMarket", "regularMarket", "afterMarket"]
            )
            counts_filedAtClass.index = (
                counts_filedAtClass.index.str.replace("preMarket", "Pre-Market (4:00 - 9:30 AM)")
                .str.replace("regularMarket", "Market Hours (9:30 AM - 4:00 PM)")
                .str.replace("afterMarket", "After Market (4:00 - 8:00 PM)")
            )

            print(
                f"AAER disclosures by pre-market, regular market hours,\nand after-market publication time (2000 - 2024)."
            )
            counts_filedAtClass
            AAER disclosures by pre-market, regular market hours,
            and after-market publication time (2000 - 2024).
            Out[10]:
            CountPct
            Publication Time
            Pre-Market (4:00 - 9:30 AM)2,38973%
            Market Hours (9:30 AM - 4:00 PM)82425%
            After Market (4:00 - 8:00 PM)451%

            Penalty Amounts over Time

            counts_hasAgreedToPayPenalty = (
                aaers[aaers["dateTimeYear"].between(2000, 2024)]
                .groupby(["hasAgreedToPayPenalty"])
                .size()
                .to_frame(name="Count")
            ).rename_axis("Has Agreed to Pay Penalty")
            counts_hasAgreedToPayPenalty["Pct"] = (
                counts_hasAgreedToPayPenalty["Count"].astype(int)
                / counts_hasAgreedToPayPenalty["Count"].astype(int).sum()
            ).map("{:.0%}".format)
            counts_hasAgreedToPayPenalty["Count"] = counts_hasAgreedToPayPenalty["Count"].map(
                lambda x: f"{x:,}"
            )

            print(
                f"AAER disclosures by whether the company has agreed to pay a penalty (2000 - 2024)."
            )
            counts_hasAgreedToPayPenalty
            AAER disclosures by whether the company has agreed to pay a penalty (2000 - 2024).
            Out[11]:
            CountPct
            Has Agreed to Pay Penalty
            False1,61249%
            True1,64651%
            penality_amounts = aaers.explode("penaltyAmounts").copy()
            penality_amounts["penaltyAmount"] = penality_amounts["penaltyAmounts"].apply(
                lambda x: x["penaltyAmount"] if isinstance(x, dict) else np.nan
            )
            penality_amounts["penaltyAmount"] = penality_amounts["penaltyAmount"].astype(float)
            penality_amounts["penaltyAmount"] = penality_amounts["penaltyAmount"] / 1000
            penality_amounts["penaltyAmount"].describe().apply(lambda x: f"{x:,.0f}").to_frame()
            Out[12]:
            penaltyAmount
            count3,102
            mean8,320
            std74,308
            min0
            25%30
            50%85
            75%500
            max2,250,000
            penalties_year = penality_amounts.groupby("dateTimeYear")["penaltyAmount"].sum()
            penalties_year = penalties_year.astype(int)
            penalties_year = pd.DataFrame(penalties_year)
            penalties_year["penaltyAmount"] = round(penalties_year["penaltyAmount"] / 1_000, 2)
            print("Total Penalties in Million USD by Year")
            penalties_year.map(lambda x: f"{x:,.1f}")
            Total Penalties in Million USD by Year
            Out[13]:
            penaltyAmount
            dateTimeYear
            19970.0
            19990.3
            200026.8
            200112.4
            2002246.6
            20038,731.7
            20041,618.5
            20052,041.2
            20061,445.7
            2007707.2
            2008553.8
            20091,152.3
            20101,410.6
            2011365.4
            2012251.2
            2013454.1
            2014372.4
            2015351.0
            2016617.0
            2017537.0
            20181,237.4
            2019686.0
            20201,095.9
            2021158.4
            2022502.1
            2023388.3
            2024816.0
            202530.9
            fig, ax = plt.subplots(figsize=(5, 3))

            data_to_plot = penalties_year.loc[2000:2024].copy()
            data_to_plot["penaltyAmount"].plot(kind="line", ax=ax)

            for year in data_to_plot.index:
                year_y_max = data_to_plot.loc[year, "penaltyAmount"]
                ax.vlines(year, 0, year_y_max, linestyles=":", colors="grey", alpha=0.5, lw=1)

            ax.set_xticks(data_to_plot.index[::2])
            plt.xticks(rotation=90)
            ax.get_yaxis().set_major_formatter(plt.FuncFormatter(lambda x, loc: "{:,}".format(int(x))))
            ax.set_title("AAER Penalties per Year")
            ax.set_xlabel("Year")
            ax.set_ylabel("Penalty Amount\nin Million USD")
            plt.tight_layout()
            plt.grid(axis="x")
            ax.set_axisbelow(True)
            plt.show()

            AAERs by Type

            all_tags = []

            for i, row in aaers.iterrows():
                tags = row["tags"]
                if isinstance(tags, list):
                  all_tags.extend(tags)

            all_tags = pd.Series(all_tags)
            all_tags = all_tags.value_counts().reset_index()
            all_tags.columns = ["tag", "count"]

            print("Top 10 Tags in AAER Releases from 1997 to 2025")
            all_tags.head(10)
            Top 10 Tags in AAER Releases from 1997 to 2025
            Out[15]:
            tagcount
            0disclosure fraud1648
            1accounting fraud1092
            2securities fraud404
            3improper professional conduct254
            4financial fraud229
            5accounting violations161
            6fraud150
            7insider trading144
            8reinstatement127
            9securities violation125

            Violated Securities Laws

            # count all unique violatedSections
            all_violated_sections = []

            for i, row in aaers.iterrows():
                violatedSections = row["violatedSections"]
                if isinstance(violatedSections, list):
                    all_violated_sections.extend(violatedSections)

            all_violated_sections = pd.Series(all_violated_sections)
            all_violated_sections = all_violated_sections.value_counts().reset_index()

            all_violated_sections.columns = ["violatedSections", "count"]

            print("Top 10 Violated Securities Laws in SEC Litigation Releases")
            all_violated_sections.head(10)
            Top 10 Violated Securities Laws in SEC Litigation Releases
            Out[16]:
            violatedSectionscount
            0Section 17(a) of the Securities Act of 1933657
            1Rule 10b-5447
            2Section 13(a) of the Exchange Act399
            3Section 10(b) of the Securities Exchange Act o...299
            4Sections 13(a), 13(b)(2)(A) and 13(b)(2)(B) of...296
            5Sections 10(b) and 13(b)(5) of the Securities ...268
            6Sections 13(a), 13(b)(2)(A), and 13(b)(2)(B) o...247
            7Section 10(b) of the Exchange Act245
            8Section 13(b)(5) of the Exchange Act243
            9Sections 10(b) and 13(b)(5) of the Exchange Act222

            Products

            • MCP Server
            • Financial Analysis Prompt Library
            • EDGAR Filing Search API
            • Full-Text Search API
            • Real-Time Filing Stream API
            • EDGAR File & Filing Download API
            • Filing to PDF Generator API
            • XBRL-to-JSON Converter
            • 10-K/10-Q/8-K Item Extractor
            • Investment Adviser & Form ADV API
            • Insider Trading Data - Form 3, 4, 5
            • Restricted Sales Notifications - Form 144
            • Institutional Holdings - Form 13F
            • Form N-PORT API - Investment Company Holdings
            • Form N-CEN API - Annual Reports by Investment Companies
            • Form N-PX API - Proxy Voting Records
            • Form 13D/13G API
            • Form S-1/424B4 - IPOs, Debt & Rights Offerings
            • Form C - Crowdfunding Offerings
            • Form D - Private Placements & Exempt Offerings
            • Regulation A Offering Statements API
            • Changes in Auditors & Accountants
            • Non-Reliance on Prior Financial Statements
            • Executive Compensation Data API
            • Audit Fees Data API
            • Directors & Board Members Data
            • Company Subsidiaries Database
            • Outstanding Shares & Public Float
            • SEC Enforcement Actions
            • Accounting & Auditing Enforcement Releases (AAERs)
            • SRO Filings
            • CIK, CUSIP, Ticker Mapping
            • Bulk Datasets

            General

            • Pricing
            • APIs
            • Datasets
            • Data Browser
            • Features
            • Supported Filings
            • EDGAR Filing Statistics
            • Equity Research & Market Insights

            Account

            • Sign Up - Start Free Trial
            • Log In
            • Forgot Password

            Developers

            • API Playground
            • Documentation
            • API Reference
            • llms.txt
            • Resources & Tutorials
            • Python API SDK
            • Node.js API SDK
            • Cookbook
            • GitHub

            Legal

            • Terms of Service
            • Privacy Policy

            Legal

            • Terms of Service
            • Privacy Policy

            SEC API

            © 2019 - 2026 sec-api.io by Data2Value GmbH. All rights reserved.

            SEC® and EDGAR® are registered trademarks of the U.S. Securities and Exchange Commission (SEC).

            EDGAR is the Electronic Data Gathering, Analysis, and Retrieval system operated by the SEC.

            sec-api.io and Data2Value GmbH are independent of, and not affiliated with, sponsored by, or endorsed by the U.S. Securities and Exchange Commission.

            sec-api.io is classified under SIC code 7375 (Information Retrieval Services), providing on-demand access to structured data and online information services.