ScrapeSEC.jl

Scrape EDGAR filings from https://www.sec.gov/

MIT License

Stars
11
Committers
3

ScrapeSEC.jl

Installation

From the Julia General Registry:

julia> ]  # enters the pkg interface
pkg> add ScrapeSEC
julia> using Pkg; Pkg.add("ScrapeSEC")

From source:

julia> ]  # enters the pkg interface
pkg> add https://github.com/tylerjthomas9/ScrapeSEC.jl

Examples

Download filing metadata for 2020-2022 from the SEC archives.

using ScrapeSEC
download_metadata_files(2020, 2022)

Download 10-K, 8-K, and 10-Q metadata, filings for 2020-2022

using ScrapeSEC
download_filings(2023, 2024; filing_types=["10-K", "8-K", "10-Q"])
df = DataFrame(CSV.File(metadata_file; delim="|"))
julia> first(df, 5)
5×5 DataFrame
 Row │ CIK      Company Name            Form Type  Date Filed  Filename                          
     │ Int64    String                  String31   Dates.Date  String                            
─────┼───────────────────────────────────────────────────────────────────────────────────────────
   1 │ 1000045  NICHOLAS FINANCIAL INC  10-Q       2023-02-14  edgar/data/1000045/0000950170-23…
   2 │ 1000045  NICHOLAS FINANCIAL INC  4          2023-02-24  edgar/data/1000045/0001000045-23…
   3 │ 1000045  NICHOLAS FINANCIAL INC  4          2023-02-28  edgar/data/1000045/0001000045-23…
   4 │ 1000045  NICHOLAS FINANCIAL INC  4          2023-03-09  edgar/data/1000045/0001398344-23…
   5 │ 1000045  NICHOLAS FINANCIAL INC  8-K        2023-01-24  edgar/data/1000045/0000950170-23…

Download filing metadata for 2020-2022, create a main index file, and download 10-Ks using the combined index file

using ScrapeSEC
download_metadata_files(2020, 2022)
create_main_index()
download_filings("./metadata/main_idx.tsv"; filing_types=["10-K", ])

Download filings from a vector of filenames

using CSV, DataFrames, ScrapeSEC
df = CSV.File("./metadata/main_idx.tsv", delim = "|") |> DataFrame
download_filings(df.FileName)

Citing

If you use ScrapeSEC.jl as part of your research, teaching, or other activities, we would be grateful if you could cite our work.

@misc{ScrapeSEC.jlPackage,
  author = {Tyler Thomas}
  title = {ScrapeSEC.jl}
  year = {2023}
  url = {https://tylerjthomas9.github.io/ScrapeSEC.jl/}
}

Other Julia Financial Data Packages

Not maintained: