Download historical filing data directly from the United States Securities Exchange Commission (SEC)!
Project description
finsec
Download historical filing data directly from the United States (U.S.) Securities Exchange Commission (SEC).
IMPORTANT LEGAL DISCLAIMERfinsec is not affiliated, endorsed, or vetted by the United. States. Securities Exchange Commission. It's an open-source tool that uses the SEC's publicly available APIs, and is intended for research and educational purposes. You should refer to SEC Edgar's website for more details (here) |
Quickstart
Review 13F filings for Berkshire Hathaway CIK 0001067983
import finsec
filing = finsec.Filing('0001067983')
# Return the latest 13F reported holdings for Berkshire Hathaway.
filing.latest_13f_filing
Output:
Name of issuer | Title of class | CUSIP | Share or principal type | Holding value | Share or principal amount count | |
---|---|---|---|---|---|---|
0 | ACTIVISION BLIZZARD INC | COM | 00507V109 | SH | 4470946000 | 60141866 |
1 | ALLY FINL INC | COM | 02005N100 | SH | 834901000 | 30000000 |
2 | AMAZON COM INC | COM | 023135106 | SH | 1205258000 | 10666000 |
Note: Using the latest_13f_filing
function will return the the latest "simplified" version of the 13F Information Table, this works well in most instances... However, there are some who may want to have a more detailed breakdown of the filing. Such as, which investment manager was responsible for investing in the security and the voting authority type granted. This can be handled with the function latest_13f_filing_detailed
(below).
# Return the latest detailed 13F reported holdings for Berkshire Hathaway.
filing.latest_13f_filing_detailed
Output:
Name of issuer | Title of class | CUSIP | Holding value | Share or principal type | Share or principal amount count | Put or call | Investment discretion | Other manager | Voting authority sole count | Voting authority shared count | Voting authority none count | |
---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | ACTIVISION BLIZZARD INC | COM | 00507V109 | 1906458000 | SH | 25645116 | DFND | 4,8,11 | 25645116 | 0 | 0 | |
1 | ACTIVISION BLIZZARD INC | COM | 00507V109 | 85095000 | SH | 1144672 | DFND | 4,10 | 1144672 | 0 | 0 | |
2 | ACTIVISION BLIZZARD INC | COM | 00507V109 | 2479393000 | SH | 33352078 | DFND | 4,11 | 33352078 | 0 | 0 |
# Return the latest 13F cover page details for Berkshire Hathaway.
filing.latest_13f_filing_cover_page
#Output
{'filing_manager': 'Berkshire Hathaway Inc', 'business_address': '3555 Farnam Street, Omaha, NE, 68131', 'submission_type': '13F-HR', 'period_of_report': '09-30-2022', 'signature_name': 'Marc D. Hamburg', 'signature_title': 'Senior Vice President', 'signature_phone': '402-346-1400', 'signature_city': 'Omaha', 'signature_state': 'NE', 'signature_date': '11-14-2022', 'portfolio_value': 296096640000, 'count_holdings': 179}
# Return a specific 13F filing for the specified cik.
filing.get_a_13f_filing("Q2-2022")
# Return the json object containing all 13F filings that are stored as part of the filing object (note this includes everything we've searched for so far).
filing.filings
# Write filings to excel. Record everything we've looked at to Excel.
filing.filings_to_excel
Installation
Install finsec
using pip
:
$ pip install finsec
Requirements
- Python >= 3.7+
- Pandas >= 1.3.5
- lxml >= 4.8.0
- requests >= 2.27.1
- beautifulsoup4 >= 4.11.1
Note that the above packages will be downloaded automatically using pip
.
Author
Stephen Hogg
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file finsec-0.0.4.tar.gz
.
File metadata
- Download URL: finsec-0.0.4.tar.gz
- Upload date:
- Size: 15.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d21f30a6a46e1016c0407a613d9fbd0bfb1ffc25e3bd864744189a8f1da84ce7 |
|
MD5 | 7b730eec24a2cb6695e2181a2ab0ed69 |
|
BLAKE2b-256 | a77cfb10f970c49deb1666c471adc515bf823fe627dc8310d55d880e238ab48b |
File details
Details for the file finsec-0.0.4-py3-none-any.whl
.
File metadata
- Download URL: finsec-0.0.4-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2b0a4b0a817e768651ddea2a0f61a3ffc79fbca80bf43a480c217533f9fb154 |
|
MD5 | ea30f3b325f4cc1c87178c96c0caba2c |
|
BLAKE2b-256 | 1712ad2fce27dc2e763bf41927f866d175d596f8dd504f51e42f79c71d86db1c |