Download and query SEC XBRL tags from quarterly and annual financial data
Purpose Access XBRL data from UDF's within excel.
Note that this project bypasses having to access a web api, and effeciently sets up your own database. The benefits are that data can be accessed without limits of size or number of requests. The downside of course is that we must setup the database. With the classess the database setup should take no longer than 20 to 30 minutes including time to load.
Project progress:
Classes to build:
(1) Download SEC Data Class (Complete)
(2) Load SQL Data Class (50%)
(3) Query SQL Data Class (10%)
(4) XBRL taxonomy integration (not started)
Requirements:
SQL Server (2017) and related driver: msoledbsql_18.1.0.0_x64.msi(or msoledbsql_18.1.0.0_x84.msi)
Note: Late binding is utilized throughout the class modules, and as such no direct references to libraries need to be made in the VBA interface.
Instructions:
(1) Place the classes into a VBA project
(2) Download SQL Server and the msi file for the ability to work with SQL server from VBA
(3) Place "SECVba" file at the C:\ directory"
(4) Use the class methods in a module to download SEC data, create SQL Server tables, and load the tables for the data you've downloaded.
Note: It's highly suggested you include data validation of some sort for your loads. For example, after loading Q3'2018 num tables you should note that somewhere either as a record in a SQL table, or a sheet in excel. Purpose of this is to ensure you don't load duplicates.
Example use to instantly query array of data into excel from SQL server (current assets for selected SEC filers as of 20180331):