Skip to content

tylerjthomas9/ScrapeSEC.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Stable Lifecycle:Stable CI Code Style: Blue Coverage Aqua QA

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                            
─────┼───────────────────────────────────────────────────────────────────────────────────────────
   11000045  NICHOLAS FINANCIAL INC  10-Q       2023-02-14  edgar/data/1000045/0000950170-23
   21000045  NICHOLAS FINANCIAL INC  4          2023-02-24  edgar/data/1000045/0001000045-23
   31000045  NICHOLAS FINANCIAL INC  4          2023-02-28  edgar/data/1000045/0001000045-23
   41000045  NICHOLAS FINANCIAL INC  4          2023-03-09  edgar/data/1000045/0001398344-23
   51000045  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: