SEC 13F-HR

Category : Uncategorized

SEC 13F-HR

Please make sure you have the most updated mfd_dm, mfd_ta and mfd_tex packages for Stata installed for this post.

*
net from "http://www.researchforprofit.com/stata/mfd_dm"
net from "http://www.researchforprofit.com/stata/mfd_ta"
net from "http://www.researchforprofit.com/stata/mfd_tex"
* click on the blue mfd_dm package and then "click here to install" 
*

Download the list of 13F-HR filers

SEC provides the 13F-HR forms. This code downloads the list of all 13F-HR filers for the 2013.

*
clear all
cd "/users/mfd/desktop"
forval aa=2/4 {
	mfd_dm_SEC_idx 2013/QTR`aa'/form.idx
	keep if trim(filing_type)=="13F-HR"
	keep company_name CIK
	capture: append using 13FHR_filers.dta
	save 13FHR_filers.dta, replace
}
compress
duplicates drop
replace company_name=lower(company_name)
sort company_name
save 13FHR_filers.dta, replace
*

Screen Shot 2013-11-17 at 4.37.04 PM

 

Download SEC form 13F-HR

It can be important to know institutional investor portfolios. For instance, I wanted to know which institutional investor increased/decreased its AAPL holdings.

*
clear all
cd "/users/mfd/desktop"

forval aa=1/10 {
	qui: mfd_dm_SEC_filings 0001110806, filing ("13")
	qui: mfd_dm_SEC_xml `aa'
	qui: capture: append using 13FHR.dta
	qui: save 13FHR.dta, replace
	di "`aa'"
}
sort nameOfIssuer_ filing_date
twoway (line shrsOrPrnAmt_sshPrnamt filing_date) if nameOfIssuer_=="APPLE INC"
*

Screen Shot 2013-11-16 at 12.36.19 AM

 

13fhr