-
-
Notifications
You must be signed in to change notification settings - Fork 97
DownloadingData
Edgartools has been designed to work with real-time data from the SEC Edgar database. However, it is also possible to download bulk data from the SEC website and use Edgartools to work with the data.
While edgartools is designed to access data on SEC Edgar in real-time, it is also possible to download bulk data from the SEC website and use edgartools to work with the data.
The bulk data takes up around 2.6GB of disk space.
The following datasets are currently included in the bulk data download:
- Company Filings - Filings for all companies
- Company Facts - Facts about a company
To download the data, use the download
function in the edgartools
module.
from edgar import *
download_edgar_data()
To use the local data, set the EDGAR_USE_LOCAL_DATA
environment variable to the path where the data is stored.
Alternatively, you can use the use_local_storage
function in the edgartools
module.
from edgar import *
use_local_storage()
By default the bulk data is downloaded to your user directory in a folder called edgar
.
The default data directory is C:\Users\username\.edgar
The default data directory is /home/username/.edgar
You can change this by setting the EDGARTOOLS_DATA_DIR
environment variable.
export EDGARTOOLS_DATA_DIR=/path/to/data
- The local data about company filings is limited to 1000 filings per company. If you need more data, then you have to use edgartools without the local data option.
- Using local data means that to get the latest data you need to run
download_edgar_data()
again to get the latest data. - Using local data makes accessing the company significantly faster than without. So use it if you are iterating through a lot of companies.